KASAN: use-after-free Read in hci_sock_get_cookie (3)

Status: upstream: reported on 2026/10/05 18:01
Reported-by: syzbot+9dcfd3eba05d1f8ceadd@syzkaller.appspotmail.com
First crash: 3d06h, last: 3d06h
▶ ▼ Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: use-after-free Read in hci_sock_get_cookie 19 1 659d 659d 0/3 auto-obsoleted due to no activity on 2025/03/28 01:01
linux-6.1 KASAN: use-after-free Read in hci_sock_get_cookie (2) 19 1 263d 263d 0/3 auto-obsoleted due to no activity on 2026/04/28 17:39
linux-6.1 KASAN: use-after-free Read in hci_sock_get_cookie 19 1 468d 468d 0/3 auto-obsoleted due to no activity on 2025/10/05 19:58
linux-5.15 KASAN: use-after-free Read in hci_sock_get_cookie (2) 19 1 427d 427d 0/3 auto-obsoleted due to no activity on 2025/11/15 13:44
upstream KASAN: slab-use-after-free Read in hci_sock_get_cookie bluetooth 19 2 882d 890d 0/29 closed as invalid on 2024/06/04 19:11
upstream KASAN: slab-use-after-free Read in hci_sock_get_cookie (2) bluetooth 19 47 514d 841d 0/29 auto-obsoleted due to no activity on 2025/08/20 20:16

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in hci_sock_get_cookie+0x41/0x50 net/bluetooth/hci_sock.c:95
Read of size 4 at addr ffff88805e8005c8 by task kworker/u5:5/4201

CPU: 1 PID: 4201 Comm: kworker/u5:5 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Workqueue: hci0 hci_power_on
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 print_address_description+0x60/0x2d0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0xdf/0x130 mm/kasan/report.c:451
 hci_sock_get_cookie+0x41/0x50 net/bluetooth/hci_sock.c:95
 mgmt_cmd_status+0x1b3/0x470 net/bluetooth/mgmt_util.c:116
 mgmt_set_powered_failed+0xa7/0xf0 net/bluetooth/mgmt.c:8675
 hci_power_on+0x2b0/0x5f0 net/bluetooth/hci_core.c:2286
 process_one_work+0x867/0xff0 kernel/workqueue.c:2310
 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
 kthread+0x42e/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

Allocated by task 7178:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 ____kasan_kmalloc mm/kasan/common.c:513 [inline]
 __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522
 kmalloc include/linux/slab.h:612 [inline]
 sk_prot_alloc+0xe7/0x210 net/core/sock.c:1865
 sk_alloc+0x2f/0x310 net/core/sock.c:1921
 bt_sock_alloc+0x37/0x350 net/bluetooth/af_bluetooth.c:146
 hci_sock_create+0x9f/0x180 net/bluetooth/hci_sock.c:2106
 bt_sock_create+0x155/0x220 net/bluetooth/af_bluetooth.c:130
 __sock_create+0x473/0x910 net/socket.c:1496
 sock_create net/socket.c:1552 [inline]
 __sys_socket+0xe2/0x170 net/socket.c:1594
 __do_sys_socket net/socket.c:1603 [inline]
 __se_sys_socket net/socket.c:1601 [inline]
 __x64_sys_socket+0x76/0x80 net/socket.c:1601
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Freed by task 7190:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
 kasan_slab_free include/linux/kasan.h:230 [inline]
 slab_free_hook mm/slub.c:1710 [inline]
 slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736
 slab_free mm/slub.c:3504 [inline]
 kfree+0xef/0x2a0 mm/slub.c:4564
 sk_prot_free net/core/sock.c:1904 [inline]
 __sk_destruct+0x580/0x840 net/core/sock.c:1990
 sock_put include/net/sock.h:1990 [inline]
 mgmt_pending_free net/bluetooth/mgmt_util.c:261 [inline]
 mgmt_pending_remove+0x13d/0x1a0 net/bluetooth/mgmt_util.c:269
 mgmt_pending_foreach+0xc1/0x110 net/bluetooth/mgmt_util.c:226
 mgmt_index_removed+0x125/0x2a0 net/bluetooth/mgmt.c:8554
 hci_sock_bind+0xa77/0xe00 net/bluetooth/hci_sock.c:1257
 __sys_bind+0x2e9/0x3e0 net/socket.c:1730
 __do_sys_bind net/socket.c:1741 [inline]
 __se_sys_bind net/socket.c:1739 [inline]
 __x64_sys_bind+0x76/0x80 net/socket.c:1739
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

The buggy address belongs to the object at ffff88805e800000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1480 bytes inside of
 2048-byte region [ffff88805e800000, ffff88805e800800)
The buggy address belongs to the page:
page:ffffea00017a0000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5e800
head:ffffea00017a0000 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888016c42000
raw: 0000000000000000 0000000000080008 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 21, ts 72841243593, free_ts 24373317381
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192
 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501
 alloc_slab_page mm/slub.c:1780 [inline]
 allocate_slab mm/slub.c:1917 [inline]
 new_slab+0xc0/0x4b0 mm/slub.c:1980
 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013
 __slab_alloc mm/slub.c:3100 [inline]
 slab_alloc_node mm/slub.c:3191 [inline]
 __kmalloc_node_track_caller+0x13d/0x3a0 mm/slub.c:4963
 kmalloc_reserve net/core/skbuff.c:356 [inline]
 __alloc_skb+0x22c/0x750 net/core/skbuff.c:427
 alloc_skb include/linux/skbuff.h:1162 [inline]
 mld_newpack+0x12f/0xba0 net/ipv6/mcast.c:1773
 add_grhead net/ipv6/mcast.c:1884 [inline]
 add_grec+0x1364/0x1840 net/ipv6/mcast.c:2023
 mld_send_cr net/ipv6/mcast.c:2146 [inline]
 mld_ifc_work+0x6f2/0xd60 net/ipv6/mcast.c:2688
 process_one_work+0x867/0xff0 kernel/workqueue.c:2310
 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
 kthread+0x42e/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396
 free_contig_range+0x96/0xf0 mm/page_alloc.c:9428
 destroy_args+0xef/0xa00 mm/debug_vm_pgtable.c:1018
 debug_vm_pgtable+0x321/0x380 mm/debug_vm_pgtable.c:1336
 do_one_initcall+0x272/0x730 init/main.c:1276
 do_initcall_level+0x13d/0x1f0 init/main.c:1349
 do_initcalls+0x4b/0x90 init/main.c:1365
 kernel_init_freeable+0x3d5/0x560 init/main.c:1589
 kernel_init+0x19/0x1b0 init/main.c:1480
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

Memory state around the buggy address:
 ffff88805e800480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88805e800500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88805e800580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                              ^
 ffff88805e800600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88805e800680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/05 18:01 linux-5.15.y a051a4bf909f af63e995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in hci_sock_get_cookie
* Struck through repros no longer work on HEAD.