================================================================== BUG: KASAN: slab-use-after-free in hci_uart_write_work+0x82d/0x960 drivers/bluetooth/hci_ldisc.c:165 Read of size 4 at addr ffff888074845d30 by task kworker/0:3/15205 CPU: 0 UID: 0 PID: 15205 Comm: kworker/0:3 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: events hci_uart_write_work Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 hci_uart_write_work+0x82d/0x960 drivers/bluetooth/hci_ldisc.c:165 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Allocated by task 61: kasan_save_stack+0x33/0x60 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_node_noprof+0x298/0x800 mm/slub.c:5315 __alloc_skb+0x156/0x410 net/core/skbuff.c:679 alloc_skb include/linux/skbuff.h:1383 [inline] bcsp_prepare_pkt+0xe0/0xae0 drivers/bluetooth/hci_bcsp.c:218 bcsp_dequeue+0x237/0x4b0 drivers/bluetooth/hci_bcsp.c:308 hci_uart_dequeue drivers/bluetooth/hci_ldisc.c:107 [inline] hci_uart_write_work+0x4e3/0x960 drivers/bluetooth/hci_ldisc.c:161 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 The buggy address belongs to the object at ffff888074845cc0 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 112 bytes inside of freed 240-byte region [ffff888074845cc0, ffff888074845db0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x74844 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88805b846801 ksm flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000040 ffff888040ef6a00 ffffea00018e8b80 dead000000000003 raw: 0000000000000000 0000000000190019 00000000f5000000 ffff88805b846801 head: 04fff00000000040 ffff888040ef6a00 ffffea00018e8b80 dead000000000003 head: 0000000000000000 0000000000190019 00000000f5000000 ffff88805b846801 head: 04fff00000000001 ffffea0001d21101 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 21595, tgid 21594 (syz.0.4282), ts 672869110623, free_ts 663818812695 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1884 prep_new_page mm/page_alloc.c:1892 [inline] get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3945 __alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5240 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab mm/slub.c:3248 [inline] new_slab+0x2c3/0x430 mm/slub.c:3302 ___slab_alloc+0xe18/0x1c90 mm/slub.c:4656 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] kmem_cache_alloc_node_noprof+0x44a/0x800 mm/slub.c:5315 __alloc_skb+0x156/0x410 net/core/skbuff.c:679 skb_copy+0x1c9/0x3a0 net/core/skbuff.c:2162 mac80211_hwsim_tx_frame_no_nl.isra.0+0xb6e/0x13c0 drivers/net/wireless/virtual/mac80211_hwsim.c:1891 mac80211_hwsim_tx_frame+0x1f1/0x2a0 drivers/net/wireless/virtual/mac80211_hwsim.c:2264 __mac80211_hwsim_beacon_tx drivers/net/wireless/virtual/mac80211_hwsim.c:2281 [inline] mac80211_hwsim_beacon_tx+0x595/0xa40 drivers/net/wireless/virtual/mac80211_hwsim.c:2365 __iterate_interfaces+0x2e5/0x650 net/mac80211/util.c:761 ieee80211_iterate_active_interfaces_atomic+0x71/0x1b0 net/mac80211/util.c:797 mac80211_hwsim_beacon+0x105/0x1b0 drivers/net/wireless/virtual/mac80211_hwsim.c:2395 page last free pid 15382 tgid 15382 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2973 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4c/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_noprof+0x25e/0x770 mm/slub.c:5270 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags+0x93/0xf0 include/linux/audit.h:345 user_path_at+0x24/0x60 fs/namei.c:3575 ksys_umount fs/namespace.c:2058 [inline] __do_sys_umount fs/namespace.c:2066 [inline] __se_sys_umount fs/namespace.c:2064 [inline] __ia32_sys_umount+0x109/0x190 fs/namespace.c:2064 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe8/0x680 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Memory state around the buggy address: ffff888074845c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ffff888074845c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff888074845d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888074845d80: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff888074845e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================