syzbot


general protection fault in netdev_register_kobject

Status: closed as dup on 2023/08/31 14:15
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+d2c31705e468a347e6db@syzkaller.appspotmail.com
First crash: 254d, last: 218d
Cause bisection: introduced by (bisect log) :
commit d21fdd07cea418c0d98c8a15fc95b8b8970801e7
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Thu Aug 17 09:12:21 2023 +0000

  driver core: Return proper error code when dev_set_name() fails

Crash: BUG: unable to handle kernel NULL pointer dereference in netdev_register_kobject (log)
Repro: C syz .config
  
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
general protection fault in nfc_register_device kernel C done 190 142d 255d
Duplicate bugs (4)
duplicates (4):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
general protection fault in rfkill_register kernel C done 17 229d 248d 0/26 closed as dup on 2023/09/04 07:57
general protection fault in evdev_connect kernel C done 23 235d 248d 0/26 closed as dup on 2023/09/04 07:56
general protection fault in tty_register_device_attr kernel C done 74 230d 250d 0/26 closed as dup on 2023/09/03 21:59
general protection fault in loop_add kernel C done 2 249d 248d 0/26 closed as dup on 2023/09/04 07:57
Discussions (2)
Title Replies (including bot) Last reply
Re: [syzbot] [kernel?] general protection fault in netdev_register_kobject 5 (6) 2023/09/01 12:02
[syzbot] [kernel?] general protection fault in netdev_register_kobject 1 (3) 2023/08/31 14:13
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 general protection fault in netdev_register_kobject 1 867d 867d 0/1 auto-closed as invalid on 2022/04/23 17:30
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/08/31 10:52 22m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master OK log

Sample crash report:
RSP: 002b:00007ffe2e4cbc88 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f654ce54ce9
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003
RBP: 0000000000000002 R08: 00007ffe2e4cba26 R09: 0000000100000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 00000000000f4240 R14: 00007ffe2e4cbce0 R15: 0000000000000003
 </TASK>
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 5050 Comm: syz-executor126 Not tainted 6.5.0-syzkaller-11329-g708283abf896 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
RIP: 0010:strchr+0x1b/0xb0 lib/string.c:329
Code: 01 ae f7 48 8b 74 24 08 48 8b 14 24 eb 89 90 f3 0f 1e fa 48 b8 00 00 00 00 00 fc ff df 48 89 fa 55 48 c1 ea 03 53 48 83 ec 10 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 04 84 c0 75 51 0f b6 07 89
RSP: 0018:ffffc90003d9f058 EFLAGS: 00010282
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000025 RDI: 0000000000000000
RBP: ffffc90003d9f0e8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffffc90003d9f0e8
R13: 0000000000000cc0 R14: ffff888145a49c00 R15: 0000000000000001
FS:  0000555555558380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f654ce52ce3 CR3: 000000002921c000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 kvasprintf_const+0x25/0x190 lib/kasprintf.c:45
 kobject_set_name_vargs+0x5a/0x130 lib/kobject.c:272
 kobject_add_varg lib/kobject.c:366 [inline]
 kobject_add+0x12a/0x240 lib/kobject.c:424
 device_add+0x290/0x1ac0 drivers/base/core.c:3560
 netdev_register_kobject+0x183/0x3f0 net/core/net-sysfs.c:2044
 register_netdevice+0xbcb/0x1490 net/core/dev.c:10136
 macvlan_common_newlink+0x1102/0x1a40 drivers/net/macvlan.c:1545
 rtnl_newlink_create net/core/rtnetlink.c:3485 [inline]
 __rtnl_newlink+0x1177/0x1940 net/core/rtnetlink.c:3705
 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3718
 rtnetlink_rcv_msg+0x439/0xd30 net/core/rtnetlink.c:6444
 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545
 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline]
 netlink_unicast+0x536/0x810 net/netlink/af_netlink.c:1368
 netlink_sendmsg+0x93c/0xe40 net/netlink/af_netlink.c:1910
 sock_sendmsg_nosec net/socket.c:730 [inline]
 sock_sendmsg+0xd9/0x180 net/socket.c:753
 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2540
 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2594
 __sys_sendmsg+0x117/0x1e0 net/socket.c:2623
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f654ce54ce9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 d1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe2e4cbc88 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f654ce54ce9
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003
RBP: 0000000000000002 R08: 00007ffe2e4cba26 R09: 0000000100000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 00000000000f4240 R14: 00007ffe2e4cbce0 R15: 0000000000000003
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:strchr+0x1b/0xb0 lib/string.c:329
Code: 01 ae f7 48 8b 74 24 08 48 8b 14 24 eb 89 90 f3 0f 1e fa 48 b8 00 00 00 00 00 fc ff df 48 89 fa 55 48 c1 ea 03 53 48 83 ec 10 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 04 84 c0 75 51 0f b6 07 89
RSP: 0018:ffffc90003d9f058 EFLAGS: 00010282
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000025 RDI: 0000000000000000
RBP: ffffc90003d9f0e8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffffc90003d9f0e8
R13: 0000000000000cc0 R14: ffff888145a49c00 R15: 0000000000000001
FS:  0000555555558380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f654ce52ce3 CR3: 000000002921c000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	01 ae f7 48 8b 74    	add    %ebp,0x748b48f7(%rsi)
   6:	24 08                	and    $0x8,%al
   8:	48 8b 14 24          	mov    (%rsp),%rdx
   c:	eb 89                	jmp    0xffffff97
   e:	90                   	nop
   f:	f3 0f 1e fa          	endbr64
  13:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1a:	fc ff df
  1d:	48 89 fa             	mov    %rdi,%rdx
  20:	55                   	push   %rbp
  21:	48 c1 ea 03          	shr    $0x3,%rdx
  25:	53                   	push   %rbx
  26:	48 83 ec 10          	sub    $0x10,%rsp
* 2a:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax <-- trapping instruction
  2e:	48 89 fa             	mov    %rdi,%rdx
  31:	83 e2 07             	and    $0x7,%edx
  34:	38 d0                	cmp    %dl,%al
  36:	7f 04                	jg     0x3c
  38:	84 c0                	test   %al,%al
  3a:	75 51                	jne    0x8d
  3c:	0f b6 07             	movzbl (%rdi),%eax
  3f:	89                   	.byte 0x89

Crashes (512):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/04 20:58 upstream 708283abf896 8bc9053e .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce general protection fault in netdev_register_kobject
2023/08/29 02:53 linux-next 2ee82481c392 7ba13a15 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in netdev_register_kobject
2023/09/17 00:27 upstream 57d88e8a5974 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root general protection fault in netdev_register_kobject
2023/09/16 07:45 upstream e42bebf6db29 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in netdev_register_kobject
2023/09/15 21:52 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce general protection fault in netdev_register_kobject
2023/09/13 03:24 upstream a747acc0b752 59da8366 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in netdev_register_kobject
2023/09/07 12:28 upstream 7ba2090ca64e 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in netdev_register_kobject
2023/09/05 09:52 upstream 3f86ed6ec0b3 8bc9053e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in netdev_register_kobject
2023/09/15 04:58 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 general protection fault in netdev_register_kobject
2023/09/16 18:56 upstream 57d88e8a5974 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in netdev_register_kobject
2023/09/16 22:32 upstream 57d88e8a5974 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in netdev_register_kobject
2023/10/04 15:39 bpf 9077fc228f09 b7d7ff54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/10/04 04:51 bpf 9077fc228f09 65faba36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/10/03 18:27 bpf 9077fc228f09 65faba36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/10/03 13:03 bpf 9077fc228f09 65faba36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/10/03 04:27 bpf 9077fc228f09 50b20e75 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/10/02 17:29 bpf 9077fc228f09 50b20e75 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/10/02 12:41 bpf d1a783daa443 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/10/02 01:48 bpf d1a783daa443 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/10/01 19:45 bpf d1a783daa443 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/10/01 16:46 bpf d1a783daa443 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/10/01 14:21 bpf d1a783daa443 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/10/01 11:37 bpf d1a783daa443 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/30 21:29 bpf d1a783daa443 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/30 20:17 bpf d1a783daa443 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/30 17:26 bpf d1a783daa443 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/30 15:36 bpf d1a783daa443 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/29 12:48 bpf 81335f90e8a8 d265efd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/29 10:25 bpf 81335f90e8a8 d265efd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/29 09:10 bpf 81335f90e8a8 d265efd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/28 21:50 bpf 81335f90e8a8 c2ab1e5d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/28 12:11 bpf 81335f90e8a8 c2ab1e5d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/27 22:30 bpf 81335f90e8a8 2895a507 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/27 16:35 bpf 81335f90e8a8 2895a507 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/27 05:56 bpf 81335f90e8a8 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/25 17:11 bpf 81335f90e8a8 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/25 11:25 bpf 81335f90e8a8 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/24 05:55 bpf 81335f90e8a8 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/23 20:20 bpf 81335f90e8a8 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/23 08:23 bpf 81335f90e8a8 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/22 20:58 bpf 81335f90e8a8 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/22 13:47 bpf 81335f90e8a8 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce general protection fault in netdev_register_kobject
2023/09/21 16:01 net 49dcffef85cc 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce general protection fault in netdev_register_kobject
2023/09/21 18:29 bpf-next b3af9c0e89ca 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in netdev_register_kobject
2023/09/21 17:28 bpf-next b3af9c0e89ca 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in netdev_register_kobject
2023/09/21 14:28 net-next 71b263e79370 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in netdev_register_kobject
2023/09/21 12:55 net-next 71b263e79370 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in netdev_register_kobject
2023/09/21 10:36 bpf-next b3af9c0e89ca 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in netdev_register_kobject
2023/09/21 10:32 bpf-next b3af9c0e89ca 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in netdev_register_kobject
2023/09/21 03:37 bpf-next aec42f36237b 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in netdev_register_kobject
2023/09/21 01:20 net-next b3af9c0e89ca 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in netdev_register_kobject
2023/09/20 21:59 bpf-next aec42f36237b 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in netdev_register_kobject
2023/09/20 20:39 net-next b3af9c0e89ca 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in netdev_register_kobject
2023/09/20 19:36 bpf-next aec42f36237b 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in netdev_register_kobject
2023/09/20 18:25 bpf-next aec42f36237b 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce general protection fault in netdev_register_kobject
2023/09/20 17:09 net-next b3af9c0e89ca 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in netdev_register_kobject
2023/09/20 15:20 net-next b3af9c0e89ca 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce general protection fault in netdev_register_kobject
2023/09/13 23:12 linux-next 3c13c772fc23 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in netdev_register_kobject
2023/09/07 07:36 upstream 744a759492b5 72324844 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm64 BUG: unable to handle kernel paging request in netdev_register_kobject
* Struck through repros no longer work on HEAD.