* [PATCH net] ethtool: pse-pd: fix null-deref on genl_info in dump
@ 2022-10-19 22:35 Jakub Kicinski
2022-10-20 4:37 ` Oleksij Rempel
2022-10-21 12:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2022-10-19 22:35 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, Jakub Kicinski,
syzbot+81c4b4bbba6eea2cfcae, andrew, linux, bagasdotme, lkp
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
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] ethtool: pse-pd: fix null-deref on genl_info in dump
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
2022-10-21 12:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Oleksij Rempel @ 2022-10-20 4:37 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, syzbot+81c4b4bbba6eea2cfcae,
andrew, linux, bagasdotme, lkp
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 |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] ethtool: pse-pd: fix null-deref on genl_info in dump
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
@ 2022-10-21 12:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-10-21 12:30 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, syzbot+81c4b4bbba6eea2cfcae,
andrew, linux, bagasdotme, lkp
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Wed, 19 Oct 2022 15:35:51 -0700 you 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>
>
> [...]
Here is the summary with links:
- [net] ethtool: pse-pd: fix null-deref on genl_info in dump
https://git.kernel.org/netdev/net/c/46cdedf2a0fa
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-21 12:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-10-21 12:30 ` patchwork-bot+netdevbpf
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.