提交 46cdedf2 编写于 作者: J Jakub Kicinski 提交者: David S. Miller

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: 18ff0bcd ("ethtool: add interface to interact with Ethernet Power Equipment")
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
Reviewed-by: NOleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e840d8f4
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册