[v5.15] KASAN: use-after-free Read in bt_accept_unlink (2)

0 views
Skip to first unread message

syzbot

unread,
May 31, 2026, 3:00:25 AM (23 hours ago) May 31
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 241d66fa280c Linux 5.15.208
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1680eb6a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=353ae28c40b35af5
dashboard link: https://syzkaller.appspot.com/bug?extid=6ece52694d0954fa3a8d
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d3e9d10633a1/disk-241d66fa.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/beca1f713e4b/vmlinux-241d66fa.xz
kernel image: https://storage.googleapis.com/syzbot-assets/26a15a6e1c14/bzImage-241d66fa.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6ece52...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in __list_del_entry_valid+0x80/0x120 lib/list_debug.c:59
Read of size 8 at addr ffff88805f167520 by task syz.6.333/6459

CPU: 0 PID: 6459 Comm: syz.6.333 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
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
__list_del_entry_valid+0x80/0x120 lib/list_debug.c:59
__list_del_entry include/linux/list.h:132 [inline]
list_del_init include/linux/list.h:204 [inline]
bt_accept_unlink+0x35/0x230 net/bluetooth/af_bluetooth.c:209
l2cap_sock_teardown_cb+0x1af/0x380 net/bluetooth/l2cap_sock.c:1591
l2cap_chan_del+0xab/0x620 net/bluetooth/l2cap_core.c:656
l2cap_conn_del+0x3c1/0x6a0 net/bluetooth/l2cap_core.c:1931
hci_disconn_cfm include/net/bluetooth/hci_core.h:1520 [inline]
hci_conn_hash_flush+0x107/0x220 net/bluetooth/hci_conn.c:1622
hci_dev_do_close+0x991/0x1030 net/bluetooth/hci_core.c:1795
hci_unregister_dev+0x2d7/0x580 net/bluetooth/hci_core.c:4044
vhci_release+0x73/0xc0 drivers/bluetooth/hci_vhci.c:345
__fput+0x234/0x930 fs/file_table.c:311
task_work_run+0x125/0x1a0 kernel/task_work.c:188
exit_task_work include/linux/task_work.h:33 [inline]
do_exit+0x626/0x20c0 kernel/exit.c:884
do_group_exit+0x12e/0x300 kernel/exit.c:998
get_signal+0x6d6/0x12d0 kernel/signal.c:2900
arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867
handle_signal_work kernel/entry/common.c:154 [inline]
exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178
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
RIP: 0033:0x7faced966e59
Code: Unable to access opcode bytes at RIP 0x7faced966e2f.
RSP: 002b:00007facebb9f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: 000000000003e740 RBX: 00007facedbe0090 RCX: 00007faced966e59
RDX: 00000000fffffe66 RSI: 0000200000002940 RDI: 0000000000000004
RBP: 00007faced9fcd6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007facedbe0128 R14: 00007facedbe0090 R15: 00007ffcab6f2788
</TASK>

Allocated by task 5908:
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+0xb5/0xf0 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
l2cap_sock_alloc+0x33/0x200 net/bluetooth/l2cap_sock.c:1870
l2cap_sock_create+0x118/0x1d0 net/bluetooth/l2cap_sock.c:1918
bt_sock_create+0x155/0x220 net/bluetooth/af_bluetooth.c:130
__sock_create+0x47b/0x900 net/socket.c:1495
sock_create net/socket.c:1551 [inline]
__sys_socket+0xe2/0x170 net/socket.c:1593
__do_sys_socket net/socket.c:1602 [inline]
__se_sys_socket net/socket.c:1600 [inline]
__x64_sys_socket+0x76/0x80 net/socket.c:1600
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 ffff88805f167000
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1312 bytes inside of
2048-byte region [ffff88805f167000, ffff88805f167800)
The buggy address belongs to the page:
page:ffffea00017c5800 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88805f160000 pfn:0x5f160
head:ffffea00017c5800 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0000a13408 ffffea0000a5f608 ffff888016c42000
raw: ffff88805f160000 0000000000080004 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 0x1d28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5395, ts 216534919509, free_ts 216496108935
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x1bbd/0x1ca0 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+0x80a/0xdd0 mm/slub.c:3013
__slab_alloc mm/slub.c:3100 [inline]
slab_alloc_node mm/slub.c:3191 [inline]
__kmalloc_node_track_caller+0x1fc/0x3a0 mm/slub.c:4963
kmalloc_reserve net/core/skbuff.c:356 [inline]
pskb_expand_head+0x127/0x10f0 net/core/skbuff.c:1710
netlink_trim+0x180/0x220 net/netlink/af_netlink.c:1299
netlink_broadcast_filtered+0x7c/0x1170 net/netlink/af_netlink.c:1511
netlink_broadcast net/netlink/af_netlink.c:1556 [inline]
nlmsg_multicast include/net/netlink.h:1044 [inline]
nlmsg_notify+0xec/0x1a0 net/netlink/af_netlink.c:2550
rtnl_notify net/core/rtnetlink.c:764 [inline]
rtmsg_ifinfo_send net/core/rtnetlink.c:3913 [inline]
rtmsg_ifinfo_event net/core/rtnetlink.c:3928 [inline]
rtnetlink_event+0x13a/0x1a0 net/core/rtnetlink.c:5738
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+0x2e8/0x400 net/core/dev.c:9140
dev_set_mac_address_user+0x2d/0x50 net/core/dev.c:9154
do_setlink+0x8b0/0x3d60 net/core/rtnetlink.c:2739
__rtnl_newlink net/core/rtnetlink.c:3455 [inline]
rtnl_newlink+0x1658/0x1a50 net/core/rtnetlink.c:3577
rtnetlink_rcv_msg+0x844/0xf30 net/core/rtnetlink.c:5687
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+0x1a5/0x200 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/0xd0 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+0x100/0x290 mm/slub.c:3238
vm_area_alloc+0x20/0xe0 kernel/fork.c:350
__mmap_region mm/mmap.c:1782 [inline]
mmap_region+0xac0/0x1650 mm/mmap.c:2933
do_mmap+0x819/0xe90 mm/mmap.c:1586
vm_mmap_pgoff+0x1c1/0x2d0 mm/util.c:551
ksys_mmap_pgoff+0x54b/0x790 mm/mmap.c:1635
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

Memory state around the buggy address:
ffff88805f167400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88805f167480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88805f167500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88805f167580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88805f167600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages