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]
Date:   Tue, 22 Nov 2022 09:28:42 +0100
From:   Paolo Abeni <pabeni@...hat.com>
To:     Leon Romanovsky <leon@...nel.org>,
        Zhang Changzhong <zhangchangzhong@...wei.com>,
        Edward Cree <ecree.xilinx@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] sfc: fix potential memleak in
 __ef100_hard_start_xmit()

Hello,

On Fri, 2022-11-18 at 19:11 +0200, Leon Romanovsky wrote:
> On Fri, Nov 18, 2022 at 09:15:43AM +0000, Martin Habets wrote:
> > On Thu, Nov 17, 2022 at 03:05:27PM +0200, Leon Romanovsky wrote:
> > > Please take a look __ef100_enqueue_skb() and see if it frees SKB on
> > > error or not. If not, please fix it.
> > 
> > That function looks ok to me, but I appreciate the extra eyes on it.
> 
> __ef100_enqueue_skb() has the following check in error path:
> 
>   498 err:
>   499         efx_enqueue_unwind(tx_queue, old_insert_count);
>   500         if (!IS_ERR_OR_NULL(skb))
>   501                 dev_kfree_skb_any(skb);
>   502
> 
> The issue is that skb is never error or null here and this "if" is
> actually always true and can be deleted.

I think that such additional change could be suite for a different net-
next patch, while this -net patch could land as is, @Leon: do you
agree?

Thanks!

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ