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>] [day] [month] [year] [list]
Message-ID: <a1516b0e527246ed8e40ede17e69decd@huawei.com>
Date:   Thu, 6 Aug 2020 11:56:33 +0000
From:   linmiaohe <linmiaohe@...wei.com>
To:     Eric Dumazet <edumazet@...gle.com>
CC:     David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Pravin B Shelar <pshelar@....org>,
        Florian Westphal <fw@...len.de>,
        "martin.varghese@...ia.com" <martin.varghese@...ia.com>,
        Willem de Bruijn <willemb@...gle.com>,
        Davide Caratti <dcaratti@...hat.com>,
        Steffen Klassert <steffen.klassert@...unet.com>,
        Paolo Abeni <pabeni@...hat.com>,
        "shmulik@...anetworks.com" <shmulik@...anetworks.com>,
        "kyk.segfault@...il.com" <kyk.segfault@...il.com>,
        netdev <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: Fix potential out of bound write in
 skb_try_coalesce()

Eric Dumazet <edumazet@...gle.com> wrote:
>On Tue, Aug 4, 2020 at 4:46 AM linmiaohe <linmiaohe@...wei.com> wrote:
>>
>> From: Miaohe Lin <linmiaohe@...wei.com>
>>
>> The head_frag of skb would occupy one extra skb_frag_t. Take it into 
>> account or out of bound write to skb frags may happen.
>>
>
>Please share a stack trace if this was a real bug spotted in the wild.
>
>I do not believe this patch is correct.
>
>if (A + B >= MAX)   is equivalent to  if (A + B + 1 > MAX)
>
>Note how the other condition (when there is no bytes in skb header) is coded :
>
>if (A + B > MAX) return false;
>
>In anycase, please always provide a Fixes: tag for any bug fix.
>
>Thanks.

Many thanks for your patient explaination. I compared (A + B >= MAX) with (A + B + 1 > MAX) in skb_gro_receive(),
but I missed the '='. It's my oversight, I'am really sorry about it.

Thanks again.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ