================================================================== BUG: KASAN: use-after-free in hci_uart_write_work+0x4ad/0x7b0 drivers/bluetooth/hci_ldisc.c:165 Read of size 8 at addr ffff8881360ae4a8 by task kworker/1:1/39 CPU: 1 PID: 39 Comm: kworker/1:1 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/0x1e0 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:418 kasan_report+0x122/0x150 mm/kasan/report.c:522 __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 365: 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:3421 [inline] kmem_cache_alloc_node+0x181/0x340 mm/slub.c:3468 __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 1150: 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:1745 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1771 slab_free mm/slub.c:3686 [inline] kmem_cache_free+0x12d/0x300 mm/slub.c:3711 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 ffff8881360ae3c0 which belongs to the cache skbuff_head_cache of size 256 The buggy address is located 232 bytes inside of 256-byte region [ffff8881360ae3c0, ffff8881360ae4c0) The buggy address belongs to the physical page: page:ffffea0004d82b80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1360ae flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff888100ba5200 raw: 0000000000000000 00000000800c000c 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 287, tgid 287 (syz-executor), ts 110401302143, free_ts 110401183430 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:1962 [inline] new_slab+0x98/0x3d0 mm/slub.c:2015 ___slab_alloc+0x6f6/0xb50 mm/slub.c:3203 __slab_alloc+0x5e/0xa0 mm/slub.c:3302 slab_alloc_node mm/slub.c:3387 [inline] kmem_cache_alloc_node+0x1c2/0x340 mm/slub.c:3468 __alloc_skb+0xea/0x4b0 net/core/skbuff.c:508 alloc_skb include/linux/skbuff.h:1290 [inline] alloc_uevent_skb+0x85/0x240 lib/kobject_uevent.c:290 uevent_net_broadcast_untagged lib/kobject_uevent.c:326 [inline] kobject_uevent_net_broadcast+0x343/0x5b0 lib/kobject_uevent.c:409 kobject_uevent_env+0x54f/0x730 lib/kobject_uevent.c:608 kobject_uevent+0x1d/0x30 lib/kobject_uevent.c:657 __loop_clr_fd+0x2ea/0x690 drivers/block/loop.c:1163 lo_release+0x14c/0x1e0 drivers/block/loop.c:1741 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_list+0x112/0x8b0 mm/page_alloc.c:3740 release_pages+0xad1/0xb20 mm/swap.c:1043 __pagevec_release+0x71/0xe0 mm/swap.c:1063 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] truncate_inode_pages_range+0x309/0xcc0 mm/truncate.c:374 truncate_inode_pages+0x24/0x30 mm/truncate.c:456 kill_bdev block/bdev.c:77 [inline] blkdev_flush_mapping+0x158/0x2c0 block/bdev.c:669 blkdev_put_whole block/bdev.c:700 [inline] blkdev_put+0x478/0x710 block/bdev.c:960 kill_block_super+0xb8/0xf0 fs/super.c:1475 deactivate_locked_super+0xb5/0x120 fs/super.c:334 deactivate_super+0xaf/0xe0 fs/super.c:365 cleanup_mnt+0x45f/0x4e0 fs/namespace.c:1182 __cleanup_mnt+0x19/0x20 fs/namespace.c:1189 task_work_run+0x1db/0x240 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0x9b/0xb0 kernel/entry/common.c:177 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:210 Memory state around the buggy address: ffff8881360ae380: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff8881360ae400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881360ae480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8881360ae500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881360ae580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================