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: <20240708113846.215a2fde@kmaincent-XPS-13-7390>
Date: Mon, 8 Jul 2024 11:38:46 +0200
From: Kory Maincent <kory.maincent@...tlin.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Donald Hunter
 <donald.hunter@...il.com>, Oleksij Rempel <o.rempel@...gutronix.de>,
 Jonathan Corbet <corbet@....net>, Thomas Petazzoni
 <thomas.petazzoni@...tlin.com>, linux-kernel@...r.kernel.org,
 netdev@...r.kernel.org, Dent Project <dentproject@...uxfoundation.org>,
 kernel@...gutronix.de, linux-doc@...r.kernel.org
Subject: Re: [PATCH net-next v6 5/7] net: ethtool: Add new power limit get
 and set features

On Fri, 5 Jul 2024 18:41:16 -0700
Jakub Kicinski <kuba@...nel.org> wrote:

> On Thu, 04 Jul 2024 10:12:00 +0200 Kory Maincent wrote:
> > +	if (tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL] ||
> > +	    tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]) {
> > +		struct pse_control_config config = {};
> > +
> > +		if (pse_has_podl(phydev->psec))
> > +			config.podl_admin_control =
> > nla_get_u32(tb[ETHTOOL_A_PODL_PSE_ADMIN_CONTROL]);
> > +		if (pse_has_c33(phydev->psec))
> > +			config.c33_admin_control =
> > nla_get_u32(tb[ETHTOOL_A_C33_PSE_ADMIN_CONTROL]);  
> 
> This smells of null-deref if user only passes one of the attributes.
> But the fix should probably be in ethnl_set_pse_validate() so it won't
> conflict (I'm speculating that it will need to go to net).

Mmh, indeed if the netlink PSE type attribute is different with the supported
PSE type we might have an issue here.

I am wondering, if I fix it in net won't it conflict with net-next now that
this series is merged?

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