[3.16.y-ckt extended stable] Patch "ipv4: fix a potential use after free in ip_tunnel_core.c" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Mon Nov 10 11:32:17 UTC 2014
This is a note to let you know that I have just added a patch titled
ipv4: fix a potential use after free in ip_tunnel_core.c
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt1.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 1721632fefd17187becd707f90d995cee0cd7a89 Mon Sep 17 00:00:00 2001
From: Li RongQing <roy.qing.li at gmail.com>
Date: Fri, 17 Oct 2014 16:53:23 +0800
Subject: ipv4: fix a potential use after free in ip_tunnel_core.c
commit 1245dfc8cadb258386fcd27df38215a0eccb1f17 upstream.
pskb_may_pull() maybe change skb->data and make eth pointer oboslete,
so set eth after pskb_may_pull()
Fixes:3d7b46cd("ip_tunnel: push generic protocol handling to ip_tunnel module")
Cc: Pravin B Shelar <pshelar at nicira.com>
Signed-off-by: Li RongQing <roy.qing.li at gmail.com>
Acked-by: Pravin B Shelar <pshelar at nicira.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
net/ipv4/ip_tunnel_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index f4c987bb7e94..88c386cf7d85 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -91,11 +91,12 @@ int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto)
skb_pull_rcsum(skb, hdr_len);
if (inner_proto == htons(ETH_P_TEB)) {
- struct ethhdr *eh = (struct ethhdr *)skb->data;
+ struct ethhdr *eh;
if (unlikely(!pskb_may_pull(skb, ETH_HLEN)))
return -ENOMEM;
+ eh = (struct ethhdr *)skb->data;
if (likely(ntohs(eh->h_proto) >= ETH_P_802_3_MIN))
skb->protocol = eh->h_proto;
else
--
2.1.0
More information about the kernel-team
mailing list