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-prev] [day] [month] [year] [list]
Date:	Sun, 01 Jun 2014 19:40:04 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	nikolay@...hat.com
Cc:	netdev@...r.kernel.org, vyasevic@...hat.com,
	eric.dumazet@...il.com, dborkman@...hat.com
Subject: Re: [PATCH net v2] net: fix wrong mac_len calculation for vlans

From: Nikolay Aleksandrov <nikolay@...hat.com>
Date: Wed, 28 May 2014 18:03:48 +0200

> After 1e785f48d29a ("net: Start with correct mac_len in
> skb_network_protocol") skb->mac_len is used as a start of the
> calculation in skb_network_protocol() but that is not always correct. If
> skb->protocol == 8021Q/AD, usually the vlan header is already inserted
> in the skb (i.e. vlan reorder hdr == 0). Usually when the packet enters
> dev_hard_xmit it has mac_len == 0 so we take 2 bytes from the
> destination mac address (skb->data + VLAN_HLEN) as a type in
> skb_network_protocol() and return vlan_depth == 4. In the case where TSO is
> off, then the mac_len is set but it's == 18 (ETH_HLEN + VLAN_HLEN), so
> skb_network_protocol() returns a type from inside the packet and
> offset == 22. Also make vlan_depth unsigned as suggested before.
> As suggested by Eric Dumazet, move the while() loop in the if() so we
> can avoid additional testing in fast path.
 ...
> CC: Vlad Yasevich <vyasevic@...hat.com>
> CC: Eric Dumazet <eric.dumazet@...il.com>
> CC: Daniel Borkman <dborkman@...hat.com>
> CC: David S. Miller <davem@...emloft.net>
> 
> Fixes:1e785f48d29a ("net: Start with correct mac_len in
> skb_network_protocol")
> Signed-off-by: Nikolay Aleksandrov <nikolay@...hat.com>

Applied, thanks Nikolay.
--
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