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: <20170529.233109.702640863399503414.davem@davemloft.net>
Date:   Mon, 29 May 2017 23:31:09 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     adobriyan@...il.com
Cc:     Linyu.Yuan@...atel-sbell.com.cn, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: ndisc.c: reduce size of
 __ndisc_fill_addr_option()

From: Alexey Dobriyan <adobriyan@...il.com>
Date: Sat, 27 May 2017 18:15:14 +0300

>> --- a/net/ipv6/ndisc.c
>> +++ b/net/ipv6/ndisc.c
>> @@ -148,17 +148,18 @@ void __ndisc_fill_addr_option(struct sk_buff *skb, int type, void *data,
> 
>>  	space -= data_len;
>> -	if (space > 0)
>> -		memset(opt, 0, space);
>> +
>> +	memset(opt, 0, space);
> 
> This can't be right.
> 
> And what size are you reducing?

It is right, space equals the same thing it would have equaled
before his changes, and a memset() of zero length will do the
right thing.

Finally, if space can be negative here, we have real problems.

Powered by blists - more mailing lists