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: <52891341.4020403@pobox.com>
Date:	Sun, 17 Nov 2013 14:04:33 -0500
From:	Mark Lord <mlord@...ox.com>
To:	Eric Dumazet <eric.dumazet@...il.com>,
	Ming Lei <ming.lei@...onical.com>, davem@...emloft.net,
	netdev@...r.kernel.org
Subject: Re: net/usb/ax88179_178a driver broken in linux-3.12

On 13-11-17 01:56 PM, Mark Lord wrote:
> On 13-11-17 01:35 PM, Mark Lord wrote:
>> The USB3 network adapter locks up consistently for me here in 3.12,
>> but was working without issues in 3.11.x
>>
>> Source of the problem is this patch:
>>    http://patchwork.ozlabs.org/patch/264021/
>>
>> Reverting the patch fixes the adapter.
> 
> Okay, upon closer inspection, the bug appears to be a math error.
> Here's a simpler (non-revert) patch to fix the bug that was introduced in 3.12.
> 
> (un-mangled copy attached; reproduced below for ease of viewing).
> 
> Don't exceed more than the 8 bytes of reserved ("needed_headroom") space
> when calling pskb_expand_head.  This fixes a bug introduced in linux-3.12.0.
> 
> Signed-off-by: Mark Lord <mlord@...ox.com>
> 
> 
> --- ax88179_178a.c.orig 2013-11-03 18:41:51.000000000 -0500
> +++ linux/drivers/net/usb/ax88179_178a.c        2013-11-17 13:47:26.127971404 -0500
> @@ -1183,10 +1183,10 @@
>         if (((skb->len + 8) % frame_size) == 0)
>                 tx_hdr2 |= 0x80008000;  /* Enable padding */
> 
> -       headroom = skb_headroom(skb) - 8;
> +       headroom = skb_headroom(skb);
> 
> -       if ((skb_header_cloned(skb) || headroom < 0) &&
> -           pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) {
> +       if ((skb_header_cloned(skb) || headroom < 8) &&
> +           pskb_expand_head(skb, headroom < 8 ? 8 - headroom : 0, 0, GFP_ATOMIC)) {
>                 dev_kfree_skb_any(skb);
>                 return NULL;
>         }
> 

Dagnabbit.. that still locked up just after I sent the email,
despite working fine in testing prior to that.

So.. sticking with the full revert here for now.
Perhaps one of you chaps can spot the bug.

-- 
Mark Lord
Real-Time Remedies Inc.
mlord@...ox.com
--
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