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:	Tue, 14 Jan 2014 15:01:24 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	stephen@...workplumber.org
Cc:	netdev@...r.kernel.org
Subject: Re: [Bug 68501] New: llc_fixup_skb considers PDU len including
 ETH_HLEN

From: Stephen Hemminger <stephen@...workplumber.org>
Date: Fri, 10 Jan 2014 15:11:56 -0800

> In below snip of code in llc_fixup_skb we calculate pdulen from
> eth_hdr(skb)->h_proto which contains total length of packet include ETH_HLEN.
> 
> <snip>
> 119         if (skb->protocol == htons(ETH_P_802_2)) {
> 120                 __be16 pdulen = eth_hdr(skb)->h_proto;
> 121                 s32 data_size = ntohs(pdulen) - llc_len;
> 122 
> 123                 if (data_size < 0 ||
> 124                     !pskb_may_pull(skb, data_size))
> 125                         return 0;
> 
> </snip>
> 
> 
> Line 121 should be changed to 
> 
> 121                 s32 data_size = ntohs(pdulen) - llc_len - ETH_HLEN;

This can't be right, everything I can find says that the length here is:

	the 802.2 packet length - the number of bytes of the 802.2
	(LLC and data) portion of the frame, excluding padding

Which imples that the ethernet header length is not included.
--
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