From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com,
syzbot+81c4b4bbba6eea2cfcae@syzkaller.appspotmail.com,
andrew@lunn.ch, linux@rempel-privat.de, bagasdotme@gmail.com,
lkp@intel.com
Subject: Re: [PATCH net] ethtool: pse-pd: fix null-deref on genl_info in dump
Date: Thu, 20 Oct 2022 06:37:46 +0200 [thread overview]
Message-ID: <20221020043746.GB28729@pengutronix.de> (raw)
In-Reply-To: <20221019223551.1171204-1-kuba@kernel.org>
On Wed, Oct 19, 2022 at 03:35:51PM -0700, Jakub Kicinski wrote:
> ethnl_default_dump_one() passes NULL as info.
>
> It's correct not to set extack during dump, as we should just
> silently skip interfaces which can't provide the information.
>
> Reported-by: syzbot+81c4b4bbba6eea2cfcae@syzkaller.appspotmail.com
> Fixes: 18ff0bcda6d1 ("ethtool: add interface to interact with Ethernet Power Equipment")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: andrew@lunn.ch
> CC: linux@rempel-privat.de
> CC: bagasdotme@gmail.com
> CC: lkp@intel.com
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Thank you!
> ---
> net/ethtool/pse-pd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ethtool/pse-pd.c b/net/ethtool/pse-pd.c
> index 5a471e115b66..e8683e485dc9 100644
> --- a/net/ethtool/pse-pd.c
> +++ b/net/ethtool/pse-pd.c
> @@ -64,7 +64,7 @@ static int pse_prepare_data(const struct ethnl_req_info *req_base,
> if (ret < 0)
> return ret;
>
> - ret = pse_get_pse_attributes(dev, info->extack, data);
> + ret = pse_get_pse_attributes(dev, info ? info->extack : NULL, data);
>
> ethnl_ops_complete(dev);
>
> --
> 2.37.3
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2022-10-20 4:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 22:35 [PATCH net] ethtool: pse-pd: fix null-deref on genl_info in dump Jakub Kicinski
2022-10-20 4:37 ` Oleksij Rempel [this message]
2022-10-21 12:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221020043746.GB28729@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=bagasdotme@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux@rempel-privat.de \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+81c4b4bbba6eea2cfcae@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.