KASAN: slab-use-after-free Read in hci_cmd_timeout

Status: upstream: reported on 2026/05/21 13:13
Reported-by: syzbot+634ac5df6d1363cb70da@syzkaller.appspotmail.com
First crash: 84d, last: 9d14h
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in hci_cmd_timeout bluetooth 19 28 733d 880d 0/29 auto-obsoleted due to no activity on 2024/10/24 09:00
linux-4.19 KASAN: use-after-free Read in hci_cmd_timeout 19 syz error 17 1291d 2539d 0/1 upstream: reported syz repro on 2019/09/01 02:37
android-5-10 KASAN: use-after-free Read in hci_cmd_timeout 19 1 1262d 1262d 0/2 auto-obsoleted due to no activity on 2023/05/29 20:38
linux-6.1 KASAN: use-after-free Read in hci_cmd_timeout 19 4 640d 732d 0/3 auto-obsoleted due to no activity on 2025/02/19 13:57
linux-4.14 KASAN: use-after-free Read in hci_cmd_timeout 19 syz, C inconclusive 11 1669d 2533d 0/1 upstream: reported C repro on 2019/09/06 20:31
upstream KASAN: use-after-free Read in hci_cmd_timeout 19 syz, C done error 371 1343d 2655d 22/29 fixed on 2023/04/12 21:18

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in hci_cmd_timeout+0x1d0/0x1e0 net/bluetooth/hci_core.c:1463
Read of size 2 at addr ffff888075dcf678 by task kworker/u5:2/29778

CPU: 1 PID: 29778 Comm: kworker/u5:2 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: hci1 hci_cmd_timeout
Call Trace:
 <TASK>
 dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:364 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:468
 kasan_report+0x117/0x150 mm/kasan/report.c:581
 hci_cmd_timeout+0x1d0/0x1e0 net/bluetooth/hci_core.c:1463
 process_one_work kernel/workqueue.c:2657 [inline]
 process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2734
 worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2815
 kthread+0x2fa/0x390 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
 </TASK>

Allocated by task 29778:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:329
 kasan_slab_alloc include/linux/kasan.h:188 [inline]
 slab_post_alloc_hook+0x6a/0x4d0 mm/slab.h:770
 slab_alloc_node mm/slub.c:3495 [inline]
 slab_alloc mm/slub.c:3503 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3510 [inline]
 kmem_cache_alloc+0x17e/0x2c0 mm/slub.c:3519
 skb_clone+0x1eb/0x370 net/core/skbuff.c:1912
 hci_send_cmd_sync net/bluetooth/hci_core.c:4066 [inline]
 hci_cmd_work+0x284/0x660 net/bluetooth/hci_core.c:4086
 process_one_work kernel/workqueue.c:2657 [inline]
 process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2734
 worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2815
 kthread+0x2fa/0x390 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

Freed by task 7889:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
 kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522
 ____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237
 kasan_slab_free include/linux/kasan.h:164 [inline]
 slab_free_hook mm/slub.c:1811 [inline]
 slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837
 slab_free mm/slub.c:3830 [inline]
 kmem_cache_free+0xf8/0x290 mm/slub.c:3852
 kfree_skb include/linux/skbuff.h:1264 [inline]
 __hci_req_sync+0x67e/0x960 net/bluetooth/hci_request.c:184
 hci_req_sync+0xa2/0xc0 net/bluetooth/hci_request.c:206
 hci_inquiry+0x38e/0x600 net/bluetooth/hci_core.c:394
 sock_do_ioctl+0xfc/0x310 net/socket.c:1220
 sock_ioctl+0x5be/0x7e0 net/socket.c:1341
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl+0xfd/0x170 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff888075dcf640
 which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 56 bytes inside of
 freed 240-byte region [ffff888075dcf640, ffff888075dcf730)

The buggy address belongs to the physical page:
page:ffffea0001d773c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x75dcf
memcg:ffff888026601481
flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000800 ffff888141e40640 ffffea00018c8840 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffffff ffff888026601481
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 6899, tgid 6899 (udevd), ts 132478867862, free_ts 132478088604
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582
 prep_new_page mm/page_alloc.c:1589 [inline]
 get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221
 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501
 alloc_slab_page+0x5d/0x180 mm/slub.c:1881
 allocate_slab mm/slub.c:2028 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:2081
 ___slab_alloc+0xc5c/0x12f0 mm/slub.c:3253
 __slab_alloc mm/slub.c:3339 [inline]
 __slab_alloc_node mm/slub.c:3392 [inline]
 slab_alloc_node mm/slub.c:3485 [inline]
 slab_alloc mm/slub.c:3503 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3510 [inline]
 kmem_cache_alloc+0x109/0x2c0 mm/slub.c:3519
 skb_clone+0x1eb/0x370 net/core/skbuff.c:1912
 do_one_broadcast net/netlink/af_netlink.c:1457 [inline]
 netlink_broadcast_filtered+0x64e/0x1130 net/netlink/af_netlink.c:1541
 netlink_broadcast+0x37/0x50 net/netlink/af_netlink.c:1565
 uevent_net_broadcast_untagged lib/kobject_uevent.c:331 [inline]
 kobject_uevent_net_broadcast+0x364/0x530 lib/kobject_uevent.c:409
 kobject_uevent_env+0x559/0x890 lib/kobject_uevent.c:608
 disk_event_uevent block/disk-events.c:181 [inline]
 disk_force_media_change+0x10d/0x1b0 block/disk-events.c:302
 __loop_clr_fd+0x36c/0x600 drivers/block/loop.c:1170
 blkdev_put+0x5e1/0x7a0 block/bdev.c:-1
 blkdev_release+0x84/0x90 block/fops.c:604
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1182 [inline]
 free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366
 free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2505
 release_pages+0x208a/0x2300 mm/swap.c:1022
 __folio_batch_release+0x71/0xe0 mm/swap.c:1042
 folio_batch_release include/linux/pagevec.h:83 [inline]
 truncate_inode_pages_range+0x381/0xea0 mm/truncate.c:396
 kill_bdev block/bdev.c:76 [inline]
 blkdev_flush_mapping+0x132/0x290 block/bdev.c:645
 blkdev_put_whole block/bdev.c:676 [inline]
 blkdev_put+0x49a/0x7a0 block/bdev.c:954
 blkdev_release+0x84/0x90 block/fops.c:604
 __fput+0x221/0x940 fs/file_table.c:418
 __do_sys_close fs/open.c:1574 [inline]
 __se_sys_close+0x15c/0x1e0 fs/open.c:1559
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Memory state around the buggy address:
 ffff888075dcf500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888075dcf580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
>ffff888075dcf600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
                                                                ^
 ffff888075dcf680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888075dcf700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/04 14:03 linux-6.6.y aa0e49877a2e d4abbeac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in hci_cmd_timeout
2026/08/03 23:54 linux-6.6.y aa0e49877a2e 9451e17e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in hci_cmd_timeout
2026/05/21 13:12 linux-6.6.y eac8889a3a1c e195359d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in hci_cmd_timeout
* Struck through repros no longer work on HEAD.