usb 3-1: ath: unknown panic pattern! ================================================================== BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] BUG: KASAN: use-after-free in refcount_read include/linux/refcount.h:147 [inline] BUG: KASAN: use-after-free in skb_unref include/linux/skbuff.h:1197 [inline] BUG: KASAN: use-after-free in kfree_skb_reason+0x33/0x410 net/core/skbuff.c:885 Read of size 4 at addr ffff888017005864 by task swapper/0/0 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.0.0-syzkaller-06475-g4c86114194e6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:71 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] refcount_read include/linux/refcount.h:147 [inline] skb_unref include/linux/skbuff.h:1197 [inline] kfree_skb_reason+0x33/0x410 net/core/skbuff.c:885 kfree_skb include/linux/skbuff.h:1214 [inline] ath9k_hif_usb_reg_in_cb+0x4c5/0x640 drivers/net/wireless/ath/ath9k/hif_usb.c:770 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1671 usb_hcd_giveback_urb+0x380/0x430 drivers/usb/core/hcd.c:1754 dummy_timer+0x11ff/0x32c0 drivers/usb/gadget/udc/dummy_hcd.c:1988 call_timer_fn+0x1a0/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers.part.0+0x674/0xa80 kernel/time/timer.c:1790 __run_timers kernel/time/timer.c:1768 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803 __do_softirq+0x1d0/0x9c8 kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1107 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:29 [inline] RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:70 [inline] RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:130 [inline] RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:113 [inline] RIP: 0010:acpi_idle_do_entry+0x1fd/0x2a0 drivers/acpi/processor_idle.c:572 Code: 89 de e8 36 46 f3 f7 84 db 75 ac e8 ad 49 f3 f7 e8 e8 c0 f9 f7 eb 0c e8 a1 49 f3 f7 0f 00 2d 2a 77 cd 00 e8 95 49 f3 f7 fb f4 <9c> 5b 81 e3 00 02 00 00 fa 31 ff 48 89 de e8 60 46 f3 f7 48 85 db RSP: 0018:ffffffff8bc07d30 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffffffff8bcbc980 RSI: ffffffff8987cc1b RDI: 0000000000000000 RBP: ffff888017548864 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001 R13: ffff888017548800 R14: ffff888017548864 R15: ffff88801a339804 acpi_idle_enter+0x364/0x500 drivers/acpi/processor_idle.c:709 cpuidle_enter_state+0x1ab/0xd30 drivers/cpuidle/cpuidle.c:239 cpuidle_enter+0x4a/0xa0 drivers/cpuidle/cpuidle.c:356 call_cpuidle kernel/sched/idle.c:155 [inline] cpuidle_idle_call kernel/sched/idle.c:236 [inline] do_idle+0x3e8/0x590 kernel/sched/idle.c:303 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:400 rest_init+0x169/0x270 init/main.c:727 arch_call_rest_init+0xf/0x14 init/main.c:883 start_kernel+0x46e/0x48f init/main.c:1138 secondary_startup_64_no_verify+0xce/0xdb Allocated by task 3702: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:470 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:727 [inline] slab_alloc_node mm/slub.c:3248 [inline] kmem_cache_alloc_node+0x2b1/0x3f0 mm/slub.c:3298 __alloc_skb+0x210/0x2f0 net/core/skbuff.c:497 alloc_skb include/linux/skbuff.h:1265 [inline] ath9k_hif_usb_alloc_reg_in_urbs drivers/net/wireless/ath/ath9k/hif_usb.c:963 [inline] ath9k_hif_usb_alloc_urbs+0x91d/0x1050 drivers/net/wireless/ath/ath9k/hif_usb.c:1022 ath9k_hif_usb_dev_init drivers/net/wireless/ath/ath9k/hif_usb.c:1108 [inline] ath9k_hif_usb_firmware_cb+0x148/0x530 drivers/net/wireless/ath/ath9k/hif_usb.c:1241 request_firmware_work_func+0x12c/0x230 drivers/base/firmware_loader/main.c:1107 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Freed by task 0: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:367 [inline] ____kasan_slab_free+0x166/0x1c0 mm/kasan/common.c:329 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1759 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1785 slab_free mm/slub.c:3539 [inline] kmem_cache_free+0xeb/0x5b0 mm/slub.c:3556 kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:812 __kfree_skb net/core/skbuff.c:869 [inline] kfree_skb_reason+0x15b/0x410 net/core/skbuff.c:891 kfree_skb include/linux/skbuff.h:1214 [inline] ath9k_htc_rx_msg+0x357/0xbd0 drivers/net/wireless/ath/ath9k/htc_hst.c:469 ath9k_hif_usb_reg_in_cb+0x1ac/0x640 drivers/net/wireless/ath/ath9k/hif_usb.c:739 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1671 usb_hcd_giveback_urb+0x380/0x430 drivers/usb/core/hcd.c:1754 dummy_timer+0x11ff/0x32c0 drivers/usb/gadget/udc/dummy_hcd.c:1988 call_timer_fn+0x1a0/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers.part.0+0x674/0xa80 kernel/time/timer.c:1790 __run_timers kernel/time/timer.c:1768 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803 __do_softirq+0x1d0/0x9c8 kernel/softirq.c:571 The buggy address belongs to the object at ffff888017005780 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 228 bytes inside of 240-byte region [ffff888017005780, ffff888017005870) The buggy address belongs to the physical page: page:ffffea00005c0140 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x17005 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00018b0240 dead000000000005 ffff8880126f7500 raw: 0000000000000000 00000000000c000c 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 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 3698, tgid 3698 (kworker/0:5), ts 1342465685090, free_ts 1149378547170 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5549 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:1829 [inline] allocate_slab+0x27e/0x3d0 mm/slub.c:1974 new_slab mm/slub.c:2034 [inline] ___slab_alloc+0x84f/0xe80 mm/slub.c:3036 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3123 slab_alloc_node mm/slub.c:3214 [inline] kmem_cache_alloc_node+0x11d/0x3f0 mm/slub.c:3298 __alloc_skb+0x210/0x2f0 net/core/skbuff.c:497 alloc_skb include/linux/skbuff.h:1265 [inline] nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:742 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:799 [inline] nsim_dev_trap_report_work+0x2ad/0xc50 drivers/net/netdevsim/dev.c:844 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 kasan_depopulate_vmalloc_pte+0x5c/0x70 mm/kasan/shadow.c:372 apply_to_pte_range mm/memory.c:2633 [inline] apply_to_pmd_range mm/memory.c:2677 [inline] apply_to_pud_range mm/memory.c:2713 [inline] apply_to_p4d_range mm/memory.c:2749 [inline] __apply_to_page_range+0x686/0x1030 mm/memory.c:2783 kasan_release_vmalloc+0xa7/0xc0 mm/kasan/shadow.c:486 __purge_vmap_area_lazy+0x885/0x1c50 mm/vmalloc.c:1753 drain_vmap_area_work+0x52/0xe0 mm/vmalloc.c:1782 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff888017005700: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ffff888017005780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888017005800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ^ ffff888017005880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff888017005900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 89 de mov %ebx,%esi 2: e8 36 46 f3 f7 callq 0xf7f3463d 7: 84 db test %bl,%bl 9: 75 ac jne 0xffffffb7 b: e8 ad 49 f3 f7 callq 0xf7f349bd 10: e8 e8 c0 f9 f7 callq 0xf7f9c0fd 15: eb 0c jmp 0x23 17: e8 a1 49 f3 f7 callq 0xf7f349bd 1c: 0f 00 2d 2a 77 cd 00 verw 0xcd772a(%rip) # 0xcd774d 23: e8 95 49 f3 f7 callq 0xf7f349bd 28: fb sti 29: f4 hlt * 2a: 9c pushfq <-- trapping instruction 2b: 5b pop %rbx 2c: 81 e3 00 02 00 00 and $0x200,%ebx 32: fa cli 33: 31 ff xor %edi,%edi 35: 48 89 de mov %rbx,%rsi 38: e8 60 46 f3 f7 callq 0xf7f3469d 3d: 48 85 db test %rbx,%rbx