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-next>] [day] [month] [year] [list]
Message-ID: <1278688420.2696.7.camel@edumazet-laptop>
Date:	Fri, 09 Jul 2010 17:13:40 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Rodrigo Partearroyo González 
	<rpartearroyo@...entia.com>
Cc:	Herbert Xu <herbert@...dor.apana.org.au>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Iratxo Pichel Ortiz <ipichel@...entia.com>,
	Noelia Morón <nmoron@...entia.com>,
	netdev <netdev@...r.kernel.org>
Subject: Re: net/sched/act_nat.c BUG

Le vendredi 09 juillet 2010 à 16:37 +0200, Rodrigo Partearroyo González
a écrit :
> Hi all,
> 
> I have been testing Stateless NAT and found that ICMP packets with length less 
> than 20 bytes were not correctly NAT'ed. I have found a BUG that makes taking 
> into account IP header length twice, so ICMP packets smaller than 20 bytes 
> were being dropped.
> 

CC netdev

> The proposed fix is:
> 
> Index: net/sched/act_nat.c
> ===================================================================
> --- net/sched/act_nat.c
> +++ net/sched/act_nat.c
> @@ -202,7 +202,7 @@
>         {
>                 struct icmphdr *icmph;
>  
> -               if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph)))
> +               if (!pskb_may_pull(skb, ihl + sizeof(*icmph)))
>                         goto drop;
>  
>                 icmph = (void *)(skb_network_header(skb) + ihl);
> 
> Please, consider applying it.

Nice catch, but take a look at next lines too,
when call to skb_clone_writable() is done, since same error is present.

	skb_clone_writable(skb,
			   ihl + sizeof(*icmph) + sizeof(*iph))

Please submit a formal patch, with your "Signed-off-by: ...", as
documented in Documentation/SubmittingPatches

Thanks


--
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