syzbot


general protection fault in ref_tracker_alloc

Status: fixed on 2022/03/08 16:11
Subsystems: net
[Documentation on labels]
Fix commit: 0976b888a150 ethtool: fix null-ptr-deref on ref tracker
First crash: 1091d, last: 1062d
Cause bisection: introduced by (bisect log) :
commit e4b8954074f6d0db01c8c97d338a67f9389c042f
Author: Eric Dumazet <edumazet@google.com>
Date: Tue Dec 7 01:30:37 2021 +0000

  netlink: add net device refcount tracker to struct ethnl_req_info

Crash: WARNING in ref_tracker_dir_exit (log)
Repro: C syz .config
  

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc00000000ba: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000005d0-0x00000000000005d7]
CPU: 0 PID: 3599 Comm: syz-executor058 Not tainted 5.16.0-rc4-next-20211210-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__lock_acquire+0xd7d/0x54a0 kernel/locking/lockdep.c:4897
Code: 12 0e 41 be 01 00 00 00 0f 86 c8 00 00 00 89 05 99 83 12 0e e9 bd 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 f3 2f 00 00 48 81 3b 60 54 1a 8f 0f 84 52 f3 ff
RSP: 0018:ffffc90001a5f0b0 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: 00000000000005d0 RCX: 0000000000000000
RDX: 00000000000000ba RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 000000000008808a R12: 0000000000000000
R13: ffff88801fef9d40 R14: 0000000000000000 R15: 0000000000000001
FS:  00005555561ae300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000440 CR3: 000000007a88b000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 lock_acquire kernel/locking/lockdep.c:5639 [inline]
 lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5604
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
 ref_tracker_alloc+0x17c/0x430 lib/ref_tracker.c:84
 netdev_tracker_alloc include/linux/netdevice.h:3860 [inline]
 ethnl_parse_header_dev_get+0x267/0x780 net/ethtool/netlink.c:145
 ethnl_default_parse+0x8d/0x130 net/ethtool/netlink.c:316
 ethnl_default_start+0x21f/0x560 net/ethtool/netlink.c:545
 genl_start+0x3cc/0x670 net/netlink/genetlink.c:596
 __netlink_dump_start+0x584/0x900 net/netlink/af_netlink.c:2361
 genl_family_rcv_msg_dumpit+0x1c9/0x310 net/netlink/genetlink.c:689
 genl_family_rcv_msg net/netlink/genetlink.c:772 [inline]
 genl_rcv_msg+0x434/0x580 net/netlink/genetlink.c:792
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2492
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:803
 netlink_unicast_kernel net/netlink/af_netlink.c:1315 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1341
 netlink_sendmsg+0x904/0xdf0 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:724
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fd00a282b19
Code: 28 c3 e8 5a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd2edea278 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd00a282b19
RDX: 0000000000000000 RSI: 0000000020000780 RDI: 0000000000000003
RBP: 00007fd00a246580 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fd00a246610
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 54093e60f68f8975 ]---
RIP: 0010:__lock_acquire+0xd7d/0x54a0 kernel/locking/lockdep.c:4897
Code: 12 0e 41 be 01 00 00 00 0f 86 c8 00 00 00 89 05 99 83 12 0e e9 bd 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 f3 2f 00 00 48 81 3b 60 54 1a 8f 0f 84 52 f3 ff
RSP: 0018:ffffc90001a5f0b0 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: 00000000000005d0 RCX: 0000000000000000
RDX: 00000000000000ba RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 000000000008808a R12: 0000000000000000
R13: ffff88801fef9d40 R14: 0000000000000000 R15: 0000000000000001
FS:  00005555561ae300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000440 CR3: 000000007a88b000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	12 0e                	adc    (%rsi),%cl
   2:	41 be 01 00 00 00    	mov    $0x1,%r14d
   8:	0f 86 c8 00 00 00    	jbe    0xd6
   e:	89 05 99 83 12 0e    	mov    %eax,0xe128399(%rip)        # 0xe1283ad
  14:	e9 bd 00 00 00       	jmpq   0xd6
  19:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  20:	fc ff df
  23:	48 89 da             	mov    %rbx,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 f3 2f 00 00    	jne    0x3027
  34:	48 81 3b 60 54 1a 8f 	cmpq   $0xffffffff8f1a5460,(%rbx)
  3b:	0f                   	.byte 0xf
  3c:	84 52 f3             	test   %dl,-0xd(%rdx)
  3f:	ff                   	.byte 0xff

Crashes (679):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/15 01:02 linux-next ea922272cbe5 d018dd31 .config console log report syz C ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/11 11:25 upstream fe8152b38d3a 1884f55a .config console log report info ci-qemu-upstream general protection fault in ref_tracker_alloc
2022/01/11 10:49 upstream fe8152b38d3a 1884f55a .config console log report info ci-qemu-upstream general protection fault in ref_tracker_alloc
2022/01/11 09:47 upstream fe8152b38d3a 1884f55a .config console log report info ci-qemu-upstream general protection fault in ref_tracker_alloc
2022/01/11 08:34 upstream fe8152b38d3a 1884f55a .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in ref_tracker_alloc
2022/01/11 12:55 net-old 7d6019b602de 1884f55a .config console log report info ci-upstream-net-this-kasan-gce general protection fault in ref_tracker_alloc
2022/01/11 08:05 net-old 7d6019b602de 1884f55a .config console log report info ci-upstream-net-this-kasan-gce general protection fault in ref_tracker_alloc
2022/01/11 07:05 net-old 7d6019b602de ddb0ab8c .config console log report info ci-upstream-net-this-kasan-gce general protection fault in ref_tracker_alloc
2022/01/11 18:32 net-next-old fe8152b38d3a 1884f55a .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/11 17:29 net-next-old fe8152b38d3a 1884f55a .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/11 15:40 net-next-old fe8152b38d3a 1884f55a .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/11 01:50 net-next-old 8aaaf2f3af2a ddb0ab8c .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/10 20:38 net-next-old 8aaaf2f3af2a ddb0ab8c .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/10 16:56 net-next-old 8aaaf2f3af2a 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/10 15:00 net-next-old 8aaaf2f3af2a 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/10 13:18 net-next-old 8aaaf2f3af2a 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/10 11:35 net-next-old 8aaaf2f3af2a 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/10 07:03 net-next-old 8aaaf2f3af2a 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/10 04:14 net-next-old d5c8725cc913 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/10 00:54 net-next-old d5c8725cc913 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/09 22:23 net-next-old d5c8725cc913 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/09 18:54 net-next-old d5c8725cc913 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/09 17:30 net-next-old d5c8725cc913 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/09 10:04 net-next-old 82192cb497f9 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/09 08:11 net-next-old 82192cb497f9 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/08 17:49 net-next-old 82192cb497f9 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/08 05:42 net-next-old 82192cb497f9 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/07 22:53 net-next-old ca1a6705b271 2ca0d385 .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/07 12:33 net-next-old e4a3d6a6a19a 6acc789a .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/07 09:24 net-next-old e4a3d6a6a19a 6acc789a .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/06 19:39 net-next-old 710ad98c363a 6acc789a .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/06 16:38 net-next-old 4e023b44d5ce 6acc789a .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/06 13:57 net-next-old 4e023b44d5ce 6acc789a .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/06 02:18 net-next-old c5bcdd8228d8 6acc789a .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/05 14:27 net-next-old ffd32ea6b13c 0a2584dd .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/05 12:33 net-next-old ffd32ea6b13c 0a2584dd .config console log report info ci-upstream-net-kasan-gce general protection fault in ref_tracker_alloc
2022/01/11 13:58 linux-next a70bf4a85b43 1884f55a .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/11 03:39 linux-next 57c149e506d5 ddb0ab8c .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/10 07:51 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/09 01:48 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/08 18:57 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/08 14:18 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/08 13:31 linux-next b8170452cd51 2ca0d385 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/07 07:55 linux-next 3770333b3f8c 6acc789a .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/06 23:18 linux-next 3770333b3f8c 6acc789a .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/06 22:16 linux-next 3770333b3f8c 6acc789a .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/06 05:18 linux-next 7a769a3922d8 6acc789a .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/06 04:13 linux-next 7a769a3922d8 6acc789a .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2022/01/04 20:42 linux-next 6b8d4927540e 0a2584dd .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
2021/12/14 00:32 linux-next ea922272cbe5 5d14b1ea .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in ref_tracker_alloc
* Struck through repros no longer work on HEAD.