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: <c6df7040-40d2-46e0-b8f3-a28227d2d98c@microchip.com>
Date: Fri, 28 Feb 2025 06:19:18 +0000
From: <Parthiban.Veerasooran@...rochip.com>
To: <maxime.chevallier@...tlin.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<thomas.petazzoni@...tlin.com>, <linux-arm-kernel@...ts.infradead.org>,
	<christophe.leroy@...roup.eu>, <herve.codina@...tlin.com>,
	<f.fainelli@...il.com>, <vladimir.oltean@....com>,
	<kory.maincent@...tlin.com>, <o.rempel@...gutronix.de>, <horms@...nel.org>,
	<romain.gantois@...tlin.com>, <piergiorgio.beruto@...il.com>,
	<davem@...emloft.net>, <andrew@...n.ch>, <kuba@...nel.org>,
	<edumazet@...gle.com>, <pabeni@...hat.com>, <hkallweit1@...il.com>
Subject: Re: [PATCH net 0/2] net: ethtool: netlink: Fix notifications for

Hi Maxime,

I did a quick test with your patches and it seems working fine without 
kernel crash.

Best regards,
Parthiban V
On 27/02/25 11:54 pm, Maxime Chevallier wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> It has been found (thanks to Parthiban) that the PLCA ethtool commands
> were failing since 6.12, due to the phy_link_topology work. This was
> traced back to the ethnl notifications mechanism, in which calls to
> ethnl_req_get_phydev() crashed in the notification path following a
> ->set request.
> 
> The typical callsite for ethnl_req_get_phydev() looks like :
> 
>      phydev = ethnl_req_get_phydev(req_base, tb[ETHTOOL_A_XXX_HEADER],
>                                    info->extack);
> 
> as 'tb' is NULL in the notification path for the ->prepare_data ethnl
> ops, this causes crashes. The solution for that is to change the
> prototype of ethnl_req_get_phydev() to perform checks inside the helper
> (patch 1).
> 
> While investigating that, I realised that the notification path for PHYs
> is not correct anyways. As we don't have a netlink request to parse, we
> can't know for sure which PHY the notification event targets in the case
> of a notification following a ->set request.
> 
> Patch 2 introduces a context structure that is used between ->set
> requests and the followup notification, to keep track of the PHY that
> the original request targeted for the notification.
> 
> Thanks Parthiban for the report (not on netdev@ though).
> 
> Maxime
> 
> Maxime Chevallier (2):
>    net: ethtool: netlink: Allow NULL nlattrs when getting a phy_device
>    net: ethtool: netlink: Pass a context for default ethnl notifications
> 
>   net/ethtool/cabletest.c |  8 ++++----
>   net/ethtool/linkstate.c |  2 +-
>   net/ethtool/netlink.c   | 21 +++++++++++++++++----
>   net/ethtool/netlink.h   |  5 +++--
>   net/ethtool/phy.c       |  2 +-
>   net/ethtool/plca.c      |  6 +++---
>   net/ethtool/pse-pd.c    |  4 ++--
>   net/ethtool/stats.c     |  2 +-
>   net/ethtool/strset.c    |  2 +-
>   9 files changed, 33 insertions(+), 19 deletions(-)
> 
> --
> 2.48.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ