================================================================== BUG: KASAN: use-after-free in hci_uart_write_work+0x4ad/0x7b0 drivers/bluetooth/hci_ldisc.c:165 Read of size 8 at addr ffff88816df97728 by task kworker/1:8/18449 CPU: 1 PID: 18449 Comm: kworker/1:8 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Workqueue: events hci_uart_write_work Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x71/0x200 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:420 kasan_report+0x122/0x150 mm/kasan/report.c:524 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:351 hci_uart_write_work+0x4ad/0x7b0 drivers/bluetooth/hci_ldisc.c:165 process_one_work+0x71f/0xc40 kernel/workqueue.c:2302 worker_thread+0xa29/0x11f0 kernel/workqueue.c:2449 kthread+0x281/0x320 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 29702: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_alloc_info+0x25/0x30 mm/kasan/generic.c:505 __kasan_slab_alloc+0x72/0x80 mm/kasan/common.c:333 kasan_slab_alloc include/linux/kasan.h:202 [inline] slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768 slab_alloc_node mm/slub.c:3382 [inline] kmem_cache_alloc_node+0x181/0x340 mm/slub.c:3429 __alloc_skb+0xea/0x4b0 net/core/skbuff.c:508 alloc_skb include/linux/skbuff.h:1290 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:473 [inline] hci_cmd_sync_alloc net/bluetooth/hci_sync.c:55 [inline] hci_cmd_sync_add net/bluetooth/hci_sync.c:96 [inline] __hci_cmd_sync_sk+0x1d1/0xcf0 net/bluetooth/hci_sync.c:158 __hci_cmd_sync_status_sk net/bluetooth/hci_sync.c:253 [inline] __hci_cmd_sync_status net/bluetooth/hci_sync.c:277 [inline] hci_read_local_features_sync net/bluetooth/hci_sync.c:3621 [inline] hci_init_stage_sync net/bluetooth/hci_sync.c:3532 [inline] hci_init1_sync net/bluetooth/hci_sync.c:3716 [inline] hci_init_sync net/bluetooth/hci_sync.c:4798 [inline] hci_dev_init_sync net/bluetooth/hci_sync.c:4989 [inline] hci_dev_open_sync+0x13a7/0x3260 net/bluetooth/hci_sync.c:5069 hci_dev_do_open net/bluetooth/hci_core.c:439 [inline] hci_power_on+0x195/0x5c0 net/bluetooth/hci_core.c:945 process_one_work+0x71f/0xc40 kernel/workqueue.c:2302 worker_thread+0xa29/0x11f0 kernel/workqueue.c:2449 kthread+0x281/0x320 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Freed by task 8096: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x31/0x50 mm/kasan/generic.c:516 ____kasan_slab_free+0x132/0x180 mm/kasan/common.c:241 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:249 kasan_slab_free include/linux/kasan.h:178 [inline] slab_free_hook mm/slub.c:1750 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776 slab_free mm/slub.c:3712 [inline] kmem_cache_free+0x12d/0x300 mm/slub.c:3737 kfree_skbmem+0x10c/0x180 net/core/skbuff.c:-1 __kfree_skb net/core/skbuff.c:874 [inline] kfree_skb_reason+0xdc/0x230 net/core/skbuff.c:896 kfree_skb include/linux/skbuff.h:1239 [inline] hci_uart_flush+0x90/0x3f0 drivers/bluetooth/hci_ldisc.c:235 hci_uart_close drivers/bluetooth/hci_ldisc.c:268 [inline] hci_uart_tty_close+0x7a/0x230 drivers/bluetooth/hci_ldisc.c:542 tty_ldisc_close drivers/tty/tty_ldisc.c:456 [inline] tty_ldisc_kill+0x10f/0x1f0 drivers/tty/tty_ldisc.c:608 tty_ldisc_hangup+0x409/0x520 drivers/tty/tty_ldisc.c:724 __tty_hangup+0x58b/0x7c0 drivers/tty/tty_io.c:631 tty_vhangup drivers/tty/tty_io.c:701 [inline] tty_ioctl+0x49a/0xc60 drivers/tty/tty_io.c:2716 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0x12f/0x1b0 fs/ioctl.c:856 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:856 x64_sys_call+0x58b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88816df97640 which belongs to the cache skbuff_head_cache of size 256 The buggy address is located 232 bytes inside of 256-byte region [ffff88816df97640, ffff88816df97740) The buggy address belongs to the physical page: page:ffffea0005b7e5c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x16df97 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff888100ba0000 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 274, tgid 274 (syz-executor), ts 2440574737575, free_ts 2440574407483 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2643 prep_new_page+0x1c/0x110 mm/page_alloc.c:2650 get_page_from_freelist+0x2c7b/0x2cf0 mm/page_alloc.c:4554 __alloc_pages+0x1c3/0x450 mm/page_alloc.c:5868 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1 allocate_slab mm/slub.c:1967 [inline] new_slab+0x98/0x3d0 mm/slub.c:2020 ___slab_alloc+0x6bd/0xb20 mm/slub.c:3177 __slab_alloc+0x5e/0xa0 mm/slub.c:3263 slab_alloc_node mm/slub.c:3348 [inline] slab_alloc mm/slub.c:3392 [inline] __kmem_cache_alloc_lru mm/slub.c:3399 [inline] kmem_cache_alloc+0x1b0/0x330 mm/slub.c:3408 skb_clone+0x1f5/0x380 net/core/skbuff.c:1663 dev_queue_xmit_nit+0x1a5/0xab0 net/core/dev.c:2329 xmit_one net/core/dev.c:3674 [inline] dev_hard_start_xmit+0x16a/0x750 net/core/dev.c:3697 sch_direct_xmit+0x267/0x8d0 net/sched/sch_generic.c:342 __dev_xmit_skb net/core/dev.c:3918 [inline] __dev_queue_xmit+0x15f9/0x3420 net/core/dev.c:4323 dev_queue_xmit include/linux/netdevice.h:3085 [inline] neigh_hh_output include/net/neighbour.h:536 [inline] neigh_output include/net/neighbour.h:550 [inline] ip_finish_output2+0xb09/0xef0 net/ipv4/ip_output.c:228 __ip_finish_output+0x172/0x370 net/ipv4/ip_output.c:-1 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1551 [inline] free_pcp_prepare mm/page_alloc.c:1625 [inline] free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3589 free_unref_page+0x8f/0x530 mm/page_alloc.c:3687 free_the_page mm/page_alloc.c:836 [inline] __free_pages+0x67/0x100 mm/page_alloc.c:5957 free_pages+0x82/0x90 mm/page_alloc.c:5968 poll_freewait+0x1ba/0x220 fs/select.c:153 do_select+0x1532/0x1610 fs/select.c:609 core_sys_select+0x4eb/0x650 fs/select.c:678 do_pselect fs/select.c:760 [inline] __do_sys_pselect6 fs/select.c:801 [inline] __se_sys_pselect6+0x287/0x310 fs/select.c:792 __x64_sys_pselect6+0xe5/0x100 fs/select.c:792 x64_sys_call+0x1b0/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:271 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff88816df97600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff88816df97680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88816df97700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88816df97780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88816df97800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================