KASAN: use-after-free Read in l2cap_sock_ready_cb (5)

Status: upstream: reported on 2026/05/19 16:03
Reported-by: syzbot+41200850cb3c063d7d18@syzkaller.appspotmail.com
First crash: 99d, last: 22d
Similar bugs (9)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: use-after-free Read in l2cap_sock_ready_cb (4) 19 1 211d 211d 0/3 auto-obsoleted due to no activity on 2026/05/08 02:22
linux-6.1 KASAN: use-after-free Read in l2cap_sock_ready_cb (2) 19 syz error 3 9d04h 171d 0/3 upstream: reported syz repro on 2026/03/08 14:59
linux-5.15 KASAN: use-after-free Read in l2cap_sock_ready_cb 19 2 613d 626d 0/3 auto-obsoleted due to no activity on 2025/04/01 01:17
linux-5.15 KASAN: use-after-free Read in l2cap_sock_ready_cb (2) 19 1 501d 501d 0/3 auto-obsoleted due to no activity on 2025/07/22 01:53
linux-6.1 KASAN: use-after-free Read in l2cap_sock_ready_cb 19 1 628d 628d 0/3 auto-obsoleted due to no activity on 2025/03/16 13:13
linux-5.15 KASAN: use-after-free Read in l2cap_sock_ready_cb (3) 19 1 315d 315d 0/3 auto-obsoleted due to no activity on 2026/01/24 11:53
upstream KASAN: slab-use-after-free Read in l2cap_sock_ready_cb (2) prio:high bluetooth 19 syz error 136 9d11h 695d 1/29 upstream: reported syz repro on 2024/10/01 10:15
upstream KASAN: slab-use-after-free Read in l2cap_sock_ready_cb bluetooth 19 1 822d 817d 0/29 auto-obsoleted due to no activity on 2024/09/04 06:40
linux-6.6 KASAN: slab-use-after-free Read in l2cap_sock_ready_cb 19 1 32d 32d 0/2 upstream: reported on 2026/07/26 06:39

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in l2cap_sock_ready_cb+0xd3/0x140 net/bluetooth/l2cap_sock.c:1691
Read of size 8 at addr ffff8880231a84c8 by task kworker/u5:6/4199

CPU: 0 PID: 4199 Comm: kworker/u5:6 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: hci0 hci_rx_work
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
 l2cap_sock_ready_cb+0xd3/0x140 net/bluetooth/l2cap_sock.c:1691
 l2cap_chan_ready net/bluetooth/l2cap_core.c:1404 [inline]
 l2cap_le_start+0x6a1/0x1840 net/bluetooth/l2cap_core.c:1516
 l2cap_conn_ready net/bluetooth/l2cap_core.c:1786 [inline]
 l2cap_connect_cfm+0x744/0x12b0 net/bluetooth/l2cap_core.c:8517
 hci_connect_cfm include/net/bluetooth/hci_core.h:1507 [inline]
 le_conn_complete_evt+0xd36/0x14d0 net/bluetooth/hci_event.c:5466
 hci_le_conn_complete_evt net/bluetooth/hci_event.c:5491 [inline]
 hci_le_meta_evt+0x285/0x3ca0 net/bluetooth/hci_event.c:6213
 hci_event_packet+0xe0b/0x1310 net/bluetooth/hci_event.c:6562
 hci_rx_work+0x255/0xa10 net/bluetooth/hci_core.c:5190
 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 7503:
 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:1866
 sk_alloc+0x2f/0x310 net/core/sock.c:1922
 bt_sock_alloc+0x37/0x350 net/bluetooth/af_bluetooth.c:146
 l2cap_sock_alloc net/bluetooth/l2cap_sock.c:1899 [inline]
 l2cap_sock_create+0x12b/0x2a0 net/bluetooth/l2cap_sock.c:1939
 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 7503:
 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:1905 [inline]
 __sk_destruct+0x580/0x840 net/core/sock.c:1991
 l2cap_sock_release+0x169/0x1e0 net/bluetooth/l2cap_sock.c:1418
 __sock_release net/socket.c:651 [inline]
 sock_close+0xbf/0x210 net/socket.c:1346
 __fput+0x212/0x8c0 fs/file_table.c:311
 task_work_run+0x125/0x1a0 kernel/task_work.c:188
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Last potentially related work creation:
 kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
 kvfree_call_rcu+0x105/0x7f0 kernel/rcu/tree.c:3600
 drop_sysctl_table+0x359/0x4e0 fs/proc/proc_sysctl.c:1685
 unregister_sysctl_table+0x87/0x130 fs/proc/proc_sysctl.c:1723
 __devinet_sysctl_unregister net/ipv4/devinet.c:2626 [inline]
 devinet_sysctl_unregister net/ipv4/devinet.c:2654 [inline]
 inetdev_destroy net/ipv4/devinet.c:326 [inline]
 inetdev_event+0x6ce/0x1350 net/ipv4/devinet.c:1611
 notifier_call_chain kernel/notifier.c:83 [inline]
 raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
 call_netdevice_notifiers_extack net/core/dev.c:2074 [inline]
 call_netdevice_notifiers net/core/dev.c:2088 [inline]
 unregister_netdevice_many+0x109b/0x1a40 net/core/dev.c:11160
 sit_exit_batch_net+0x495/0x4e0 net/ipv6/sit.c:1956
 ops_exit_list net/core/net_namespace.c:177 [inline]
 cleanup_net+0x78e/0xba0 net/core/net_namespace.c:635
 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

The buggy address belongs to the object at ffff8880231a8000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1224 bytes inside of
 2048-byte region [ffff8880231a8000, ffff8880231a8800)
The buggy address belongs to the page:
page:ffffea00008c6a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x231a8
head:ffffea00008c6a00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0001cfca00 0000000200000002 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 7083, ts 229271632510, free_ts 227901961683
 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]
 slab_alloc mm/slub.c:3233 [inline]
 __kmalloc+0x11d/0x340 mm/slub.c:4408
 kmalloc include/linux/slab.h:612 [inline]
 kzalloc include/linux/slab.h:738 [inline]
 __register_sysctl_table+0xe0/0x1240 fs/proc/proc_sysctl.c:1324
 __devinet_sysctl_register+0x2ba/0x380 net/ipv4/devinet.c:2603
 devinet_sysctl_register+0x17c/0x1f0 net/ipv4/devinet.c:2643
 inetdev_init+0x28c/0x4d0 net/ipv4/devinet.c:277
 inetdev_event+0x26f/0x1350 net/ipv4/devinet.c:1543
 notifier_call_chain kernel/notifier.c:83 [inline]
 raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
 call_netdevice_notifiers_extack net/core/dev.c:2074 [inline]
 call_netdevice_notifiers net/core/dev.c:2088 [inline]
 register_netdevice+0x12a8/0x1720 net/core/dev.c:10454
 register_netdev+0x37/0x50 net/core/dev.c:10547
 sit_init_net+0x1f6/0x4c0 net/ipv6/sit.c:1929
 ops_init+0x360/0x5f0 net/core/net_namespace.c:138
 setup_net+0x39e/0xa10 net/core/net_namespace.c:333
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_slab mm/slub.c:2020 [inline]
 discard_slab mm/slub.c:2026 [inline]
 __unfreeze_partials+0x188/0x1e0 mm/slub.c:2512
 put_cpu_partial+0x12d/0x190 mm/slub.c:2592
 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
 slab_alloc_node mm/slub.c:3225 [inline]
 slab_alloc mm/slub.c:3233 [inline]
 kmem_cache_alloc+0x15d/0x280 mm/slub.c:3238
 ptlock_alloc+0x1c/0x60 mm/memory.c:5556
 ptlock_init include/linux/mm.h:2241 [inline]
 pgtable_pte_page_ctor include/linux/mm.h:2268 [inline]
 __pte_alloc_one include/asm-generic/pgalloc.h:66 [inline]
 pte_alloc_one+0xc0/0x310 arch/x86/mm/pgtable.c:33
 __pte_alloc+0x21/0x150 mm/memory.c:439
 copy_pte_range mm/memory.c:1032 [inline]
 copy_pmd_range mm/memory.c:1167 [inline]
 copy_pud_range mm/memory.c:1204 [inline]
 copy_p4d_range mm/memory.c:1228 [inline]
 copy_page_range+0x2ab2/0x32c0 mm/memory.c:1301
 dup_mmap kernel/fork.c:616 [inline]
 dup_mm kernel/fork.c:1467 [inline]
 copy_mm+0xc61/0x13d0 kernel/fork.c:1519
 copy_process+0x17fb/0x3ec0 kernel/fork.c:2291
 kernel_clone+0x23f/0x990 kernel/fork.c:2681

Memory state around the buggy address:
 ffff8880231a8380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880231a8400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880231a8480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                              ^
 ffff8880231a8500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880231a8580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/04 17:00 linux-5.15.y 6e2fd6534337 d4abbeac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in l2cap_sock_ready_cb
2026/05/19 16:03 linux-5.15.y 93741761e5e3 223544dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in l2cap_sock_ready_cb
* Struck through repros no longer work on HEAD.