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]
Date:	Thu, 18 Jun 2009 00:09:36 -0400
From:	Brian Haley <brian.haley@...com>
To:	David Miller <davem@...emloft.net>
CC:	roel.kluin@...il.com, netdev@...r.kernel.org,
	akpm@...ux-foundation.org
Subject: Re: [PATCH] ipv6: Keep index within tab_unreach[]

David Miller wrote:
> From: Brian Haley <brian.haley@...com>
> Date: Wed, 17 Jun 2009 22:10:08 -0400
> 
>> Roel Kluin wrote:
>>> @@ -923,7 +923,7 @@ int icmpv6_err_convert(int type, int code, int *err)
>>>  	switch (type) {
>>>  	case ICMPV6_DEST_UNREACH:
>>>  		fatal = 1;
>>> -		if (code <= ICMPV6_PORT_UNREACH) {
>>> +		if (code <= ICMPV6_PORT_UNREACH && code >= 0) {
>>>  			*err  = tab_unreach[code].err;
>>>  			fatal = tab_unreach[code].fatal;
>>>  		}
>> The code value in the ICMPv6 header is a u8, so should always be positive, right?
>> It doesn't hurt I guess though.
> 
> True.  Probably best to pass this thing in as a 'u8', rathern than as
> an 'int'.

"type" is a u8 too, but both seem to be passed as int's everywhere (rawv6,
tcp, sctp and dccp), and in the err_handler() func pointer in the inet6_protocol
struct.  I can try and cook something up in the next few days that changes
it all to u8's.

-Brian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ