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  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:	Fri, 30 Mar 2007 01:45:42 +0300
From:	Sami Farin <safari-kernel@...ari.iki.fi>
To:	netdev@...r.kernel.org
Subject: Re: [PATCH][IPv6]: Fix incorrect length check in rawv6_sendmsg()

On Thu, Mar 29, 2007 at 14:26:44 -0700, David Miller wrote:
> From: Sridhar Samudrala <sri@...ibm.com>
> Date: Thu, 29 Mar 2007 14:17:28 -0700
> 
> > The check for length in rawv6_sendmsg() is incorrect.
> > As len is an unsigned int, (len < 0) will never be TRUE.
> > I think checking for IPV6_MAXPLEN(65535) is better.
> > 
> > Is it possible to send ipv6 jumbo packets using raw
> > sockets? If so, we can remove this check.
> 
> I don't see why such a limitation against jumbo would exist,
> does anyone else?
> 
> Thanks for catching this Sridhar.  A good compiler should simply
> fail to compile "if (x < 0)" when 'x' is an unsigned type, don't
> you think :-)

gcc warns if you use -W or -Wextra (but not if only -Wall is used):

* An unsigned value is compared against zero with '<' or '>='.

-- 
Do what you love because life is too short for anything else.

-
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