syzbot


KASAN: slab-use-after-free Read in hci_cmd_work (2)

Status: upstream: reported on 2025/11/18 06:49
Subsystems: bluetooth
[Documentation on labels]
Reported-by: syzbot+4d6b203d625d2f57d4ca@syzkaller.appspotmail.com
First crash: 9d00h, last: 4d02h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bluetooth?] KASAN: slab-use-after-free Read in hci_cmd_work (2) 0 (1) 2025/11/18 06:49
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in hci_cmd_work bluetooth 19 1 494d 456d 0/29 auto-obsoleted due to no activity on 2024/10/24 11:02

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in hci_cmd_work+0x5d0/0x7b0 net/bluetooth/hci_core.c:4174
Read of size 2 at addr ffff88805e1a4678 by task kworker/u9:1/5154

CPU: 1 UID: 0 PID: 5154 Comm: kworker/u9:1 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: hci0 hci_cmd_work
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xca/0x240 mm/kasan/report.c:482
 kasan_report+0x118/0x150 mm/kasan/report.c:595
 hci_cmd_work+0x5d0/0x7b0 net/bluetooth/hci_core.c:4174
 process_one_work+0x93a/0x15e0 kernel/workqueue.c:3261
 process_scheduled_works kernel/workqueue.c:3344 [inline]
 worker_thread+0x9b0/0xee0 kernel/workqueue.c:3425
 kthread+0x711/0x8a0 kernel/kthread.c:463
 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
 </TASK>

Allocated by task 52:
 kasan_save_stack mm/kasan/common.c:56 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
 unpoison_slab_object mm/kasan/common.c:339 [inline]
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:365
 kasan_slab_alloc include/linux/kasan.h:252 [inline]
 slab_post_alloc_hook mm/slub.c:4948 [inline]
 slab_alloc_node mm/slub.c:5258 [inline]
 kmem_cache_alloc_node_noprof+0x43c/0x710 mm/slub.c:5310
 __alloc_skb+0x112/0x2d0 net/core/skbuff.c:664
 alloc_skb include/linux/skbuff.h:1383 [inline]
 bt_skb_alloc include/net/bluetooth/bluetooth.h:510 [inline]
 hci_cmd_sync_alloc+0x3d/0x3b0 net/bluetooth/hci_sync.c:58
 hci_cmd_sync_add net/bluetooth/hci_sync.c:99 [inline]
 __hci_cmd_sync_sk+0x1a7/0xc70 net/bluetooth/hci_sync.c:168
 __hci_cmd_sync_status_sk net/bluetooth/hci_sync.c:263 [inline]
 __hci_cmd_sync_status net/bluetooth/hci_sync.c:287 [inline]
 hci_reset_sync+0x4a/0x140 net/bluetooth/hci_sync.c:3664
 hci_init1_sync net/bluetooth/hci_sync.c:3750 [inline]
 hci_init_sync net/bluetooth/hci_sync.c:4874 [inline]
 hci_dev_init_sync net/bluetooth/hci_sync.c:5066 [inline]
 hci_dev_open_sync+0xec5/0x2dc0 net/bluetooth/hci_sync.c:5144
 hci_dev_do_open net/bluetooth/hci_core.c:430 [inline]
 hci_power_on+0x1b4/0x720 net/bluetooth/hci_core.c:959
 process_one_work+0x93a/0x15e0 kernel/workqueue.c:3261
 process_scheduled_works kernel/workqueue.c:3344 [inline]
 worker_thread+0x9b0/0xee0 kernel/workqueue.c:3425
 kthread+0x711/0x8a0 kernel/kthread.c:463
 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

Freed by task 5831:
 kasan_save_stack mm/kasan/common.c:56 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:252 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284
 kasan_slab_free include/linux/kasan.h:234 [inline]
 slab_free_hook mm/slub.c:2540 [inline]
 slab_free mm/slub.c:6663 [inline]
 kmem_cache_free+0x197/0x640 mm/slub.c:6774
 kfree_skb_reason include/linux/skbuff.h:1322 [inline]
 kfree_skb include/linux/skbuff.h:1331 [inline]
 vhci_read+0x49a/0x5b0 drivers/bluetooth/hci_vhci.c:593
 vfs_read+0x200/0xa30 fs/read_write.c:570
 ksys_read+0x145/0x250 fs/read_write.c:715
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

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

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5e1a4
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801eadaa00 dead000000000122 0000000000000000
raw: 0000000000000000 00000000000c000c 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5828, tgid 5828 (syz-executor), ts 69218565239, free_ts 21831829917
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851
 prep_new_page mm/page_alloc.c:1859 [inline]
 get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3920
 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5215
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486
 alloc_slab_page mm/slub.c:3075 [inline]
 allocate_slab+0x86/0x3b0 mm/slub.c:3248
 new_slab mm/slub.c:3302 [inline]
 ___slab_alloc+0xf56/0x1990 mm/slub.c:4651
 __slab_alloc+0x65/0x100 mm/slub.c:4774
 __slab_alloc_node mm/slub.c:4850 [inline]
 slab_alloc_node mm/slub.c:5246 [inline]
 kmem_cache_alloc_node_noprof+0x4ce/0x710 mm/slub.c:5310
 __alloc_skb+0x112/0x2d0 net/core/skbuff.c:664
 alloc_skb include/linux/skbuff.h:1383 [inline]
 bt_skb_alloc include/net/bluetooth/bluetooth.h:510 [inline]
 hci_si_event net/bluetooth/hci_sock.c:791 [inline]
 hci_sock_dev_event+0x15c/0x630 net/bluetooth/hci_sock.c:833
 hci_register_dev+0x6be/0x8b0 net/bluetooth/hci_core.c:2664
 __vhci_create_device drivers/bluetooth/hci_vhci.c:451 [inline]
 vhci_create_device+0x39c/0x650 drivers/bluetooth/hci_vhci.c:479
 vhci_get_user drivers/bluetooth/hci_vhci.c:536 [inline]
 vhci_write+0x3ce/0x4a0 drivers/bluetooth/hci_vhci.c:616
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x5c9/0xb30 fs/read_write.c:686
 ksys_write+0x145/0x250 fs/read_write.c:738
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
page last free pid 1 tgid 1 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1395 [inline]
 __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2948
 __free_pages mm/page_alloc.c:5334 [inline]
 free_contig_range+0x1bd/0x4a0 mm/page_alloc.c:7177
 destroy_args+0x69/0x660 mm/debug_vm_pgtable.c:983
 debug_vm_pgtable+0x38f/0x3a0 mm/debug_vm_pgtable.c:1372
 do_one_initcall+0x1fb/0x870 init/main.c:1378
 do_initcall_level+0x104/0x190 init/main.c:1440
 do_initcalls+0x59/0xa0 init/main.c:1456
 kernel_init_freeable+0x334/0x4b0 init/main.c:1688
 kernel_init+0x1d/0x1d0 init/main.c:1578
 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

Memory state around the buggy address:
 ffff88805e1a4500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88805e1a4580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
>ffff88805e1a4600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
                                                                ^
 ffff88805e1a4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88805e1a4700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (27015):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/19 04:20 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 04:07 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:59 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:55 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:51 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:51 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:47 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:43 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:39 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:35 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:32 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:27 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:24 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:19 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:15 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:11 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:06 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 03:02 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:59 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:54 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:50 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:45 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:39 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:36 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:31 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:27 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:23 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:19 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:16 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:11 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:08 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 02:03 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 01:59 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 01:55 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 01:51 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 01:48 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 01:43 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 01:39 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 01:34 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 01:31 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 01:27 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 01:23 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/19 01:19 linux-next 0c1c7a6a83fe ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/18 06:49 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/14 06:46 linux-next 0f2995693867 07e030de .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in hci_cmd_work
2025/11/18 18:03 linux-next 0f2995693867 ef766cd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KFENCE: use-after-free read in hci_cmd_work
* Struck through repros no longer work on HEAD.