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] [day] [month] [year] [list]
Message-ID: <20120519201418.GA5780@burratino>
Date:	Sat, 19 May 2012 15:14:18 -0500
From:	Jonathan Nieder <jrnieder@...il.com>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Szymon Janc <szymon@...c.net.pl>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] binfmt_misc: Fix compilation error in parse_command()

Al Viro wrote:
> On Sat, Jan 21, 2012 at 08:02:37PM +0100, Szymon Janc wrote:

>> --- a/fs/binfmt_misc.c
>> +++ b/fs/binfmt_misc.c
>> @@ -418,7 +418,7 @@ static int parse_command(const char __user *buffer, size_t count)
>>  		return 0;
>>  	if (count > 3)
>>  		return -EINVAL;
>> -	if (copy_from_user(s, buffer, count))
>> +	if (copy_from_user(s, buffer, min(count, sizeof(s))))
>
> File a report in gcc bugzilla.  Note that
> 	* count is size_t and thus unsigned
> 	* sizeof(s) is 4
> IOW, min(count, sizeof(s)) should do no better (or worse) than count here.
> If gcc is unable to prove that, it really needs to be fixed...

Looks like this is <http://gcc.gnu.org/PR52798>.

Thanks,
Jonathan
--
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