syzbot


BUG: corrupted list in klist_dec_and_del

Status: upstream: reported C repro on 2020/11/28 07:47
Reported-by: syzbot+0ac8a639b2205bce1576@syzkaller.appspotmail.com
First crash: 1484d, last: 819d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 BUG: corrupted list in klist_dec_and_del C inconclusive 3 819d 1509d 0/1 upstream: reported C repro on 2020/11/02 15:23
upstream BUG: corrupted list in klist_dec_and_del bluetooth C inconclusive inconclusive 3 815d 1352d 0/28 auto-obsoleted due to no activity on 2023/01/26 07:44
linux-4.19 KASAN: use-after-free Read in klist_dec_and_del C error 3 955d 1232d 0/1 upstream: reported C repro on 2021/08/06 19:37
Fix bisection attempts (11)
Created Duration User Patch Repo Result
2021/10/28 16:15 14m bisect fix linux-4.19.y error job log
2021/09/24 16:13 37m bisect fix linux-4.19.y OK (0) job log log
2021/08/25 15:24 23m bisect fix linux-4.19.y OK (0) job log log
2021/07/26 14:57 26m bisect fix linux-4.19.y OK (0) job log log
2021/06/26 14:28 29m bisect fix linux-4.19.y OK (0) job log log
2021/05/27 13:59 28m bisect fix linux-4.19.y OK (0) job log log
2021/04/27 12:23 27m bisect fix linux-4.19.y OK (0) job log log
2021/03/28 09:38 22m bisect fix linux-4.19.y OK (0) job log log
2021/02/26 09:11 23m bisect fix linux-4.19.y OK (0) job log log
2021/01/27 08:38 25m bisect fix linux-4.19.y OK (0) job log log
2020/12/28 07:47 24m bisect fix linux-4.19.y OK (0) job log log

Sample crash report:
IPVS: ftp: loaded support on port[0] = 21
list_del corruption. prev->next should be ffff8880b52b6ae0, but was ffff8880a4478338
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:51!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8140 Comm: syz-executor242 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:__list_del_entry_valid.cold+0xf/0x4a lib/list_debug.c:51
Code: e8 25 43 f7 ff 0f 0b 48 89 f1 48 c7 c7 a0 e2 b3 88 4c 89 e6 e8 11 43 f7 ff 0f 0b 48 89 ee 48 c7 c7 40 e4 b3 88 e8 00 43 f7 ff <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 80 e3 b3 88 e8 ec 42 f7 ff 0f 0b
RSP: 0018:ffff8880b0c079d0 EFLAGS: 00010282
RAX: 0000000000000054 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff814dff01 RDI: ffffed1016180f2c
RBP: ffff8880b52b6ae0 R08: 0000000000000054 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff8880b52ba2e0
R13: ffff8880b52ba2e0 R14: ffff8880b05bc600 R15: 0000000000000000
FS:  00005555558c7300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff575e29fa8 CR3: 0000000009e6d000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __list_del_entry include/linux/list.h:117 [inline]
 list_del include/linux/list.h:125 [inline]
 klist_release lib/klist.c:190 [inline]
 kref_put include/linux/kref.h:70 [inline]
 klist_dec_and_del+0x97/0x480 lib/klist.c:207
 klist_put+0x7a/0x150 lib/klist.c:218
 device_del+0x162/0xaf0 drivers/base/core.c:2321
 hci_conn_del_sysfs+0xdc/0x180 net/bluetooth/hci_sysfs.c:78
 hci_conn_cleanup+0x24b/0x550 net/bluetooth/hci_conn.c:128
 hci_conn_del+0x2a0/0x780 net/bluetooth/hci_conn.c:611
 hci_conn_hash_flush+0x19c/0x260 net/bluetooth/hci_conn.c:1513
 hci_dev_do_close+0x6bc/0x1020 net/bluetooth/hci_core.c:1687
 hci_unregister_dev+0x14f/0x460 net/bluetooth/hci_core.c:3288
 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354
 __fput+0x2ce/0x890 fs/file_table.c:278
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xbf3/0x2be0 kernel/exit.c:870
 do_group_exit+0x125/0x310 kernel/exit.c:967
 __do_sys_exit_group kernel/exit.c:978 [inline]
 __se_sys_exit_group kernel/exit.c:976 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:976
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7ff575dd3519
Code: Bad RIP value.
RSP: 002b:00007ffca110e5b8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007ff575e5d390 RCX: 00007ff575dd3519
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 0000000000000001 R08: ffffffffffffffb8 R09: 00007ffca110e080
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff575e5d390
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
Modules linked in:
---[ end trace 209878e20da47e23 ]---
RIP: 0010:__list_del_entry_valid.cold+0xf/0x4a lib/list_debug.c:51
Code: e8 25 43 f7 ff 0f 0b 48 89 f1 48 c7 c7 a0 e2 b3 88 4c 89 e6 e8 11 43 f7 ff 0f 0b 48 89 ee 48 c7 c7 40 e4 b3 88 e8 00 43 f7 ff <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 80 e3 b3 88 e8 ec 42 f7 ff 0f 0b
RSP: 0018:ffff8880b0c079d0 EFLAGS: 00010282
RAX: 0000000000000054 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff814dff01 RDI: ffffed1016180f2c
RBP: ffff8880b52b6ae0 R08: 0000000000000054 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff8880b52ba2e0
R13: ffff8880b52ba2e0 R14: ffff8880b05bc600 R15: 0000000000000000
FS:  00005555558c7300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff575dd34ef CR3: 0000000009e6d000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/24 00:07 linux-4.19.y 3f8a27f9e27b 0042f2b4 .config console log report syz C ci2-linux-4-19 BUG: corrupted list in klist_dec_and_del
2020/11/28 07:46 linux-4.19.y 0c88e405c97e 486f93ef .config console log report syz C ci2-linux-4-19
2022/09/11 11:56 linux-4.19.y 3f8a27f9e27b 356d8217 .config console log report info ci2-linux-4-19 BUG: corrupted list in klist_dec_and_del
2022/09/11 11:43 linux-4.19.y 3f8a27f9e27b 356d8217 .config console log report info ci2-linux-4-19 BUG: corrupted list in klist_dec_and_del
2022/08/17 15:41 linux-4.19.y 3f8a27f9e27b 4e72d229 .config console log report info ci2-linux-4-19 BUG: corrupted list in klist_dec_and_del
* Struck through repros no longer work on HEAD.