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: <1322320749-8055-1-git-send-email-bpoirier@suse.de>
Date:	Sat, 26 Nov 2011 10:19:09 -0500
From:	Benjamin Poirier <bpoirier@...e.de>
To:	"David S. Miller" <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, stable@...r.kernel.org,
	Jesse Gross <jesse@...ira.com>
Subject: [PATCH net/stable] gro: reset vlan_tci on reuse

This one liner is part of upstream
commit 3701e51382a026cba10c60b03efabe534fba4ca4

and it is in the same vein as
commit 66c46d741e2e60f0e8b625b80edb0ab820c46d7a
commit 6d152e23ad1a7a5b40fef1f42e017d66e6115159

which are already in -stable.

For drivers using the vlan_gro_frags() interface, a packet with invalid tci
leads to GRO_DROP and napi_reuse_skb(). The skb has to be sanitized before
being reused or we'll send skb's with invalid vlan_tci up the stack where
they're not expected.

Signed-off-by: Benjamin Poirier <bpoirier@...e.de>
Cc: Jesse Gross <jesse@...ira.com>

---

Please note, reusing skb's with an invalid vlan_tci can cause panics on
2.6.32.y -stable kernels.

 net/core/dev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 64eb849..84a0705 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2614,6 +2614,7 @@ void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
 {
 	__skb_pull(skb, skb_headlen(skb));
 	skb_reserve(skb, NET_IP_ALIGN - skb_headroom(skb));
+	skb->vlan_tci = 0;
 	skb->dev = napi->dev;
 	skb->iif = 0;
 
-- 
1.7.7

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