syzbot


general protection fault in klist_iter_exit

Status: fixed on 2021/12/20 18:14
Reported-by: syzbot+f9f76f4a0766420b4a02@syzkaller.appspotmail.com
Fix commit: c602863ad28e nfc: fix segfault in nfc_genl_dump_devices_done
First crash: 894d, last: 858d
Cause bisection: failed (error log, bisect log)
  
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 5.15 00/42] 5.15.9-rc1 review 52 (52) 2022/01/07 10:57
[PATCH 4.19 00/56] 4.19.222-rc1 review 66 (66) 2021/12/22 07:54
[PATCH 4.14 00/45] 4.14.259-rc1 review 48 (48) 2021/12/21 23:12
[PATCH 4.9 00/31] 4.9.294-rc1 review 36 (36) 2021/12/21 23:12
[PATCH 4.4 00/23] 4.4.296-rc1 review 28 (28) 2021/12/21 23:11
[PATCH 5.4 00/18] 5.4.166-rc1 review 24 (24) 2021/12/17 00:53
[PATCH 5.10 00/33] 5.10.86-rc1 review 42 (42) 2021/12/16 18:07
[PATCH] nfc: fix segfault in nfc_genl_dump_devices_done 3 (3) 2021/12/09 16:00
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 general protection fault in klist_iter_exit 1 865d 865d 0/1 auto-closed as invalid on 2022/04/04 03:07
linux-4.19 general protection fault in klist_iter_exit C error 89 597d 1101d 0/1 upstream: reported C repro on 2021/04/12 19:06
android-54 general protection fault in klist_iter_exit 1 846d 846d 0/2 auto-closed as invalid on 2022/04/22 15:11
upstream general protection fault in klist_iter_exit net nfc C unreliable inconclusive 54 831d 1138d 0/26 auto-obsoleted due to no activity on 2022/09/16 23:48

Sample crash report:
Code: 47 01 00 85 c0 b8 00 00 00 00 48 0f 44 c3 5b c3 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe8f7e4098 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f35603a9ad9
RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000004
RBP: 00007ffe8f7e40b0 R08: 0000000000000001 R09: 00007ffe8f7e4140
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
R13: 0000000000000000 R14: 00007ffe8f7e40b0 R15: 0000000000000000
general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 1 PID: 366 Comm: syz-executor000 Not tainted 5.10.83-syzkaller-00311-g6e6898e23cab #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:klist_iter_exit+0x2b/0x100 lib/klist.c:313
Code: 48 89 e5 41 57 41 56 41 55 41 54 53 50 49 89 ff 49 bc 00 00 00 00 00 fc ff df e8 d0 7b fa fe 49 83 c7 08 4d 89 fd 49 c1 ed 03 <43> 80 7c 25 00 00 74 08 4c 89 ff e8 45 50 34 ff 4d 8b 37 4d 85 f6
RSP: 0018:ffffc90000ba71f8 EFLAGS: 00010202
RAX: ffffffff82726000 RBX: 0000000000000000 RCX: ffff8881071dcf00
RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000000
RBP: ffffc90000ba7228 R08: dffffc0000000000 R09: fffff52000174e3d
R10: fffff52000174e3d R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000001 R14: ffff8881049f1398 R15: 0000000000000008
FS:  0000555556e2a300(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000100 CR3: 000000011cde1000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 class_dev_iter_exit+0x15/0x20 drivers/base/class.c:330
 nfc_device_iter_exit net/nfc/nfc.h:121 [inline]
 nfc_genl_dump_devices_done+0x3b/0x50 net/nfc/netlink.c:639
 genl_lock_done+0x84/0xd0 net/netlink/genetlink.c:636
 netlink_dump+0x90a/0xc30 net/netlink/af_netlink.c:2311
 __netlink_dump_start+0x5ba/0x7d0 net/netlink/af_netlink.c:2381
 genl_family_rcv_msg_dumpit net/netlink/genetlink.c:686 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:780 [inline]
 genl_rcv_msg+0xbe1/0x1480 net/netlink/genetlink.c:800
 netlink_rcv_skb+0x200/0x470 net/netlink/af_netlink.c:2502
 genl_rcv+0x28/0x40 net/netlink/genetlink.c:811
 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
 netlink_unicast+0x814/0x9f0 net/netlink/af_netlink.c:1337
 netlink_sendmsg+0xa20/0xe00 net/netlink/af_netlink.c:1927
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 ____sys_sendmsg+0x5b9/0x910 net/socket.c:2343
 ___sys_sendmsg net/socket.c:2397 [inline]
 __sys_sendmsg+0x384/0x470 net/socket.c:2430
 __do_sys_sendmsg net/socket.c:2439 [inline]
 __se_sys_sendmsg net/socket.c:2437 [inline]
 __x64_sys_sendmsg+0x7f/0x90 net/socket.c:2437
 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f35603a9ad9
Code: 47 01 00 85 c0 b8 00 00 00 00 48 0f 44 c3 5b c3 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe8f7e4098 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f35603a9ad9
RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000004
RBP: 00007ffe8f7e40b0 R08: 0000000000000001 R09: 00007ffe8f7e4140
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
R13: 0000000000000000 R14: 00007ffe8f7e40b0 R15: 0000000000000000
Modules linked in:
---[ end trace ab1a67f7f7a6f4cf ]---
RIP: 0010:klist_iter_exit+0x2b/0x100 lib/klist.c:313
Code: 48 89 e5 41 57 41 56 41 55 41 54 53 50 49 89 ff 49 bc 00 00 00 00 00 fc ff df e8 d0 7b fa fe 49 83 c7 08 4d 89 fd 49 c1 ed 03 <43> 80 7c 25 00 00 74 08 4c 89 ff e8 45 50 34 ff 4d 8b 37 4d 85 f6
RSP: 0018:ffffc90000ba71f8 EFLAGS: 00010202
RAX: ffffffff82726000 RBX: 0000000000000000 RCX: ffff8881071dcf00
RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000000
RBP: ffffc90000ba7228 R08: dffffc0000000000 R09: fffff52000174e3d
R10: fffff52000174e3d R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000001 R14: ffff8881049f1398 R15: 0000000000000008
FS:  0000555556e2a300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f35603be4e0 CR3: 000000011cde1000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	47 01 00             	rex.RXB add %r8d,(%r8)
   3:	85 c0                	test   %eax,%eax
   5:	b8 00 00 00 00       	mov    $0x0,%eax
   a:	48 0f 44 c3          	cmove  %rbx,%rax
   e:	5b                   	pop    %rbx
   f:	c3                   	retq
  10:	90                   	nop
  11:	48 89 f8             	mov    %rdi,%rax
  14:	48 89 f7             	mov    %rsi,%rdi
  17:	48 89 d6             	mov    %rdx,%rsi
  1a:	48 89 ca             	mov    %rcx,%rdx
  1d:	4d 89 c2             	mov    %r8,%r10
  20:	4d 89 c8             	mov    %r9,%r8
  23:	4c 8b 4c 24 08       	mov    0x8(%rsp),%r9
  28:	0f 05                	syscall
* 2a:	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax <-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	retq
  33:	48 c7 c1 c0 ff ff ff 	mov    $0xffffffffffffffc0,%rcx
  3a:	f7 d8                	neg    %eax
  3c:	64 89 01             	mov    %eax,%fs:(%rcx)
  3f:	48                   	rex.W

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/07 23:35 android12-5.10-lts 6e6898e23cab 0230ba3e .config console log report syz C ci2-android-5-10 general protection fault in klist_iter_exit
2021/12/07 11:49 android12-5.10-lts 6e6898e23cab 0230ba3e .config console log report syz C ci2-android-5-10 general protection fault in klist_iter_exit
2021/12/11 12:28 android12-5.10-lts e2aed161fc26 49ca1f59 .config console log report info ci2-android-5-10 general protection fault in klist_iter_exit
2021/12/07 05:31 android12-5.10-lts 6e6898e23cab 0230ba3e .config console log report info ci2-android-5-10 general protection fault in klist_iter_exit
2021/11/05 05:15 android12-5.10-lts 76698ea35fd3 4c1be0be .config console log report info ci2-android-5-10 general protection fault in klist_iter_exit
* Struck through repros no longer work on HEAD.