================================================================== 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 ffff88804b7d8930 by task kworker/0:0/9 CPU: 0 UID: 0 PID: 9 Comm: kworker/0:0 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 9: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:339 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:365 kasan_slab_alloc include/linux/kasan.h:252 [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 ffff88804b7d88c0 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 112 bytes inside of freed 240-byte region [ffff88804b7d88c0, ffff88804b7d89b0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4b7d8 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000040 ffff88804044ea00 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080190019 00000000f5000000 0000000000000000 head: 04fff00000000040 ffff88804044ea00 dead000000000122 0000000000000000 head: 0000000000000000 0000000080190019 00000000f5000000 0000000000000000 head: 04fff00000000001 ffffea00012df601 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 11962, tgid 11956 (syz.3.1163), ts 649537204938, free_ts 647892165586 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846 prep_new_page mm/page_alloc.c:1854 [inline] get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5210 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_noprof+0x44d/0x770 mm/slub.c:5270 skb_clone+0x190/0x3f0 net/core/skbuff.c:2087 do_one_broadcast net/netlink/af_netlink.c:1455 [inline] netlink_broadcast_filtered+0xb76/0xf90 net/netlink/af_netlink.c:1533 netlink_broadcast+0x39/0x50 net/netlink/af_netlink.c:1557 uevent_net_broadcast_untagged lib/kobject_uevent.c:331 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:410 [inline] kobject_uevent_env+0xcbc/0x1920 lib/kobject_uevent.c:608 device_add+0x1103/0x1980 drivers/base/core.c:3670 hci_register_dev+0x328/0xce0 net/bluetooth/hci_core.c:2621 hci_uart_register_dev drivers/bluetooth/hci_ldisc.c:691 [inline] hci_uart_set_proto drivers/bluetooth/hci_ldisc.c:717 [inline] hci_uart_tty_ioctl+0x89e/0xc80 drivers/bluetooth/hci_ldisc.c:771 tty_compat_ioctl+0x384/0x4d0 drivers/tty/tty_io.c:2980 page last free pid 9 tgid 9 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2943 discard_slab mm/slub.c:3346 [inline] __put_partials+0x130/0x170 mm/slub.c:3886 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:349 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] __kmalloc_cache_noprof+0x282/0x800 mm/slub.c:5771 kmalloc_noprof include/linux/slab.h:957 [inline] usb_control_msg+0xbc/0x4a0 drivers/usb/core/message.c:144 get_port_status drivers/usb/core/hub.c:607 [inline] hub_ext_port_status+0x14e/0x670 drivers/usb/core/hub.c:624 usb_hub_port_status drivers/usb/core/hub.c:674 [inline] hub_port_debounce+0x1a2/0x3f0 drivers/usb/core/hub.c:4705 hub_port_debounce_be_stable drivers/usb/core/hub.h:184 [inline] hub_port_connect drivers/usb/core/hub.c:5419 [inline] hub_port_connect_change drivers/usb/core/hub.c:5707 [inline] port_event drivers/usb/core/hub.c:5871 [inline] hub_event+0x37f7/0x52f0 drivers/usb/core/hub.c:5953 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 Memory state around the buggy address: ffff88804b7d8800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ffff88804b7d8880: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff88804b7d8900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804b7d8980: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff88804b7d8a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================