syzbot


BUG: corrupted list in klist_release

Status: upstream: reported C repro on 2020/12/15 22:34
Reported-by: syzbot+676530ea9d4736aad21c@syzkaller.appspotmail.com
First crash: 724d, last: 66d

Cause bisection: introduced by (bisect log) [merge commit]:
commit e812bd905a5cf00fea95da9df4889dad63d4a36a
Author: David S. Miller <davem@davemloft.net>
Date: Sat Sep 17 13:53:29 2016 +0000

  Merge tag 'wireless-drivers-next-for-davem-2016-09-15' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Crash: general protection fault in batadv_iv_ogm_queue_add (log)
Repro: C syz .config

Fix bisection: the fix commit could be any of (bisect log):
  d2b6f8a17919 Merge tag 'xfs-5.13-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
  f55966571d5e Merge tag 'drm-next-2021-07-08-1' of git://anongit.freedesktop.org/drm/drm

Sample crash report:
IPVS: ftp: loaded support on port[0] = 21
list_del corruption. prev->next should be ffff888025585c68, but was ffff88801cf6ec40
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:51!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8389 Comm: syz-executor170 Not tainted 5.12.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__list_del_entry_valid.cold+0xf/0x4a lib/list_debug.c:51
Code: e8 91 a1 f2 ff 0f 0b 48 89 f1 48 c7 c7 c0 f5 c1 89 4c 89 e6 e8 7d a1 f2 ff 0f 0b 48 89 ee 48 c7 c7 60 f7 c1 89 e8 6c a1 f2 ff <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 a0 f6 c1 89 e8 58 a1 f2 ff 0f 0b
RSP: 0018:ffffc90001397928 EFLAGS: 00010282
RAX: 0000000000000054 RBX: 0000000000000001 RCX: 0000000000000000
RDX: ffff888027b30040 RSI: ffffffff815bb075 RDI: fffff52000272f17
RBP: ffff888025585c68 R08: 0000000000000054 R09: 0000000000000000
R10: ffffffff815b4eae R11: 0000000000000000 R12: ffff888015c96868
R13: ffff888015c96868 R14: ffff888025585c60 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005590d06d3b38 CR3: 00000000246a5000 CR4: 00000000001506e0
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+0x66/0x480 lib/klist.c:189
 kref_put include/linux/kref.h:65 [inline]
 klist_dec_and_del lib/klist.c:206 [inline]
 klist_put+0xf7/0x1d0 lib/klist.c:217
 device_del+0x245/0xd40 drivers/base/core.c:3486
 hci_conn_del_sysfs+0xdc/0x180 net/bluetooth/hci_sysfs.c:78
 hci_conn_cleanup+0x2e7/0x6c0 net/bluetooth/hci_conn.c:138
 hci_conn_del+0x2a0/0x790 net/bluetooth/hci_conn.c:678
 hci_conn_hash_flush+0x19c/0x260 net/bluetooth/hci_conn.c:1599
 hci_dev_do_close+0x569/0x1110 net/bluetooth/hci_core.c:1778
 hci_unregister_dev+0x263/0x1130 net/bluetooth/hci_core.c:3989
 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:340
 __fput+0x288/0x920 fs/file_table.c:280
 task_work_run+0xdd/0x1a0 kernel/task_work.c:161
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0xbfc/0x2a60 kernel/exit.c:826
 do_group_exit+0x125/0x310 kernel/exit.c:923
 __do_sys_exit_group kernel/exit.c:934 [inline]
 __se_sys_exit_group kernel/exit.c:932 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:932
 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4443b9
Code: Unable to access opcode bytes at RIP 0x44438f.
RSP: 002b:00007ffee83852d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00000000004cb370 RCX: 00000000004443b9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 0000000000000001 R08: ffffffffffffffb8 R09: 000000ff004c5fe0
R10: 00007ffee8384da0 R11: 0000000000000246 R12: 00000000004cb370
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
Modules linked in:
---[ end trace a27fd10b9de818c0 ]---
RIP: 0010:__list_del_entry_valid.cold+0xf/0x4a lib/list_debug.c:51
Code: e8 91 a1 f2 ff 0f 0b 48 89 f1 48 c7 c7 c0 f5 c1 89 4c 89 e6 e8 7d a1 f2 ff 0f 0b 48 89 ee 48 c7 c7 60 f7 c1 89 e8 6c a1 f2 ff <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 a0 f6 c1 89 e8 58 a1 f2 ff 0f 0b
RSP: 0018:ffffc90001397928 EFLAGS: 00010282
RAX: 0000000000000054 RBX: 0000000000000001 RCX: 0000000000000000
RDX: ffff888027b30040 RSI: ffffffff815bb075 RDI: fffff52000272f17
RBP: ffff888025585c68 R08: 0000000000000054 R09: 0000000000000000
R10: ffffffff815b4eae R11: 0000000000000000 R12: ffff888015c96868
R13: ffff888015c96868 R14: ffff888025585c60 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005590d06d3b38 CR3: 00000000246a5000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (34):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2021/05/02 21:32 upstream d2b6f8a17919 77e2b668 .config log report syz C BUG: corrupted list in klist_release
ci-upstream-kasan-gce-root 2021/04/04 21:31 upstream 2023a53bdf41 6a81331a .config log report syz C BUG: corrupted list in klist_release
ci-upstream-linux-next-kasan-gce-root 2021/05/09 05:47 linux-next 869a85b925fc bc5434be .config log report syz C BUG: corrupted list in klist_release
ci-upstream-kasan-gce 2020/12/11 22:27 upstream 33dc9614dc20 ba24ffcd .config log report syz C
ci-upstream-kasan-gce 2022/09/22 07:10 upstream 06f7db949993 60af5050 .config log report info BUG: corrupted list in klist_release
ci-upstream-kasan-gce 2022/09/05 11:09 upstream 7e18e42e4b28 922294ab .config log report info BUG: corrupted list in klist_release
ci-upstream-kasan-gce 2022/09/27 03:58 upstream 3800a713b607 10323ddf .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce-root 2022/09/24 15:39 upstream a63f2e7cb110 0042f2b4 .config log report info KASAN: use-after-free Read in klist_release
ci-qemu-upstream 2022/09/24 03:54 upstream 1707c39ae309 0042f2b4 .config log report info KASAN: use-after-free Read in klist_release
ci-qemu-upstream 2022/09/22 23:50 upstream dc164f4fb00a 0042f2b4 .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce-selinux-root 2022/09/22 14:07 upstream dc164f4fb00a 60af5050 .config log report info KASAN: use-after-free Read in klist_release
ci-qemu-upstream 2022/09/22 08:04 upstream 06f7db949993 60af5050 .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce-root 2022/09/17 07:28 upstream a335366bad13 dd9a85ff .config log report info KASAN: use-after-free Read in klist_release
ci-qemu-upstream 2022/09/17 02:06 upstream 6879c2d3b960 dd9a85ff .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce 2022/09/15 00:57 upstream 3245cb65fd91 b884348d .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce 2022/09/12 22:27 upstream 80e78fcce86d f371ed7e .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce 2022/09/12 15:27 upstream 80e78fcce86d 356d8217 .config log report info KASAN: use-after-free Read in klist_release
ci-qemu-upstream 2022/09/11 02:06 upstream b96fbd602d35 356d8217 .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce-selinux-root 2022/09/11 01:17 upstream b96fbd602d35 356d8217 .config log report info KASAN: use-after-free Read in klist_release
ci-qemu-upstream 2022/09/05 01:56 upstream 7726d4c3e60b 28811d0a .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce-selinux-root 2022/09/05 01:52 upstream 7726d4c3e60b 28811d0a .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce-root 2022/09/05 01:51 upstream 7e18e42e4b28 28811d0a .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce 2022/09/05 01:44 upstream 7726d4c3e60b 28811d0a .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce-root 2022/09/04 14:22 upstream 7726d4c3e60b 28811d0a .config log report info KASAN: use-after-free Read in klist_release
ci-qemu-upstream 2022/09/02 00:13 upstream 2880e1a175b9 86c46e46 .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce-386 2022/09/30 23:07 upstream 5a77386984b5 feb56351 .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce-386 2022/09/24 01:01 upstream 1707c39ae309 0042f2b4 .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-kasan-gce-386 2022/09/22 09:37 upstream 06f7db949993 60af5050 .config log report info KASAN: use-after-free Read in klist_release
ci-qemu-upstream-386 2022/09/22 07:17 upstream 06f7db949993 60af5050 .config log report info KASAN: use-after-free Read in klist_release
ci-qemu-upstream-386 2022/09/05 02:12 upstream 7726d4c3e60b 28811d0a .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-linux-next-kasan-gce-root 2022/09/17 02:00 linux-next e47eb90a0a9a dd9a85ff .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-linux-next-kasan-gce-root 2022/09/05 02:14 linux-next e47eb90a0a9a 28811d0a .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-linux-next-kasan-gce-root 2022/08/26 03:08 linux-next b5d939c95186 9b5bf4cd .config log report info KASAN: use-after-free Read in klist_release
ci-upstream-linux-next-kasan-gce-root 2022/08/12 03:06 linux-next 6c8f479764eb 787ed7e0 .config log report info KASAN: use-after-free Read in klist_release
* Struck through repros no longer work on HEAD.