[PATCH net-next] net: ethtool: phy: Check the req_info.pdn field for GET commands
Maxime Chevallier
maxime.chevallier at bootlin.com
Wed Sep 11 01:33:22 PDT 2024
Hi Eric,
On Wed, 11 Sep 2024 09:26:23 +0200
Eric Dumazet <edumazet at google.com> wrote:
> On Tue, Sep 10, 2024 at 7:46 PM Maxime Chevallier
> <maxime.chevallier at bootlin.com> wrote:
> >
> > When processing the netlink GET requests to get PHY info, the req_info.pdn
> > pointer is NULL when no PHY matches the requested parameters, such as when
> > the phy_index is invalid, or there's simply no PHY attached to the
> > interface.
> >
> > Therefore, check the req_info.pdn pointer for NULL instead of
> > dereferencing it.
> >
> > Suggested-by: Eric Dumazet <edumazet at google.com>
> > Reported-by: Eric Dumazet <edumazet at google.com>
> > Closes: https://lore.kernel.org/netdev/CANn89iKRW0WpGAh1tKqY345D8WkYCPm3Y9ym--Si42JZrQAu1g@mail.gmail.com/T/#mfced87d607d18ea32b3b4934dfa18d7b36669285
> > Fixes: 17194be4c8e1 ("net: ethtool: Introduce a command to list PHYs on an interface")
> > Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
> > ---
>
> Thanks, there is another issue found by syzbot BTW (one imbalanced netdev_put())
Sorry for asking that, but I missed the report from this current patch,
as well as the one you're referring to. I've looked-up the netdev
archive and the syzbot web interface [1] and found no reports for both
issues. I am clearly not looking at the right place, and/or I probably
need to open my eyes a bit more.
Can you point me to the report in question ?
[1] : https://syzkaller.appspot.com/upstream/s/net
>
> Reviewed-by: Eric Dumazet <edumazet at google.com>
Thanks for the review,
Maxime
More information about the linux-arm-kernel
mailing list