[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_674ACC74C977BF672C3C2F37AC97E236F409@qq.com>
Date: Tue, 16 Jan 2024 17:13:31 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+7ec955e36bb239bd720f@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [net?] KASAN: slab-out-of-bounds Read in dsa_user_prechangeupper
please test slab-out-of-bounds Read in dsa_user_prechangeupper
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3e7aeb78ab01
diff --git a/net/dsa/user.c b/net/dsa/user.c
index b738a466e2dc..e6bb2c527067 100644
--- a/net/dsa/user.c
+++ b/net/dsa/user.c
@@ -2865,7 +2865,8 @@ static int dsa_user_changeupper(struct net_device *dev,
static int dsa_user_prechangeupper(struct net_device *dev,
struct netdev_notifier_changeupper_info *info)
{
- struct dsa_port *dp = dsa_user_to_port(dev);
+ const struct rtnl_link_ops *ops = dev->rtnl_link_ops;
+ struct dsa_port *dp = ops->priv_size ? dsa_user_to_port(dev) : NULL;
if (!dsa_user_dev_check(dev))
return NOTIFY_DONE;
Powered by blists - more mailing lists