================================================================== BUG: KASAN: use-after-free in hci_cmd_timeout+0x203/0x210 net/bluetooth/hci_core.c:2774 Read of size 2 at addr ffff88801a078008 by task kworker/1:4/25974 CPU: 1 PID: 25974 Comm: kworker/1:4 Not tainted 5.15.0-rc5-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+0xcd/0x134 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+0x203/0x210 net/bluetooth/hci_core.c:2774 process_one_work+0x9bf/0x16b0 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x3e5/0x4d0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 21312: 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+0x3ac/0x4d0 net/batman-adv/send.c:519 batadv_iv_ogm_aggregate_new+0x134/0x4e0 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+0xe46/0x1430 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+0x740/0x8e0 net/batman-adv/bat_iv_ogm.c:1713 process_one_work+0x9bf/0x16b0 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x3e5/0x4d0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Freed by task 29986: 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:654 [inline] skb_release_data+0x65a/0x790 net/core/skbuff.c:676 skb_release_all net/core/skbuff.c:741 [inline] __kfree_skb net/core/skbuff.c:755 [inline] kfree_skb net/core/skbuff.c:773 [inline] kfree_skb+0x133/0x3f0 net/core/skbuff.c:767 hci_dev_do_open+0xa50/0x1a00 net/bluetooth/hci_core.c:1634 hci_power_on+0x133/0x650 net/bluetooth/hci_core.c:2263 process_one_work+0x9bf/0x16b0 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x3e5/0x4d0 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+0x48/0x370 kernel/workqueue.c:1353 __queue_work+0x5ca/0xee0 kernel/workqueue.c:1519 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1461 [inline] __run_timers.part.0+0x49f/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 Second to 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+0x48/0x370 kernel/workqueue.c:1353 __queue_work+0x5ca/0xee0 kernel/workqueue.c:1519 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1461 [inline] __run_timers.part.0+0x49f/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 The buggy address belongs to the object at ffff88801a078000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes inside of 512-byte region [ffff88801a078000, ffff88801a078200) The buggy address belongs to the page: page:ffffea0000681e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1a078 head:ffffea0000681e00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00007cb500 0000000400000004 ffff888010c41c80 raw: 0000000000000000 0000000000100010 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 678, ts 7299656285, free_ts 0 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4153 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5375 alloc_pages+0x1a7/0x300 mm/mempolicy.c:2197 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+0x921/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+0x51/0x8f0 fs/exec.c:1505 kernel_execve+0x55/0x460 fs/exec.c:1945 call_usermodehelper_exec_async+0x2e3/0x580 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: ffff88801a077f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801a077f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801a078000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801a078080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801a078100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================