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
| ||
|
Date: Fri, 28 Sep 2012 19:40:39 -0400 From: Ramesh Nagappa <ramesh.nagappa@...csson.com> To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> CC: "davem@...emloft.net" <davem@...emloft.net>, "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>, "michel@...irati.com.br" <michel@...irati.com.br>, "eric.dumazet@...il.com" <eric.dumazet@...il.com> Subject: [PATCH] net: fix neigh_resolve_output can cause skb_under_panic >From fd023edd911ef12aca38a72b40241661c202684f Mon Sep 17 00:00:00 2001 From: Ramesh Nagappa <ramesh.nagappa@...csson.com> Date: Thu, 27 Sep 2012 10:20:58 -0700 Subject: [PATCH] net: fix neigh_resolve_output can cause skb_under_panic The retry loop in the neigh_resolve_output() and neigh_connected_output() can add a hard_header without resetting the skb to network header. This causes the skb_push() in dev_hard_header() to fail. Signed-off-by: Ramesh Nagappa <ramesh.nagappa@...csson.com> Signed-off-by: Shawn Lu <shawn.lu@...csson.com> Reviewed-by: Billie Alsup <billie.alsup@...csson.com> Reviewed-by: Robert Coulson <robert.coulson@...csson.com> --- net/core/neighbour.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 96bb0a3..5a3dfec5 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1327,6 +1327,7 @@ int neigh_resolve_output(struct sk_buff *skb) do { seq = read_seqbegin(&neigh->ha_lock); + __skb_pull(skb, skb_network_offset(skb)); err = dev_hard_header(skb, dev, ntohs(skb->protocol), neigh->ha, NULL, skb->len); } while (read_seqretry(&neigh->ha_lock, seq)); @@ -1358,10 +1359,10 @@ int neigh_connected_output(struct sk_buff *skb) struct net_device *dev = neigh->dev; unsigned int seq; - __skb_pull(skb, skb_network_offset(skb)); do { seq = read_seqbegin(&neigh->ha_lock); + __skb_pull(skb, skb_network_offset(skb)); err = dev_hard_header(skb, dev, ntohs(skb->protocol), neigh->ha, NULL, skb->len); } while (read_seqretry(&neigh->ha_lock, seq)); -- 1.7.3.1 -- 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