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] [thread-next>] [day] [month] [year] [list]
Message-ID: <2136b5e36d804821846064fafbf72941@AcuMS.aculab.com>
Date:   Wed, 17 Jun 2020 14:39:40 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Jeremy Kerr' <jk@...abs.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     Allan Chou <allan@...x.com.tw>, Freddy Xin <freddy@...x.com.tw>,
        "Peter Fink" <pfink@...ist-es.de>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: RE: [PATCH] net: usb: ax88179_178a: fix packet alignment padding

From: Jeremy Kerr
> Sent: 15 June 2020 03:55

While you are looking as this driver you might want to worry
about what it sets skp->truesize to.

> --- a/drivers/net/usb/ax88179_178a.c
> +++ b/drivers/net/usb/ax88179_178a.c
> @@ -1414,10 +1414,10 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
>  		}
> 
>  		if (pkt_cnt == 0) {
> -			/* Skip IP alignment psudo header */
> -			skb_pull(skb, 2);
>  			skb->len = pkt_len;
> -			skb_set_tail_pointer(skb, pkt_len);
> +			/* Skip IP alignment pseudo header */
> +			skb_pull(skb, 2);
> +			skb_set_tail_pointer(skb, skb->len);
>  			skb->truesize = pkt_len + sizeof(struct sk_buff);

IIRC the memory allocated to the packet is likely to be over 64k.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ