summaryrefslogtreecommitdiffstats
path: root/net/ethtool/pse-pd.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-10-20 00:35:51 +0200
committerDavid S. Miller <davem@davemloft.net>2022-10-21 14:18:05 +0200
commit46cdedf2a0fa20a99ca8be40bccde7487e13b77a (patch)
tree5e361a52619c0adedfae96200ed879dccdf46802 /net/ethtool/pse-pd.c
parentnfc: virtual_ncidev: Fix memory leak in virtual_nci_send() (diff)
downloadlinux-46cdedf2a0fa20a99ca8be40bccde7487e13b77a.tar.xz
linux-46cdedf2a0fa20a99ca8be40bccde7487e13b77a.zip
ethtool: pse-pd: fix null-deref on genl_info in dump
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> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ethtool/pse-pd.c2
1 files changed, 1 insertions, 1 deletions
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);