[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <6bb97c2304d9ab499c2831855f6bf3f6ee2b8676.1673913385.git.piergiorgio.beruto@gmail.com>
Date: Tue, 17 Jan 2023 00:57:19 +0100
From: Piergiorgio Beruto <piergiorgio.beruto@...il.com>
To: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Oleksij Rempel <o.rempel@...gutronix.de>,
mailhol.vincent@...adoo.fr, sudheer.mogilappagari@...el.com,
sbhatta@...vell.com, linux-doc@...r.kernel.org,
wangjie125@...wei.com, corbet@....net, lkp@...el.com,
gal@...dia.com, gustavoars@...nel.org, bagasdotme@...il.com
Subject: [PATCH net-next 1/1] ethtool/plca: fix potential NULL pointer access
Fix problem found by syzbot dereferencing a device pointer.
Signed-off-by: Piergiorgio Beruto <piergiorgio.beruto@...il.com>
Reported-by: syzbot+8cf35743af243e5f417e@...kaller.appspotmail.com
Fixes: 8580e16c28f3 ("net/ethtool: add netlink interface for the PLCA RS")
---
net/ethtool/plca.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ethtool/plca.c b/net/ethtool/plca.c
index be7404dc9ef2..bc3d31f99998 100644
--- a/net/ethtool/plca.c
+++ b/net/ethtool/plca.c
@@ -155,6 +155,8 @@ int ethnl_set_plca_cfg(struct sk_buff *skb, struct genl_info *info)
return ret;
dev = req_info.dev;
+ if(!dev)
+ return -ENODEV;
rtnl_lock();
--
2.37.4
Powered by blists - more mailing lists