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

Status: upstream: reported on 2026/12/02 02:04
Reported-by: syzbot+d89aff3964b0fe049f25@syzkaller.appspotmail.com
First crash: 20h13m, last: 20h13m
▶ ▼ Similar bugs (10)
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 (5) 19 2 120d 197d 0/3 auto-obsoleted due to no activity on 2026/11/12 17:01
linux-5.15 KASAN: use-after-free Read in l2cap_sock_ready_cb (4) 19 1 308d 308d 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 106d 269d 0/3 auto-obsoleted due to no activity on 2026/11/26 09:33
linux-5.15 KASAN: use-after-free Read in l2cap_sock_ready_cb 19 2 710d 723d 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 598d 598d 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 726d 726d 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 412d 412d 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 106d 792d 28/30 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 919d 915d 0/30 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 129d 129d 0/2 auto-obsoleted due to no activity on 2026/11/03 06:39

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

CPU: 1 PID: 4200 Comm: kworker/u5:4 Tainted: G S                syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Workqueue: hci2 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:1740
 l2cap_chan_ready net/bluetooth/l2cap_core.c:1440 [inline]
 l2cap_le_start+0x689/0x1830 net/bluetooth/l2cap_core.c:1555
 l2cap_conn_ready net/bluetooth/l2cap_core.c:1825 [inline]
 l2cap_connect_cfm+0x744/0x12b0 net/bluetooth/l2cap_core.c:8640
 hci_connect_cfm include/net/bluetooth/hci_core.h:1507 [inline]
 le_conn_complete_evt+0xd41/0x14d0 net/bluetooth/hci_event.c:5465
 hci_le_conn_complete_evt net/bluetooth/hci_event.c:5490 [inline]
 hci_le_meta_evt+0x285/0x3c10 net/bluetooth/hci_event.c:6212
 hci_event_packet+0xe0b/0x1310 net/bluetooth/hci_event.c:6561
 hci_rx_work+0x24d/0xa70 net/bluetooth/hci_core.c:5087
 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 9890:
 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
 l2cap_sock_alloc net/bluetooth/l2cap_sock.c:1948 [inline]
 l2cap_sock_create+0x12b/0x2a0 net/bluetooth/l2cap_sock.c:1988
 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 9890:
 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
 l2cap_sock_release+0x169/0x1e0 net/bluetooth/l2cap_sock.c:1463
 __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:184
 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:217
 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline]
 syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:310
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

The buggy address belongs to the object at ffff88805f7e5000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1224 bytes inside of
 2048-byte region [ffff88805f7e5000, ffff88805f7e5800)
The buggy address belongs to the page:
page:ffffea00017df800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5f7e0
head:ffffea00017df800 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888017842000
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 0xd28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4189, ts 67946823366, free_ts 25359128640
 prep_new_page mm/page_alloc.c:2427 [inline]
 get_page_from_freelist+0x2510/0x2680 mm/page_alloc.c:4202
 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5511
 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]
 pskb_expand_head+0x128/0x1100 net/core/skbuff.c:1714
 netlink_trim+0x180/0x220 net/netlink/af_netlink.c:1295
 netlink_broadcast_filtered+0x69/0x1240 net/netlink/af_netlink.c:1520
 netlink_broadcast net/netlink/af_netlink.c:1565 [inline]
 nlmsg_multicast include/net/netlink.h:1044 [inline]
 nlmsg_notify+0xdf/0x190 net/netlink/af_netlink.c:2578
 rtnl_notify net/core/rtnetlink.c:764 [inline]
 rtmsg_ifinfo_send net/core/rtnetlink.c:3922 [inline]
 rtmsg_ifinfo_event net/core/rtnetlink.c:3937 [inline]
 rtnetlink_event+0x13a/0x1a0 net/core/rtnetlink.c:5749
 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]
 dev_set_mac_address+0x2ed/0x400 net/core/dev.c:9148
 dev_set_mac_address_user+0x2d/0x50 net/core/dev.c:9162
 do_setlink+0x842/0x29d0 net/core/rtnetlink.c:2748
 __rtnl_newlink net/core/rtnetlink.c:3464 [inline]
 rtnl_newlink+0x15bb/0x1920 net/core/rtnetlink.c:3586
 rtnetlink_rcv_msg+0x7f1/0xf10 net/core/rtnetlink.c:5698
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1341 [inline]
 free_pcp_prepare mm/page_alloc.c:1392 [inline]
 free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3325
 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3404
 free_contig_range+0x96/0xf0 mm/page_alloc.c:9438
 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:
 ffff88805f7e5380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88805f7e5400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88805f7e5480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                              ^
 ffff88805f7e5500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88805f7e5580: 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/12/02 02:03 linux-5.15.y 9bdc23a21e3d 35891725 .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.