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: <1331888235-10368-1-git-send-email-gaofeng@cn.fujitsu.com>
Date:	Fri, 16 Mar 2012 16:57:15 +0800
From:	Gao feng <gaofeng@...fujitsu.com>
To:	davem@...emloft.net
Cc:	steffen.klassert@...unet.com, eric.dumazet@...il.com,
	netdev@...r.kernel.org, Gao feng <gaofeng@...fujitsu.com>
Subject: [PATCH] ipv6: fix incorrent ipv6 ipsec packet fragment

Since commit 299b0767(ipv6: Fix IPsec slowpath fragmentation problem)
In func ip6_append_data,after call skb_put(skb, fraglen + dst_exthdrlen)
the skb->len contains dst_exthdrlen,and we don't reduce dst_exthdrlen at last
This will make fraggap>0 in next "while cycle",and cause the size of skb incorrent

Call skb_pull reduce skb->len before next "while cycle"

Signed-off-by: Gao feng <gaofeng@...fujitsu.com>
---
 net/ipv6/ip6_output.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index d97e071..f67f840 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1450,7 +1450,8 @@ alloc_new_skb:
 				kfree_skb(skb);
 				goto error;
 			}
-
+
+			skb_pull(skb, dst_exthdrlen);
 			offset += copy;
 			length -= datalen - fraggap;
 			transhdrlen = 0;
-- 
1.7.5.4

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