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: <c86a2fbde50aea2b28e82c333f29d575@codeaurora.org>
Date:   Mon, 14 May 2018 16:45:57 -0600
From:   stranche@...eaurora.org
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:     Eric Dumazet <eric.dumazet@...il.com>,
        Willem de Bruijn <willemb@...gle.com>,
        David Miller <davem@...emloft.net>,
        Network Development <netdev@...r.kernel.org>,
        Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
Subject: Re: [PATCH net-next] udp: Fix kernel panic in UDP GSO path

On 2018-05-11 17:16, Willem de Bruijn wrote:

>> Hmm, no, we absolutely need to fix GSO instead.
>> 
>> Think of a bonding device (or any virtual devices), your patch wont 
>> avoid the crash.

Hi Eric. Can you clarify what you mean by "fix GSO?" Is that just having 
the GSO path work
regardless of whether or not SG is enabled for the device?

> 
> Thanks for reporting the issue.
> 
> Paged skbuffs is an optimization for gso, but the feature should
> continue to work even if gso skbs are linear, indeed (if at the cost
> of copying during skb_segment).
> 
> We need to make paged contingent on scatter-gather. Rough
> patch below. That is for ipv4 only, the same will be needed for ipv6.
> 
> diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
> index b5e21eb198d8..b38731d8a44f 100644
> --- a/net/ipv4/ip_output.c
> +++ b/net/ipv4/ip_output.c
> @@ -884,7 +884,7 @@ static int __ip_append_data(struct sock *sk,
> 
>         exthdrlen = !skb ? rt->dst.header_len : 0;
>         mtu = cork->gso_size ? IP_MAX_MTU : cork->fragsize;
> -       paged = !!cork->gso_size;
> +       paged = cork->gso_size && (rt->dst.dev->features & NETIF_F_SG);

Hi Willem. That's definitely a much cleaner patch than ours since it 
allows the GSO to continue without failure.
We tried it on both the IPv4 and IPv6 path and didn't see the crash in 
either case.

-----
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora 
Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ