lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070323155115.89f86b3b.dada1@cosmosbay.com>
Date:	Fri, 23 Mar 2007 15:51:15 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Jiri Kosina <jikos@...os.cz>
Cc:	Tomas M <tomas@...x.org>, linux-kernel@...r.kernel.org
Subject: Re: [patch] [bugfix] loop.c

On Fri, 23 Mar 2007 15:25:23 +0100 (CET)
Jiri Kosina <jikos@...os.cz> wrote:

> On Fri, 23 Mar 2007, Eric Dumazet wrote:
> 
> > -	if (max_loop < 1 || max_loop > 256) {
> > -		printk(KERN_WARNING "loop: invalid max_loop (must be between"
> > -				    " 1 and 256), using default (8)\n");
> > +	if (max_loop < 1) {
> > +		printk(KERN_WARNING "loop: invalid max_loop (must be > 1)"
> > +				    ", using default (8)\n");
> >  		max_loop = 8;
> >  	}
> [...]
> > +	loop_dev = kmalloc(max_loop * sizeof(struct loop_device *), GFP_KERNEL);
> > +	if (!loop_dev) {
> > +		loop_dev = vmalloc(max_loop * sizeof(struct loop_device *));
> > +		if (!loop_dev)
> > +			goto out_mem;
> > +		loop_dev_vmalloced = 1;
> >  	}
> 
> Why did you remove the upper bound check for max_loop value? Now you 
> effectively allow to max_loop * sizeof(struct loop_device *) to overflow, 
> when passed value of max_loop which is large enough. Or am I just blind?

Yes, I forgot to change this, but the new limit was 16384 in my mind

MODULE_PARM_DESC(max_loop, "Maximum number of loop devices (1-16384)");

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ