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: <20240924101529.0093994d@kmaincent-XPS-13-7390>
Date: Tue, 24 Sep 2024 10:15:29 +0200
From: Kory Maincent <kory.maincent@...tlin.com>
To: Simon Horman <horms@...nel.org>
Cc: Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, Kyle Swenson <kyle.swenson@....tech>,
 thomas.petazzoni@...tlin.com, Oleksij Rempel <o.rempel@...gutronix.de>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net] net: pse-pd: tps23881: Fix boolean evaluation for
 bitmask checks

On Tue, 24 Sep 2024 08:18:39 +0100
Simon Horman <horms@...nel.org> wrote:

> On Mon, Sep 23, 2024 at 05:34:26PM +0200, Kory Maincent wrote:
>  [...]  
> 
> Thanks Kory,
> 
> I agree that these changes are correct.
> But are they fixes; can this manifest in a bug?

I didn't face it but I think yes.
In case of a 4 pairs PoE ports without the fix:

        chan = priv->port[id].chan[0];                                          
        if (chan < 4) {                                                         
                enabled = ret & BIT(chan);                                  
                delivering = ret & BIT(chan + 4);                           
	...                          
        }                                                                       
                                                                                
        if (priv->port[id].is_4p) {                                             
                chan = priv->port[id].chan[1];                                  
                if (chan < 4) {
                        enabled &= !!(ret & BIT(chan));                         
                        delivering &= !!(ret & BIT(chan + 4));

If enabled = 0x2 here, enabled would be assigned to 0 instead of 1.
...

		} 
	}  

I have an issue using 4pairs PoE port with my board so I can't test it.


> (If so, I suspect the Kernel is riddled with such bugs.)

Don't know about it but if I can remove it from my driver it would be nice. :)

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ