syzbot


BUG: corrupted list in klist_dec_and_del

Status: auto-obsoleted due to no activity on 2023/01/26 07:44
Subsystems: bluetooth
[Documentation on labels]
Reported-by: syzbot+f9f9397a8879e0b3cecc@syzkaller.appspotmail.com
First crash: 1289d, last: 748d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: BUG: corrupted list in kobject_add_internal (log)
Repro: C syz .config
  
Fix bisection the fix commit could be any of (bisect log):
  e49d033bddf5 Linux 5.12-rc6
  a180bd1d7e16 iov_iter: remove uaccess_kernel() warning from iov_iter_init()
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] BUG: corrupted list in klist_dec_and_del 0 (1) 2021/04/09 12:29
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 753d 1443d 0/1 upstream: reported C repro on 2020/11/02 15:23
linux-4.19 BUG: corrupted list in klist_dec_and_del C error 5 753d 1417d 0/1 upstream: reported C repro on 2020/11/28 07:47
linux-4.19 KASAN: use-after-free Read in klist_dec_and_del C error 3 889d 1166d 0/1 upstream: reported C repro on 2021/08/06 19:37
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/01/06 08:31 18m retest repro upstream OK log
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2021/07/05 05:33 29m bisect fix upstream OK (2) job log
2021/06/05 05:09 23m bisect fix upstream OK (0) job log log
2021/05/05 12:38 22m bisect fix upstream OK (0) job log log

Sample crash report:
IPVS: ftp: loaded support on port[0] = 21
list_del corruption. prev->next should be ffff888018a74c68, but was ffff88801263b440
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:53!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8361 Comm: syz-executor523 Not tainted 5.12.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__list_del_entry_valid+0xe1/0x100 lib/list_debug.c:51
Code: 72 b0 87 fd 0f 0b 48 c7 c7 80 a0 11 8a 4c 89 f6 31 c0 e8 5f b0 87 fd 0f 0b 48 c7 c7 e0 a0 11 8a 4c 89 f6 31 c0 e8 4c b0 87 fd <0f> 0b 48 c7 c7 40 a1 11 8a 4c 89 f6 31 c0 e8 39 b0 87 fd 0f 0b 66
RSP: 0000:ffffc900010bf9c8 EFLAGS: 00010246
RAX: 0000000000000054 RBX: ffff88801191b468 RCX: ae24f9509f195200
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff8160b612 R09: ffffed1017385fe8
R10: ffffed1017385fe8 R11: 0000000000000000 R12: dffffc0000000000
R13: ffff888018a74c68 R14: ffff888018a74c68 R15: ffff88801191b468
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9f12a2cbb0 CR3: 00000000213fc000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __list_del_entry include/linux/list.h:132 [inline]
 list_del include/linux/list.h:146 [inline]
 klist_release lib/klist.c:189 [inline]
 kref_put include/linux/kref.h:65 [inline]
 klist_dec_and_del+0x9c/0x430 lib/klist.c:206
 klist_put lib/klist.c:217 [inline]
 klist_del+0xa0/0x100 lib/klist.c:230
 device_del+0x29e/0xa90 drivers/base/core.c:3400
 hci_conn_del_sysfs+0xeb/0x190 net/bluetooth/hci_sysfs.c:78
 hci_conn_cleanup+0x495/0x640 net/bluetooth/hci_conn.c:138
 hci_conn_del+0x2ae/0x3b0 net/bluetooth/hci_conn.c:678
 hci_conn_hash_flush+0x1bd/0x240 net/bluetooth/hci_conn.c:1599
 hci_dev_do_close+0xa04/0xfe0 net/bluetooth/hci_core.c:1778
 hci_unregister_dev+0x301/0x18a0 net/bluetooth/hci_core.c:3989
 vhci_release+0x73/0xc0 drivers/bluetooth/hci_vhci.c:340
 __fput+0x352/0x7b0 fs/file_table.c:280
 task_work_run+0x146/0x1c0 kernel/task_work.c:140
 exit_task_work include/linux/task_work.h:30 [inline]
 do_exit+0x6b2/0x2290 kernel/exit.c:825
 do_group_exit+0x168/0x2d0 kernel/exit.c:922
 __do_sys_exit_group+0x13/0x20 kernel/exit.c:933
 __se_sys_exit_group+0x10/0x10 kernel/exit.c:931
 __x64_sys_exit_group+0x37/0x40 kernel/exit.c:931
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4443c9
Code: Unable to access opcode bytes at RIP 0x44439f.
RSP: 002b:00007ffff06d1d58 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00000000004cb370 RCX: 00000000004443c9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 0000000000000001 R08: ffffffffffffffb8 R09: 000000ff004c5fe0
R10: 00007ffff06d1820 R11: 0000000000000246 R12: 00000000004cb370
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
Modules linked in:
---[ end trace d8c06b4c2761f315 ]---
RIP: 0010:__list_del_entry_valid+0xe1/0x100 lib/list_debug.c:51
Code: 72 b0 87 fd 0f 0b 48 c7 c7 80 a0 11 8a 4c 89 f6 31 c0 e8 5f b0 87 fd 0f 0b 48 c7 c7 e0 a0 11 8a 4c 89 f6 31 c0 e8 4c b0 87 fd <0f> 0b 48 c7 c7 40 a1 11 8a 4c 89 f6 31 c0 e8 39 b0 87 fd 0f 0b 66
RSP: 0000:ffffc900010bf9c8 EFLAGS: 00010246
RAX: 0000000000000054 RBX: ffff88801191b468 RCX: ae24f9509f195200
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff8160b612 R09: ffffed1017385fe8
R10: ffffed1017385fe8 R11: 0000000000000000 R12: dffffc0000000000
R13: ffff888018a74c68 R14: ffff888018a74c68 R15: ffff88801191b468
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9f12a2cbb0 CR3: 000000000c48e000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/05 12:24 upstream e49d033bddf5 6a81331a .config console log report syz C ci-upstream-kasan-gce-smack-root BUG: corrupted list in klist_dec_and_del
2022/09/28 07:44 upstream 46452d3786a8 75c78242 .config console log report info ci-upstream-kasan-gce-smack-root KASAN: use-after-free Read in klist_dec_and_del
2022/09/15 00:36 upstream 3245cb65fd91 b884348d .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-smack-root KASAN: use-after-free Read in klist_dec_and_del
* Struck through repros no longer work on HEAD.