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
| ||
|
Message-ID: <1423709570.4847.21.camel@edumazet-glaptop2.roam.corp.google.com> Date: Wed, 11 Feb 2015 18:52:50 -0800 From: Eric Dumazet <eric.dumazet@...il.com> To: David L Stevens <david.stevens@...cle.com> Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org Subject: Re: [PATCH net-next] sunvnet: don't change gso data on clones On Wed, 2015-02-11 at 12:35 -0500, David L Stevens wrote: > I don't think I understand your concern. This problem can result in a > panic using sunvnet because the sunvnet driver is changing the original > skb, which is always, or at least almost always, a clone. TCP uses gso_segs > to track packet counts, so changing it in the driver can result in bad math-- > TCP assumes its copy of the clone's data shouldn't change (of course). > > A driver that doesn't change the segmentation or original data doesn't > need to care whether it's a clone or not-- it'll free it and drop a > reference. Since sunvnet is changing the gso_size and gso_segs, it needs > to unclone first. Well, we had a very hard to find bug in TCP stack, I want to make sure we fixed all relevant points. commit c52e2421f7368fd36cbe330d2cf41b10452e39a9 Author: Eric Dumazet <edumazet@...gle.com> Date: Tue Oct 15 11:54:30 2013 -0700 tcp: must unclone packets before mangling them TCP stack should make sure it owns skbs before mangling them. We had various crashes using bnx2x, and it turned out gso_size was cleared right before bnx2x driver was populating TC descriptor of the _previous_ packet send. TCP stack can sometime retransmit packets that are still in Qdisc. Of course we could make bnx2x driver more robust (using ACCESS_ONCE(shinfo->gso_size) for example), but the bug is TCP stack. We have identified two points where skb_unclone() was needed. This patch adds a WARN_ON_ONCE() to warn us if we missed another fix of this kind. Kudos to Neal for finding the root cause of this bug. Its visible using small MSS. Signed-off-by: Eric Dumazet <edumazet@...gle.com> Signed-off-by: Neal Cardwell <ncardwell@...gle.com> Cc: Yuchung Cheng <ycheng@...gle.com> Signed-off-by: David S. Miller <davem@...emloft.net> -- 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