[v6.1] KASAN: use-after-free Read in hci_uart_write_work

0 views
Skip to first unread message

syzbot

unread,
Jan 23, 2026, 1:14:29 AM (4 days ago) Jan 23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: cd9b81672742 Linux 6.1.161
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=120057fc580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f0605c5af04d7603
dashboard link: https://syzkaller.appspot.com/bug?extid=7485923aff9fb5ab9249
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/7c7d6fd2ef9f/disk-cd9b8167.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/544b7fd5d4e0/vmlinux-cd9b8167.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3454f19d3753/bzImage-cd9b8167.xz

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

==================================================================
BUG: KASAN: use-after-free in hci_uart_write_work+0x2c8/0x520 drivers/bluetooth/hci_ldisc.c:165
Read of size 8 at addr ffff88805c471718 by task kworker/0:9/11257

CPU: 0 PID: 11257 Comm: kworker/0:9 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: events hci_uart_write_work
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:420
kasan_report+0x10b/0x140 mm/kasan/report.c:524
hci_uart_write_work+0x2c8/0x520 drivers/bluetooth/hci_ldisc.c:165
process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1270 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
</TASK>

Allocated by task 11257:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
__kasan_slab_alloc+0x6b/0x80 mm/kasan/common.c:329
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737
slab_alloc_node mm/slub.c:3359 [inline]
kmem_cache_alloc_node+0x14d/0x320 mm/slub.c:3404
__alloc_skb+0xfc/0x7e0 net/core/skbuff.c:505
alloc_skb include/linux/skbuff.h:1271 [inline]
bcsp_prepare_pkt+0x1aa/0x10f0 drivers/bluetooth/hci_bcsp.c:218
bcsp_dequeue+0x1df/0x480 drivers/bluetooth/hci_bcsp.c:308
hci_uart_dequeue drivers/bluetooth/hci_ldisc.c:107 [inline]
hci_uart_write_work+0x23e/0x520 drivers/bluetooth/hci_ldisc.c:161
process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1270 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

The buggy address belongs to the object at ffff88805c471640
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 216 bytes inside of
240-byte region [ffff88805c471640, ffff88805c471730)

The buggy address belongs to the physical page:
page:ffffea0001711c40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5c471
memcg:ffff888056240081
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 dead000000000100 dead000000000122 ffff88801845d500
raw: 0000000000000000 00000000000c000c 00000001ffffffff ffff888056240081
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 8226, tgid 8225 (syz.5.885), ts 553840341068, free_ts 548432237716
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
prep_new_page mm/page_alloc.c:2539 [inline]
get_page_from_freelist+0x1a1e/0x1ab0 mm/page_alloc.c:4328
__alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5614
alloc_slab_page+0x5d/0x160 mm/slub.c:1799
allocate_slab mm/slub.c:1944 [inline]
new_slab+0x87/0x2c0 mm/slub.c:1997
___slab_alloc+0xbc6/0x1240 mm/slub.c:3154
__slab_alloc mm/slub.c:3240 [inline]
slab_alloc_node mm/slub.c:3325 [inline]
kmem_cache_alloc_node+0x1e5/0x320 mm/slub.c:3404
__alloc_skb+0xfc/0x7e0 net/core/skbuff.c:505
alloc_skb include/linux/skbuff.h:1271 [inline]
sctp_packet_transmit+0x2f3/0x29b0 net/sctp/output.c:598
sctp_outq_flush_transports net/sctp/outqueue.c:1173 [inline]
sctp_outq_flush+0xea8/0x3130 net/sctp/outqueue.c:1221
sctp_cmd_interpreter net/sctp/sm_sideeffect.c:-1 [inline]
sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline]
sctp_do_sm+0x4ee2/0x55f0 net/sctp/sm_sideeffect.c:1170
sctp_primitive_REQUESTHEARTBEAT+0x94/0xc0 net/sctp/primitive.c:185
sctp_apply_peer_addr_params+0xdf/0x1880 net/sctp/socket.c:2434
sctp_setsockopt_peer_addr_params+0x673/0x940 net/sctp/socket.c:2684
sctp_setsockopt+0x4d6/0xf90 net/sctp/socket.c:4635
__sys_setsockopt+0x2bf/0x3d0 net/socket.c:2287
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1459 [inline]
free_pcp_prepare mm/page_alloc.c:1509 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479
__vunmap+0x856/0xa00 mm/vmalloc.c:2726
kcov_put kernel/kcov.c:437 [inline]
kcov_close+0x27/0x50 kernel/kcov.c:533
__fput+0x22c/0x920 fs/file_table.c:320
task_work_run+0x1d0/0x260 kernel/task_work.c:203
exit_task_work include/linux/task_work.h:39 [inline]
do_exit+0x982/0x2480 kernel/exit.c:880
do_group_exit+0x217/0x2d0 kernel/exit.c:1022
get_signal+0x1272/0x1350 kernel/signal.c:2871
arch_do_signal_or_restart+0xc4/0x1350 arch/x86/kernel/signal.c:871
exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303
do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x68/0xd2

Memory state around the buggy address:
ffff88805c471600: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
ffff88805c471680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88805c471700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
^
ffff88805c471780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88805c471800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
==================================================================


---
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