[v6.6] KASAN: slab-use-after-free Read in bt_accept_unlink

0 views
Skip to first unread message

syzbot

unread,
Oct 2, 2025, 10:55:31 PM (10 days ago) Oct 2
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: f34f16e5c632 Linux 6.6.109
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12f6cee2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=12606d4b8832c7e4
dashboard link: https://syzkaller.appspot.com/bug?extid=8a8dcc2584da3070a3f1
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1d84cf343aca/disk-f34f16e5.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/613ae177a403/vmlinux-f34f16e5.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6b9016970cbc/bzImage-f34f16e5.xz

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

ntfs3: loop2: failed to convert "0030" to iso8859-6
ntfs3: loop2: failed to convert name for inode 1e.
ntfs3: loop2: failed to convert "0032" to iso8859-6
ntfs3: loop2: failed to convert "0033" to iso8859-6
==================================================================
BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x84/0x130 lib/list_debug.c:62
Read of size 8 at addr ffff88807c59b518 by task syz-executor/14834

CPU: 1 PID: 14834 Comm: syz-executor Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Call Trace:
<TASK>
dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xac/0x220 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
__list_del_entry_valid_or_report+0x84/0x130 lib/list_debug.c:62
__list_del_entry_valid include/linux/list.h:124 [inline]
__list_del_entry include/linux/list.h:215 [inline]
list_del_init include/linux/list.h:287 [inline]
bt_accept_unlink+0x39/0x230 net/bluetooth/af_bluetooth.c:256
l2cap_sock_teardown_cb+0x17e/0x450 net/bluetooth/l2cap_sock.c:1600
l2cap_chan_del+0xaf/0x5e0 net/bluetooth/l2cap_core.c:655
l2cap_conn_del+0x380/0x660 net/bluetooth/l2cap_core.c:1787
hci_disconn_cfm include/net/bluetooth/hci_core.h:2006 [inline]
hci_conn_hash_flush+0x107/0x220 net/bluetooth/hci_conn.c:2540
hci_dev_close_sync+0x962/0xfb0 net/bluetooth/hci_sync.c:5278
hci_dev_do_close net/bluetooth/hci_core.c:523 [inline]
hci_unregister_dev+0x21a/0x510 net/bluetooth/hci_core.c:2709
vhci_release+0x155/0x1a0 drivers/bluetooth/hci_vhci.c:691
__fput+0x234/0x970 fs/file_table.c:384
task_work_run+0x1ce/0x250 kernel/task_work.c:239
exit_task_work include/linux/task_work.h:43 [inline]
do_exit+0x90b/0x23c0 kernel/exit.c:883
do_group_exit+0x21b/0x2d0 kernel/exit.c:1024
__do_sys_exit_group kernel/exit.c:1035 [inline]
__se_sys_exit_group kernel/exit.c:1033 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1033
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fe4de18eec9
Code: Unable to access opcode bytes at 0x7fe4de18ee9f.
RSP: 002b:00007ffceb324b28 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007fe4de211ddd RCX: 00007fe4de18eec9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000016 R08: 00007ffceb3228c6 R09: 00007ffceb325de0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffceb325de0
R13: 00007fe4de211d7d R14: 0000555582bd44a8 R15: 00007ffceb326eb0
</TASK>

Allocated by task 6304:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:198 [inline]
__do_kmalloc_node mm/slab_common.c:1007 [inline]
__kmalloc_node_track_caller+0xb2/0x230 mm/slab_common.c:1027
kmalloc_reserve+0x117/0x260 net/core/skbuff.c:581
__alloc_skb+0x138/0x2c0 net/core/skbuff.c:650
alloc_skb include/linux/skbuff.h:1284 [inline]
mld_newpack+0x143/0xbf0 net/ipv6/mcast.c:1743
add_grhead+0x5a/0x2a0 net/ipv6/mcast.c:1854
add_grec+0x13ad/0x1660 net/ipv6/mcast.c:1992
mld_send_cr net/ipv6/mcast.c:2118 [inline]
mld_ifc_work+0x6e6/0xb40 net/ipv6/mcast.c:2654
process_one_work kernel/workqueue.c:2634 [inline]
process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711
worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

Freed by task 6304:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1811 [inline]
slab_free_freelist_hook+0x130/0x1b0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
__kmem_cache_free+0xba/0x1f0 mm/slub.c:3843
skb_kfree_head net/core/skbuff.c:945 [inline]
skb_free_head net/core/skbuff.c:957 [inline]
skb_release_data+0x634/0x800 net/core/skbuff.c:987
skb_release_all net/core/skbuff.c:1053 [inline]
__kfree_skb net/core/skbuff.c:1067 [inline]
kfree_skb_reason+0x10e/0x170 net/core/skbuff.c:1103
kfree_skb include/linux/skbuff.h:1232 [inline]
ip6_mc_input+0xa7e/0xc70 net/ipv6/ip6_input.c:589
NF_HOOK+0x303/0x390 include/linux/netfilter.h:304
__netif_receive_skb_one_core net/core/dev.c:5608 [inline]
__netif_receive_skb+0xcc/0x290 net/core/dev.c:5722
process_backlog+0x380/0x6e0 net/core/dev.c:6050
__napi_poll+0xc0/0x460 net/core/dev.c:6612
napi_poll net/core/dev.c:6679 [inline]
net_rx_action+0x5ea/0xbf0 net/core/dev.c:6815
handle_softirqs+0x280/0x820 kernel/softirq.c:578
do_softirq+0xed/0x180 kernel/softirq.c:479
__local_bh_enable_ip+0x178/0x1c0 kernel/softirq.c:406
local_bh_enable include/linux/bottom_half.h:33 [inline]
rcu_read_unlock_bh include/linux/rcupdate.h:856 [inline]
__dev_queue_xmit+0x1449/0x35a0 net/core/dev.c:4452
dev_queue_xmit include/linux/netdevice.h:3113 [inline]
neigh_hh_output include/net/neighbour.h:527 [inline]
neigh_output include/net/neighbour.h:541 [inline]
ip6_finish_output2+0xdf5/0x1650 net/ipv6/ip6_output.c:141
dst_output include/net/dst.h:467 [inline]
NF_HOOK+0x163/0x470 include/linux/netfilter.h:304
mld_sendpack+0x7f9/0xd70 net/ipv6/mcast.c:1823
mld_send_cr net/ipv6/mcast.c:2124 [inline]
mld_ifc_work+0x835/0xb40 net/ipv6/mcast.c:2654
process_one_work kernel/workqueue.c:2634 [inline]
process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711
worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492
__call_rcu_common kernel/rcu/tree.c:2721 [inline]
call_rcu+0x158/0x930 kernel/rcu/tree.c:2837
netlink_release+0x16b4/0x1a80 net/netlink/af_netlink.c:801
__sock_release net/socket.c:659 [inline]
sock_close+0xbd/0x230 net/socket.c:1421
__fput+0x234/0x970 fs/file_table.c:384
task_work_run+0x1ce/0x250 kernel/task_work.c:239
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
exit_to_user_mode_prepare+0xf6/0x180 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x68/0xd2

Second to last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492
insert_work+0x3d/0x310 kernel/workqueue.c:1651
__queue_work+0xc39/0x1020 kernel/workqueue.c:1800
queue_work_on+0x121/0x1e0 kernel/workqueue.c:1835
queue_work include/linux/workqueue.h:562 [inline]
schedule_work include/linux/workqueue.h:623 [inline]
rfkill_register+0x758/0x8e0 net/rfkill/core.c:1109
hci_register_dev+0x3f5/0x890 net/bluetooth/hci_core.c:2625
__vhci_create_device drivers/bluetooth/hci_vhci.c:452 [inline]
vhci_create_device+0x38b/0x650 drivers/bluetooth/hci_vhci.c:480
vhci_get_user drivers/bluetooth/hci_vhci.c:537 [inline]
vhci_write+0x3b5/0x470 drivers/bluetooth/hci_vhci.c:617
call_write_iter include/linux/fs.h:2018 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x43b/0x940 fs/read_write.c:584
ksys_write+0x147/0x250 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff88807c59b000
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1304 bytes inside of
freed 2048-byte region [ffff88807c59b000, ffff88807c59b800)

The buggy address belongs to the physical page:
page:ffffea0001f16600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7c598
head:ffffea0001f16600 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888017842000 0000000000000000 dead000000000001
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 1122, tgid 1122 (kworker/u4:5), ts 90333535593, free_ts 90213367355
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554
prep_new_page mm/page_alloc.c:1561 [inline]
get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191
__alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457
alloc_slab_page+0x5d/0x170 mm/slub.c:1881
allocate_slab mm/slub.c:2028 [inline]
new_slab+0x87/0x2e0 mm/slub.c:2081
___slab_alloc+0xc6d/0x1300 mm/slub.c:3253
__slab_alloc mm/slub.c:3339 [inline]
__slab_alloc_node mm/slub.c:3392 [inline]
slab_alloc_node mm/slub.c:3485 [inline]
__kmem_cache_alloc_node+0x1a2/0x260 mm/slub.c:3534
__do_kmalloc_node mm/slab_common.c:1006 [inline]
__kmalloc_node_track_caller+0xa2/0x230 mm/slab_common.c:1027
kmalloc_reserve+0x117/0x260 net/core/skbuff.c:581
pskb_expand_head+0x185/0x1230 net/core/skbuff.c:2099
netlink_trim+0x180/0x220 net/netlink/af_netlink.c:1301
netlink_broadcast_filtered+0x80/0x1110 net/netlink/af_netlink.c:1515
netlink_broadcast net/netlink/af_netlink.c:1560 [inline]
nlmsg_multicast include/net/netlink.h:1090 [inline]
nlmsg_notify+0xf0/0x1a0 net/netlink/af_netlink.c:2588
netdev_state_change+0xf0/0x150 net/core/dev.c:1410
linkwatch_do_dev+0x10d/0x160 net/core/link_watch.c:191
__linkwatch_run_queue+0x40f/0x660 net/core/link_watch.c:244
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1154 [inline]
free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336
free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429
__slab_free+0x35e/0x410 mm/slub.c:3736
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767
slab_alloc_node mm/slub.c:3495 [inline]
kmem_cache_alloc_node+0x150/0x330 mm/slub.c:3540
__alloc_skb+0x108/0x2c0 net/core/skbuff.c:640
alloc_skb include/linux/skbuff.h:1284 [inline]
nlmsg_new include/net/netlink.h:1010 [inline]
netlink_ack+0x376/0x1110 net/netlink/af_netlink.c:2482
netlink_rcv_skb+0x29a/0x480 net/netlink/af_netlink.c:2551
netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
netlink_unicast+0x751/0x8d0 net/netlink/af_netlink.c:1346
netlink_sendmsg+0x8c1/0xbe0 net/netlink/af_netlink.c:1894
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg net/socket.c:745 [inline]
__sys_sendto+0x46a/0x620 net/socket.c:2201
__do_sys_sendto net/socket.c:2213 [inline]
__se_sys_sendto net/socket.c:2209 [inline]
__x64_sys_sendto+0xde/0xf0 net/socket.c:2209
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81

Memory state around the buggy address:
ffff88807c59b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807c59b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807c59b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807c59b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807c59b600: 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