syzbot


KASAN: use-after-free Write in detach_if_pending (2)

Status: premoderation: reported on 2025/06/06 23:25
Reported-by: syzbot+7130f0814f3661965e91@syzkaller.appspotmail.com
First crash: 393d, last: 15d
Similar bugs (9)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 KASAN: use-after-free Write in detach_if_pending 22 C 1618 404d 1240d 0/2 upstream: reported C repro on 2023/02/10 18:19
upstream KASAN: use-after-free Write in detach_if_pending net 22 C 4169 3178d 3173d 3/29 fixed on 2017/11/28 03:36
android-6-1 KASAN: use-after-free Write in detach_if_pending 22 5 502d 624d 0/2 auto-obsoleted due to no activity on 2025/05/18 23:57
upstream general protection fault in detach_if_pending (2) net 2 1 1575d 1575d 0/29 auto-closed as invalid on 2022/06/11 02:46
linux-4.14 general protection fault in detach_if_pending (2) 2 1 1885d 1885d 0/1 auto-closed as invalid on 2021/09/04 11:36
upstream general protection fault in detach_if_pending (3) fs kvm 2 5 740d 740d 0/29 closed as invalid on 2024/08/16 18:25
upstream KASAN: invalid-access Write in detach_if_pending wireguard -1 2 1965d 1966d 0/29 auto-closed as invalid on 2021/05/17 08:51
upstream KASAN: slab-use-after-free Write in detach_if_pending batman wireguard 22 2 1157d 1166d 0/29 auto-obsoleted due to no activity on 2023/11/08 05:10
android-54 BUG: Bad page map (4) -1 18 416d 516d 0/2 auto-obsoleted due to no activity on 2025/08/04 13:44

Sample crash report:
bridge0: port 2(bridge_slave_1) entered disabled state
bridge0: port 1(bridge_slave_0) entered disabled state
==================================================================
BUG: KASAN: use-after-free in __hlist_del include/linux/list.h:884 [inline]
BUG: KASAN: use-after-free in detach_timer kernel/time/timer.c:886 [inline]
BUG: KASAN: use-after-free in detach_if_pending+0x158/0x300 kernel/time/timer.c:905
Write of size 8 at addr ffff88810cf489f8 by task syz.7.440/1904

CPU: 0 PID: 1904 Comm: syz.7.440 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x24 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x71/0x200 mm/kasan/report.c:316
 print_report+0x4a/0x60 mm/kasan/report.c:420
 kasan_report+0x122/0x150 mm/kasan/report.c:524
 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report_generic.c:356
 __hlist_del include/linux/list.h:884 [inline]
 detach_timer kernel/time/timer.c:886 [inline]
 detach_if_pending+0x158/0x300 kernel/time/timer.c:905
 try_to_del_timer_sync kernel/time/timer.c:1365 [inline]
 del_timer_sync+0x136/0x1a0 kernel/time/timer.c:1515
 wg_timers_stop+0x49/0x60 drivers/net/wireguard/timers.c:241
 wg_stop+0x81/0x5d0 drivers/net/wireguard/device.c:123
 __dev_close_many+0x293/0x360 net/core/dev.c:1593
 __dev_close net/core/dev.c:1605 [inline]
 __dev_change_flags+0x2d7/0x6b0 net/core/dev.c:8690
 dev_change_flags+0x80/0x1a0 net/core/dev.c:8763
 do_setlink+0xc02/0x2a10 net/core/rtnetlink.c:2836
 rtnl_group_changelink net/core/rtnetlink.c:3364 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3621 [inline]
 rtnl_newlink+0x10b3/0x20d0 net/core/rtnetlink.c:3658
 rtnetlink_rcv_msg+0xb28/0xde0 net/core/rtnetlink.c:6153
 netlink_rcv_skb+0x200/0x450 net/netlink/af_netlink.c:2521
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6171
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x8c1/0xa60 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x8b9/0xbd0 net/netlink/af_netlink.c:1873
 sock_sendmsg_nosec net/socket.c:716 [inline]
 __sock_sendmsg net/socket.c:728 [inline]
 ____sys_sendmsg+0x5fb/0x9c0 net/socket.c:2508
 ___sys_sendmsg+0x2a2/0x360 net/socket.c:2562
 __sys_sendmsg net/socket.c:2591 [inline]
 __do_sys_sendmsg net/socket.c:2600 [inline]
 __se_sys_sendmsg net/socket.c:2598 [inline]
 __x64_sys_sendmsg+0x20d/0x2e0 net/socket.c:2598
 x64_sys_call+0x171/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f54e519ce59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f54e60cd028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f54e5415fa0 RCX: 00007f54e519ce59
RDX: 0000000000000000 RSI: 0000200000000200 RDI: 0000000000000006
RBP: 00007f54e5232e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f54e5416038 R14: 00007f54e5415fa0 R15: 00007fff9e457de8
 </TASK>

Allocated by task 1851:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505
 ____kasan_kmalloc mm/kasan/common.c:380 [inline]
 __kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389
 kasan_kmalloc include/linux/kasan.h:212 [inline]
 __do_kmalloc_node mm/slab_common.c:938 [inline]
 __kmalloc+0xb4/0x1e0 mm/slab_common.c:951
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 hci_alloc_dev_priv+0x27/0x1bd0 net/bluetooth/hci_core.c:2433
 hci_alloc_dev include/net/bluetooth/hci_core.h:1505 [inline]
 hci_uart_register_dev drivers/bluetooth/hci_ldisc.c:641 [inline]
 hci_uart_set_proto drivers/bluetooth/hci_ldisc.c:719 [inline]
 hci_uart_tty_ioctl+0x3c4/0xa40 drivers/bluetooth/hci_ldisc.c:774
 tty_ioctl+0x8ef/0xc60 drivers/tty/tty_io.c:2785
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0x12f/0x1b0 fs/ioctl.c:856
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:856
 x64_sys_call+0x58b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Freed by task 1851:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516
 ____kasan_slab_free+0x132/0x180 mm/kasan/common.c:242
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:250
 kasan_slab_free include/linux/kasan.h:178 [inline]
 slab_free_hook mm/slub.c:1750 [inline]
 slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776
 slab_free mm/slub.c:3712 [inline]
 __kmem_cache_free+0xb7/0x1b0 mm/slub.c:3728
 kfree+0x6f/0xf0 mm/slab_common.c:990
 hci_release_dev+0x12a3/0x13b0 net/bluetooth/hci_core.c:2761
 bt_host_release+0x82/0x90 net/bluetooth/hci_sysfs.c:85
 device_release+0xa4/0x1d0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:681 [inline]
 kobject_release lib/kobject.c:712 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x19d/0x280 lib/kobject.c:729
 put_device+0x1f/0x30 drivers/base/core.c:3806
 hci_dev_put include/net/bluetooth/hci_core.h:1465 [inline]
 hci_dev_cmd+0x279/0x740 net/bluetooth/hci_core.c:795
 hci_sock_ioctl+0x41e/0x7f0 net/bluetooth/hci_sock.c:1096
 sock_do_ioctl+0x114/0x330 net/socket.c:1191
 sock_ioctl+0x475/0x700 net/socket.c:1310
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0x12f/0x1b0 fs/ioctl.c:856
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:856
 x64_sys_call+0x58b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46
 __kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486
 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496
 insert_work+0x51/0x300 kernel/workqueue.c:1368
 __queue_work+0x9d0/0xd50 kernel/workqueue.c:1527
 queue_work_on+0xde/0x150 kernel/workqueue.c:1555
 queue_work include/linux/workqueue.h:510 [inline]
 hci_cmd_sync_run net/bluetooth/hci_sync.c:140 [inline]
 __hci_cmd_sync_sk+0xaa8/0xd80 net/bluetooth/hci_sync.c:162
 __hci_cmd_sync_status_sk net/bluetooth/hci_sync.c:253 [inline]
 __hci_cmd_sync_status net/bluetooth/hci_sync.c:277 [inline]
 hci_cmd_sync_status+0x53/0x120 net/bluetooth/hci_sync.c:288
 hci_dev_cmd+0x357/0x740 net/bluetooth/hci_core.c:749
 hci_sock_ioctl+0x41e/0x7f0 net/bluetooth/hci_sock.c:1096
 sock_do_ioctl+0x114/0x330 net/socket.c:1191
 sock_ioctl+0x475/0x700 net/socket.c:1310
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0x12f/0x1b0 fs/ioctl.c:856
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:856
 x64_sys_call+0x58b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Second to last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46
 __kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486
 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496
 insert_work+0x51/0x300 kernel/workqueue.c:1368
 __queue_work+0x9d0/0xd50 kernel/workqueue.c:1527
 queue_work_on+0xde/0x150 kernel/workqueue.c:1555
 queue_work include/linux/workqueue.h:510 [inline]
 hci_cmd_timeout+0x191/0x200 net/bluetooth/hci_core.c:1468
 process_one_work+0x717/0xc30 kernel/workqueue.c:2302
 worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
 kthread+0x281/0x320 kernel/kthread.c:386
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

The buggy address belongs to the object at ffff88810cf48000
 which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 2552 bytes inside of
 8192-byte region [ffff88810cf48000, ffff88810cf4a000)

The buggy address belongs to the physical page:
page:ffffea000433d200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10cf48
head:ffffea000433d200 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100043500
raw: 0000000000000000 0000000000020002 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2000(__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 1920078787, free_ts 0
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2672
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2679
 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4586
 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5930
 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
 allocate_slab mm/slub.c:1967 [inline]
 new_slab+0x98/0x3e0 mm/slub.c:2020
 ___slab_alloc+0x70f/0xb70 mm/slub.c:3177
 __slab_alloc+0x5e/0xa0 mm/slub.c:3263
 slab_alloc_node mm/slub.c:3348 [inline]
 __kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423
 __do_kmalloc_node mm/slab_common.c:937 [inline]
 __kmalloc_node+0xa2/0x1e0 mm/slab_common.c:945
 kmalloc_node include/linux/slab.h:589 [inline]
 kvmalloc_node+0x28a/0x460 mm/util.c:592
 kvzalloc_node include/linux/slab.h:720 [inline]
 sbitmap_init_node+0x443/0x580 lib/sbitmap.c:113
 scsi_realloc_sdev_budget_map+0x26d/0x3e0 drivers/scsi/scsi_scan.c:246
 scsi_alloc_sdev+0x7f2/0xac0 drivers/scsi/scsi_scan.c:357
 scsi_probe_and_add_lun+0x18f/0x3ce0 drivers/scsi/scsi_scan.c:1185
 __scsi_scan_target+0x1ea/0xc20 drivers/scsi/scsi_scan.c:1721
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88810cf48880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88810cf48900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88810cf48980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                                ^
 ffff88810cf48a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88810cf48a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (22):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/06/19 23:25 android14-6.1 9f35ca3ff66c 43bfcdb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/06/03 03:04 android14-6.1 80aded6fbb9d 3c0d2131 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/05/17 23:24 android14-6.1 75487b40c943 de5aae85 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/05/04 06:10 android14-6.1 1e4e23ff0f90 a0d91488 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/04/21 22:12 android14-6.1 69e1e941dbe1 0b6ab7ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/04/21 18:07 android14-6.1 69e1e941dbe1 0b6ab7ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/04/10 05:46 android14-6.1 b1e92db6a41f 38c8e246 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/03/17 08:45 android14-6.1 299d5eca2e4a c01bca74 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/02/24 10:46 android14-6.1 34c1a8e17200 96b1aa46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/02/20 06:35 android14-6.1 edbe3e111301 17d780d6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/02/19 22:50 android14-6.1 edbe3e111301 c8d8c52d .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/02/15 19:17 android14-6.1 edbe3e111301 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/02/15 12:47 android14-6.1 edbe3e111301 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/02/11 18:10 android14-6.1 edbe3e111301 75707236 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/01/26 10:22 android14-6.1 5b3c238664a9 a4c52dd6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/01/23 18:23 android14-6.1 d1c598f45d0f e2b1b6e6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/01/20 15:18 android14-6.1 1c6403722ffe 06648d9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2026/01/19 03:14 android14-6.1 37a76cbe8f87 20d37d28 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2025/11/03 08:23 android14-6.1 3e2aa22eb7df 2c50b6a9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2025/10/14 23:06 android14-6.1 c65cfeb3d9b5 b6605ba8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2025/07/20 19:03 android14-6.1 145c7fad733f 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
2025/06/06 23:24 android14-6.1 7af56ffc913d 9fa58bba .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in detach_if_pending
* Struck through repros no longer work on HEAD.