syzbot


BUG: corrupted list in klist_dec_and_del

Status: upstream: reported C repro on 2020/11/02 15:23
Reported-by: syzbot+096e2d3f6cc43bf20205@syzkaller.appspotmail.com
First crash: 600d, last: 368d

Fix bisection: the fix commit could be any of (bisect log):
  27ce4f2a6817 Linux 4.14.206
  964f3712e6a7 Linux 4.14.240
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: corrupted list in klist_dec_and_del C inconclusive inconclusive 1 386d 442d 0/22 upstream: reported C repro on 2021/04/09 12:29
linux-4.19 BUG: corrupted list in klist_dec_and_del C error 1 274d 575d 0/1 upstream: reported C repro on 2020/11/28 07:47

Sample crash report:
IPVS: ftp: loaded support on port[0] = 21
list_del corruption. prev->next should be ffff8880b37e7820, but was ffff8880af630338
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:51!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 7983 Comm: syz-executor938 Not tainted 4.14.206-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880b2ea0480 task.stack: ffff8880b3d98000
RIP: 0010:__list_del_entry_valid.cold+0xf/0x55 lib/list_debug.c:51
RSP: 0018:ffff8880b3d9fa10 EFLAGS: 00010286
RAX: 0000000000000054 RBX: ffff8880af630301 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff878bb940 RDI: ffffed10167b3f38
RBP: ffff8880b37e7820 R08: 0000000000000054 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880b3839ba0
R13: ffff8880b3839ba0 R14: ffff888095650e80 R15: 0000000000000000
FS:  0000000001a57880(0000) GS:ffff8880ba400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000200 CR3: 0000000008e6a000 CR4: 00000000001406f0
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+0x7b/0x460 lib/klist.c:207
 klist_put+0x71/0x140 lib/klist.c:218
 device_del+0x12d/0xa80 drivers/base/core.c:2046
 hci_conn_del_sysfs+0xca/0x160 net/bluetooth/hci_sysfs.c:78
 hci_conn_cleanup+0x216/0x500 net/bluetooth/hci_conn.c:128
 hci_conn_del+0x253/0x6f0 net/bluetooth/hci_conn.c:611
 hci_conn_hash_flush+0x19c/0x260 net/bluetooth/hci_conn.c:1394
 hci_dev_do_close+0x535/0xca0 net/bluetooth/hci_core.c:1620
 hci_unregister_dev+0x17f/0x8c0 net/bluetooth/hci_core.c:3191
 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354
 __fput+0x25f/0x7a0 fs/file_table.c:210
 task_work_run+0x11f/0x190 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xa08/0x27f0 kernel/exit.c:865
 do_group_exit+0x100/0x2e0 kernel/exit.c:962
 SYSC_exit_group kernel/exit.c:973 [inline]
 SyS_exit_group+0x19/0x20 kernel/exit.c:971
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x445098
RSP: 002b:00007fff37dc1468 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 0000000000445098
RDX: 0000000000000001 RSI: 000000000000003c RDI: 0000000000000001
RBP: 00000000004ccdf0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000015 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006e0200 R14: 0000000000000000 R15: 0000000000000000
Code: 87 e8 0c 06 24 fe 0f 0b 48 89 f1 48 c7 c7 60 ce cc 87 4c 89 e6 e8 f8 05 24 fe 0f 0b 48 89 ee 48 c7 c7 00 d0 cc 87 e8 e7 05 24 fe <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 40 cf cc 87 e8 d3 05 24 fe 0f 
RIP: __list_del_entry_valid.cold+0xf/0x55 lib/list_debug.c:51 RSP: ffff8880b3d9fa10
---[ end trace bfce0647d1db5d95 ]---

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2020/11/12 18:20 linux-4.14.y 27ce4f2a6817 77a55c8e .config log report syz C
ci2-linux-4-14 2020/11/02 15:22 linux-4.14.y 2b7915014161 8bc4594f .config log report syz C