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: <20240910192020.5ab9cd16@fedora.home>
Date: Tue, 10 Sep 2024 19:20:20 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com, Andrew Lunn
 <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
 <pabeni@...hat.com>, Russell King <linux@...linux.org.uk>,
 linux-arm-kernel@...ts.infradead.org, Christophe Leroy
 <christophe.leroy@...roup.eu>, Herve Codina <herve.codina@...tlin.com>,
 Florian Fainelli <f.fainelli@...il.com>, Heiner Kallweit
 <hkallweit1@...il.com>, Vladimir Oltean <vladimir.oltean@....com>,
 Köry Maincent <kory.maincent@...tlin.com>, Jesse Brandeburg
 <jesse.brandeburg@...el.com>, Marek Behún
 <kabel@...nel.org>, Piergiorgio Beruto <piergiorgio.beruto@...il.com>,
 Oleksij Rempel <o.rempel@...gutronix.de>, Nicolò Veronese
 <nicveronese@...il.com>, Simon Horman <horms@...nel.org>,
 mwojtas@...omium.org, Nathan Chancellor <nathan@...nel.org>, Antoine Tenart
 <atenart@...nel.org>, Marc Kleine-Budde <mkl@...gutronix.de>, Dan Carpenter
 <dan.carpenter@...aro.org>, Romain Gantois <romain.gantois@...tlin.com>
Subject: Re: [PATCH net-next v18 07/13] net: ethtool: Introduce a command to
 list PHYs on an interface

Hello Eric,

On Tue, 10 Sep 2024 18:41:03 +0200
Eric Dumazet <edumazet@...gle.com> wrote:

> > +int ethnl_phy_doit(struct sk_buff *skb, struct genl_info *info)
> > +{
> > +       struct phy_req_info req_info = {};
> > +       struct nlattr **tb = info->attrs;
> > +       struct sk_buff *rskb;
> > +       void *reply_payload;
> > +       int reply_len;
> > +       int ret;
> > +
> > +       ret = ethnl_parse_header_dev_get(&req_info.base,
> > +                                        tb[ETHTOOL_A_PHY_HEADER],
> > +                                        genl_info_net(info), info->extack,
> > +                                        true);
> > +       if (ret < 0)
> > +               return ret;
> > +
> > +       rtnl_lock();
> > +
> > +       ret = ethnl_phy_parse_request(&req_info.base, tb, info->extack);
> > +       if (ret < 0)
> > +               goto err_unlock_rtnl;
> > +
> > +       /* No PHY, return early */  
> 
> I got a syzbot report here.

I seem to have missed the report, sorry about that.

> 
> Should we fix this with :
> 
> diff --git a/net/ethtool/phy.c b/net/ethtool/phy.c
> index 560dd039c6625ac0925a0f28c14ce77cf768b6a5..4ef7c6e32d1087dc71acb467f9cd2ab8faf4dc39
> 100644
> --- a/net/ethtool/phy.c
> +++ b/net/ethtool/phy.c
> @@ -164,7 +164,7 @@ int ethnl_phy_doit(struct sk_buff *skb, struct
> genl_info *info)
>                 goto err_unlock_rtnl;
> 
>         /* No PHY, return early */
> -       if (!req_info.pdn->phy)
> +       if (!req_info.pdn)
>                 goto err_unlock_rtnl;
> 
>         ret = ethnl_phy_reply_size(&req_info.base, info->extack);
> 
> 

Indeed that's the correct fix. Should I send it ? ( including
suggested-by/reported-by )

Thanks,

Maxime

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ