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: <20111118202552.GB2203@ZenIV.linux.org.uk>
Date:	Fri, 18 Nov 2011 20:25:52 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Sasha Levin <levinsasha928@...il.com>
Cc:	linux-kernel@...r.kernel.org, Pekka Enberg <penberg@...nel.org>,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] pipe: Fail cleanly when root tries F_SETPIPE_SZ with big
 size

On Fri, Nov 18, 2011 at 10:04:34PM +0200, Sasha Levin wrote:

> +	if (nr_pages * sizeof(struct pipe_buffer) > KMALLOC_MAX_SIZE)
> +		return -ENOMEM;

nr_pages is unsigned long, sizeof is greater than 1, KMALLOC_MAX_SIZE is
unsigned long...  So write that check as KMALLOC_MAX_SIZE / sizeof > nr_pages
--
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