netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <syzbot+de1c7d68a10e3f123bdd@syzkaller.appspotmail.com>
Cc: <cratiu@nvidia.com>, <davem@davemloft.net>, <edumazet@google.com>,
	<horms@kernel.org>, <kuba@kernel.org>, <kuniyu@amazon.com>,
	<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<pabeni@redhat.com>, <sdf@fomichev.me>,
	<syzkaller-bugs@googlegroups.com>
Subject: Re: [syzbot] [net?] general protection fault in rtnl_create_link
Date: Sun, 13 Apr 2025 19:30:46 -0700	[thread overview]
Message-ID: <20250414023048.44721-1-kuniyu@amazon.com> (raw)
In-Reply-To: <67fc6f85.050a0220.2970f9.039e.GAE@google.com>

From: syzbot <syzbot+de1c7d68a10e3f123bdd@syzkaller.appspotmail.com>
Date: Sun, 13 Apr 2025 19:14:29 -0700
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    eaa517b77e63 ethtool: cmis_cdb: Fix incorrect read / write..
> git tree:       net
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=1541f23f980000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=f2054704dd53fb80
> dashboard link: https://syzkaller.appspot.com/bug?extid=de1c7d68a10e3f123bdd
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1429874c580000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1353f74c580000
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/8ff6a34dbd2f/disk-eaa517b7.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/80dc0689a89b/vmlinux-eaa517b7.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/093b749f228d/bzImage-eaa517b7.xz
> 
> The issue was bisected to:
> 
> commit 04efcee6ef8d0f01eef495db047e7216d6e6e38f
> Author: Stanislav Fomichev <sdf@fomichev.me>
> Date:   Fri Apr 4 16:11:22 2025 +0000
> 
>     net: hold instance lock during NETDEV_CHANGE
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=151db7e4580000
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=171db7e4580000
> console output: https://syzkaller.appspot.com/x/log.txt?x=131db7e4580000
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+de1c7d68a10e3f123bdd@syzkaller.appspotmail.com
> Fixes: 04efcee6ef8d ("net: hold instance lock during NETDEV_CHANGE")
> 
> netlink: 4 bytes leftover after parsing attributes in process `syz-executor402'.
> netlink: 'syz-executor402': attribute type 15 has an invalid length.
> Oops: general protection fault, probably for non-canonical address 0xdffffc0000000055: 0000 [#1] SMP KASAN PTI
> KASAN: null-ptr-deref in range [0x00000000000002a8-0x00000000000002af]
> CPU: 0 UID: 0 PID: 5841 Comm: syz-executor402 Not tainted 6.14.0-syzkaller-13348-geaa517b77e63 #0 PREEMPT(full) 
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
> RIP: 0010:netdev_need_ops_lock include/net/netdev_lock.h:33 [inline]
> RIP: 0010:netdev_lock_ops include/net/netdev_lock.h:41 [inline]
> RIP: 0010:rtnl_create_link+0x6af/0xea0 net/core/rtnetlink.c:3680

#syz test

diff --git a/include/net/netdev_lock.h b/include/net/netdev_lock.h
index 5706835a660c..270e157a4a79 100644
--- a/include/net/netdev_lock.h
+++ b/include/net/netdev_lock.h
@@ -30,7 +30,8 @@ static inline bool netdev_need_ops_lock(const struct net_device *dev)
 	bool ret = dev->request_ops_lock || !!dev->queue_mgmt_ops;
 
 #if IS_ENABLED(CONFIG_NET_SHAPER)
-	ret |= !!dev->netdev_ops->net_shaper_ops;
+	if (dev->netdev_ops)
+		ret |= !!dev->netdev_ops->net_shaper_ops;
 #endif
 
 	return ret;


  reply	other threads:[~2025-04-14  2:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-14  2:14 [syzbot] [net?] general protection fault in rtnl_create_link syzbot
2025-04-14  2:30 ` Kuniyuki Iwashima [this message]
2025-04-14  3:07   ` syzbot
2025-04-14 17:37   ` Jakub Kicinski
2025-04-14 18:01     ` Kuniyuki Iwashima
2025-04-14 18:15       ` Jakub Kicinski
2025-04-14 18:23         ` Kuniyuki Iwashima

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250414023048.44721-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=cratiu@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=syzbot+de1c7d68a10e3f123bdd@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).