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]
Message-ID: <CANn89iK_NVBWwT4QNrb3EpahG3zOQS-Dh68Qdhrm2_xAs7Yu=Q@mail.gmail.com>
Date:   Tue, 4 Aug 2020 07:34:07 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     linmiaohe <linmiaohe@...wei.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,
        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,
        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()

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.
>
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ