================================================================== BUG: KASAN: use-after-free in hci_cmd_timeout+0x1e5/0x1f0 net/bluetooth/hci_core.c:1474 Read of size 2 at addr ffff888018e9d408 by task kworker/0:1/4416 CPU: 0 PID: 4416 Comm: kworker/0:1 Not tainted 5.15.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events hci_cmd_timeout Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 hci_cmd_timeout+0x1e5/0x1f0 net/bluetooth/hci_core.c:1474 process_one_work+0x87f/0x1450 kernel/workqueue.c:2297 worker_thread+0x598/0x1040 kernel/workqueue.c:2444 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 986: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa4/0xd0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:591 [inline] batadv_forw_packet_alloc+0x2c6/0x3c0 net/batman-adv/send.c:519 batadv_iv_ogm_aggregate_new+0xf3/0x480 net/batman-adv/bat_iv_ogm.c:563 batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:671 [inline] batadv_iv_ogm_schedule_buff+0xbc0/0x1030 net/batman-adv/bat_iv_ogm.c:850 batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:869 [inline] batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:862 [inline] batadv_iv_send_outstanding_bat_ogm_packet+0x59f/0x8f0 net/batman-adv/bat_iv_ogm.c:1713 process_one_work+0x87f/0x1450 kernel/workqueue.c:2297 worker_thread+0x598/0x1040 kernel/workqueue.c:2444 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Freed by task 3577: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:360 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xff/0x130 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1700 [inline] slab_free_freelist_hook+0x81/0x190 mm/slub.c:1725 slab_free mm/slub.c:3483 [inline] kfree+0xe4/0x530 mm/slub.c:4543 skb_free_head net/core/skbuff.c:653 [inline] skb_release_data+0x500/0x640 net/core/skbuff.c:675 skb_release_all net/core/skbuff.c:740 [inline] __kfree_skb net/core/skbuff.c:754 [inline] kfree_skb net/core/skbuff.c:772 [inline] kfree_skb+0xe0/0x2c0 net/core/skbuff.c:766 hci_dev_open_sync+0x765/0x1990 net/bluetooth/hci_sync.c:3896 hci_dev_do_open+0x23/0x60 net/bluetooth/hci_core.c:482 hci_power_on+0xf6/0x4c0 net/bluetooth/hci_core.c:963 process_one_work+0x87f/0x1450 kernel/workqueue.c:2297 worker_thread+0x598/0x1040 kernel/workqueue.c:2444 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe9/0x110 mm/kasan/generic.c:348 insert_work+0x42/0x300 kernel/workqueue.c:1353 __queue_work+0x4a5/0xc80 kernel/workqueue.c:1519 call_timer_fn+0x163/0x4a0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1461 [inline] __run_timers.part.0+0x3b0/0x890 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0x9c/0x190 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 The buggy address belongs to the object at ffff888018e9d400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes inside of 512-byte region [ffff888018e9d400, ffff888018e9d600) The buggy address belongs to the page: page:ffffea000063a700 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x18e9c head:ffffea000063a700 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00006a8300 0000000200000002 ffff88800fc41c80 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 526, ts 4712550840, free_ts 0 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0xa6f/0x2f50 mm/page_alloc.c:4153 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5375 alloc_slab_page mm/slub.c:1763 [inline] allocate_slab mm/slub.c:1900 [inline] new_slab+0x319/0x490 mm/slub.c:1963 ___slab_alloc+0x923/0xfe0 mm/slub.c:2994 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3081 slab_alloc_node mm/slub.c:3172 [inline] slab_alloc mm/slub.c:3214 [inline] kmem_cache_alloc_trace+0x293/0x2b0 mm/slub.c:3231 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] alloc_bprm+0x4c/0x850 fs/exec.c:1505 kernel_execve+0x37/0x3e0 fs/exec.c:1945 call_usermodehelper_exec_async+0x2c1/0x500 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 page_owner free stack trace missing Memory state around the buggy address: ffff888018e9d300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888018e9d380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888018e9d400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888018e9d480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888018e9d500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================