]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.20.2/fix-skb-data-reallocation-handling-in-ipsec.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.20.2 / fix-skb-data-reallocation-handling-in-ipsec.patch
CommitLineData
1bbce966
GKH
1From stable-bounces@linux.kernel.org Tue Feb 27 11:10:02 2007
2From: Arnaldo Carvalho de Melo <acme@redhat.com>
3Date: Tue, 27 Feb 2007 11:08:33 -0800 (PST)
4Subject: Fix skb data reallocation handling in IPSEC
5To: stable@kernel.org
6Cc: bunk@stusta.de
7Message-ID: <20070227.110833.38710283.davem@davemloft.net>
8
9From: Arnaldo Carvalho de Melo <acme@redhat.com>
10
11[XFRM_TUNNEL]: Reload header pointer after pskb_may_pull/pskb_expand_head
12
13Please consider applying, this was found on your latest
14net-2.6 tree while playing around with that ip_hdr() + turn
15skb->nh/h/mac pointers as offsets on 64 bits idea :-)
16
17Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
18Signed-off-by: David S. Miller <davem@davemloft.net>
19Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20
21---
22 net/ipv4/xfrm4_mode_tunnel.c | 1 +
23 1 file changed, 1 insertion(+)
24
25--- linux-2.6.20.1.orig/net/ipv4/xfrm4_mode_tunnel.c
26+++ linux-2.6.20.1/net/ipv4/xfrm4_mode_tunnel.c
27@@ -84,6 +84,7 @@ static int xfrm4_tunnel_input(struct xfr
28 (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
29 goto out;
30
31+ iph = skb->nh.iph;
32 if (x->props.flags & XFRM_STATE_DECAP_DSCP)
33 ipv4_copy_dscp(iph, skb->h.ipiph);
34 if (!(x->props.flags & XFRM_STATE_NOECN))