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: <20211208151030.1b489fad@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Wed, 8 Dec 2021 15:10:30 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     José Expósito <jose.exposito89@...il.com>
Cc:     Vladimir Oltean <vladimir.oltean@....com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        "alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "vivien.didelot@...il.com" <vivien.didelot@...il.com>,
        "f.fainelli@...il.com" <f.fainelli@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "linux@...linux.org.uk" <linux@...linux.org.uk>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: dsa: felix: Fix memory leak in
 felix_setup_mmio_filtering

On Wed, 8 Dec 2021 18:13:32 +0000 Vladimir Oltean wrote:
> On Wed, Dec 08, 2021 at 07:05:09PM +0100, José Expósito wrote:
> > Addresses-Coverity-ID: 1492897 ("Resource leak")
> > Addresses-Coverity-ID: 1492899 ("Resource leak")
> > Signed-off-by: José Expósito <jose.exposito89@...il.com>
> > ---  
> 
> Impossible memory leak, I might add, because DSA will error out much
> soon if there isn't any CPU port defined:
> https://elixir.bootlin.com/linux/v5.15.7/source/net/dsa/dsa2.c#L374
> I don't think I should have added the "if (cpu < 0)" check at all, but
> then it would have raised other flags, about BIT(negative number) or
> things like that. I don't know what's the best way to deal with this?
> 
> Anyway, in case we find no better alternative:
> 
> Fixes: 8d5f7954b7c8 ("net: dsa: felix: break at first CPU port during init and teardown")
> Reviewed-by: Vladimir Oltean <vladimir.oltean@....com>

If this is the way to go please repost with the tags added
and a commit message.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ