usb 1-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/asm-generic/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:1051 [inline] BUG: KASAN: use-after-free in kfree_skb+0x25/0x2c0 net/core/skbuff.c:706 Read of size 4 at addr ffff8880216cd5d4 by task swapper/0/0 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.11.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x9a/0xcc lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:396 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:413 check_memory_region_inline mm/kasan/generic.c:179 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:185 instrument_atomic_read include/linux/instrumented.h:71 [inline] atomic_read include/asm-generic/atomic-instrumented.h:27 [inline] refcount_read include/linux/refcount.h:147 [inline] skb_unref include/linux/skbuff.h:1051 [inline] kfree_skb+0x25/0x2c0 net/core/skbuff.c:706 ath9k_hif_usb_reg_in_cb+0x46b/0x600 drivers/net/wireless/ath/ath9k/hif_usb.c:764 __usb_hcd_giveback_urb+0x238/0x3f0 drivers/usb/core/hcd.c:1656 dummy_timer+0xeb8/0x2eb0 drivers/usb/gadget/udc/dummy_hcd.c:1971 call_timer_fn+0x163/0x4b0 kernel/time/timer.c:1417 expire_timers kernel/time/timer.c:1462 [inline] __run_timers.part.0+0x52a/0x8b0 kernel/time/timer.c:1731 __run_timers kernel/time/timer.c:1712 [inline] run_timer_softirq+0x9c/0x190 kernel/time/timer.c:1744 __do_softirq+0x29b/0x9f6 kernel/softirq.c:343 asm_call_irq_on_stack+0xf/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0xaa/0xd0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:226 [inline] __irq_exit_rcu kernel/softirq.c:420 [inline] irq_exit_rcu+0x134/0x200 kernel/softirq.c:432 sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:629 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:79 [inline] RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:169 [inline] RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline] RIP: 0010:acpi_idle_do_entry+0x161/0x1c0 drivers/acpi/processor_idle.c:516 Code: 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 75 6d 48 8b 45 00 a8 08 75 c9 e8 8d 19 3a f9 e9 07 00 00 00 0f 00 2d a1 6c b4 00 fb f4 <9c> 58 fa f6 c4 02 74 ae 5d e9 e1 15 3a f9 48 89 ef 5d e9 c8 f9 ff RSP: 0018:ffffffff8a407d90 EFLAGS: 00000202 RAX: 0000000000094161 RBX: ffff888016608865 RCX: 1ffffffff1863dd1 RDX: 0000000000000000 RSI: ffffffff888afa60 RDI: ffffffff88ddc5c0 RBP: ffffffff8a4bb380 R08: 0000000000000001 R09: 0000000000000001 R10: fffffbfff1497670 R11: 0000000000000001 R12: 0000000000000001 R13: ffff888016608864 R14: ffffffff8b09e260 R15: ffff88801847b804 acpi_idle_enter+0x2c0/0x4b0 drivers/acpi/processor_idle.c:647 cpuidle_enter_state+0x152/0xb40 drivers/cpuidle/cpuidle.c:237 cpuidle_enter+0x45/0xa0 drivers/cpuidle/cpuidle.c:351 call_cpuidle kernel/sched/idle.c:158 [inline] cpuidle_idle_call kernel/sched/idle.c:239 [inline] do_idle+0x3e1/0x590 kernel/sched/idle.c:299 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:396 start_kernel+0x330/0x34d init/main.c:1061 secondary_startup_64_no_verify+0xb0/0xbb Allocated by task 5444: 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:401 [inline] ____kasan_kmalloc.constprop.0+0x82/0xa0 mm/kasan/common.c:429 kasan_slab_alloc include/linux/kasan.h:209 [inline] slab_post_alloc_hook mm/slab.h:512 [inline] slab_alloc_node mm/slub.c:2892 [inline] kmem_cache_alloc_node+0x1e0/0x470 mm/slub.c:2928 __alloc_skb+0x42/0x4e0 net/core/skbuff.c:198 alloc_skb include/linux/skbuff.h:1099 [inline] ath9k_hif_usb_alloc_reg_in_urbs drivers/net/wireless/ath/ath9k/hif_usb.c:957 [inline] ath9k_hif_usb_alloc_urbs+0x864/0xed0 drivers/net/wireless/ath/ath9k/hif_usb.c:1016 ath9k_hif_usb_dev_init drivers/net/wireless/ath/ath9k/hif_usb.c:1102 [inline] ath9k_hif_usb_firmware_cb+0x121/0x4d0 drivers/net/wireless/ath/ath9k/hif_usb.c:1235 request_firmware_work_func+0x126/0x230 drivers/base/firmware_loader/main.c:1079 process_one_work+0x84c/0x13b0 kernel/workqueue.c:2275 worker_thread+0x598/0xf80 kernel/workqueue.c:2421 kthread+0x36f/0x450 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Freed by task 0: 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:356 ____kasan_slab_free+0xe1/0x110 mm/kasan/common.c:362 kasan_slab_free include/linux/kasan.h:192 [inline] slab_free_hook mm/slub.c:1547 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1580 slab_free mm/slub.c:3143 [inline] kmem_cache_free+0x82/0x350 mm/slub.c:3159 ath9k_hif_usb_reg_in_cb+0x178/0x600 drivers/net/wireless/ath/ath9k/hif_usb.c:733 __usb_hcd_giveback_urb+0x238/0x3f0 drivers/usb/core/hcd.c:1656 dummy_timer+0xeb8/0x2eb0 drivers/usb/gadget/udc/dummy_hcd.c:1971 call_timer_fn+0x163/0x4b0 kernel/time/timer.c:1417 expire_timers kernel/time/timer.c:1462 [inline] __run_timers.part.0+0x52a/0x8b0 kernel/time/timer.c:1731 __run_timers kernel/time/timer.c:1712 [inline] run_timer_softirq+0x9c/0x190 kernel/time/timer.c:1744 __do_softirq+0x29b/0x9f6 kernel/softirq.c:343 The buggy address belongs to the object at ffff8880216cd500 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 212 bytes inside of 224-byte region [ffff8880216cd500, ffff8880216cd5e0) The buggy address belongs to the page: page:000000008b06fe0f refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x216cd flags: 0xfff00000000200(slab) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff888010238640 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 5444, ts 117259364562 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x144/0x1c0 mm/page_alloc.c:2297 prep_new_page mm/page_alloc.c:2306 [inline] get_page_from_freelist+0x1c6e/0x3f80 mm/page_alloc.c:3945 __alloc_pages_nodemask+0x2d6/0x730 mm/page_alloc.c:4995 alloc_pages include/linux/gfp.h:547 [inline] alloc_slab_page mm/slub.c:1618 [inline] allocate_slab+0x2b6/0x4a0 mm/slub.c:1758 new_slab mm/slub.c:1821 [inline] new_slab_objects mm/slub.c:2578 [inline] ___slab_alloc+0x476/0x790 mm/slub.c:2741 __slab_alloc.constprop.0+0x95/0xe0 mm/slub.c:2781 slab_alloc_node mm/slub.c:2857 [inline] kmem_cache_alloc_node+0x389/0x470 mm/slub.c:2928 __alloc_skb+0x42/0x4e0 net/core/skbuff.c:198 alloc_skb include/linux/skbuff.h:1099 [inline] ath9k_hif_usb_alloc_reg_in_urbs drivers/net/wireless/ath/ath9k/hif_usb.c:957 [inline] ath9k_hif_usb_alloc_urbs+0x864/0xed0 drivers/net/wireless/ath/ath9k/hif_usb.c:1016 ath9k_hif_usb_dev_init drivers/net/wireless/ath/ath9k/hif_usb.c:1102 [inline] ath9k_hif_usb_firmware_cb+0x121/0x4d0 drivers/net/wireless/ath/ath9k/hif_usb.c:1235 request_firmware_work_func+0x126/0x230 drivers/base/firmware_loader/main.c:1079 process_one_work+0x84c/0x13b0 kernel/workqueue.c:2275 worker_thread+0x598/0xf80 kernel/workqueue.c:2421 kthread+0x36f/0x450 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1271 [inline] free_pcp_prepare+0x2cb/0x410 mm/page_alloc.c:1306 free_unref_page_prepare mm/page_alloc.c:3200 [inline] free_unref_page+0x12/0x1b0 mm/page_alloc.c:3248 unfreeze_partials+0x16c/0x1b0 mm/slub.c:2359 put_cpu_partial+0x129/0x200 mm/slub.c:2395 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165 quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 ____kasan_kmalloc.constprop.0+0x98/0xa0 mm/kasan/common.c:412 kasan_slab_alloc include/linux/kasan.h:209 [inline] slab_post_alloc_hook mm/slab.h:512 [inline] slab_alloc_node mm/slub.c:2892 [inline] slab_alloc mm/slub.c:2900 [inline] __kmalloc+0x1db/0x3e0 mm/slub.c:3981 kmalloc include/linux/slab.h:557 [inline] tomoyo_realpath_from_path+0xb0/0x6a0 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x1a6/0x4d0 security/tomoyo/file.c:723 security_file_ioctl+0x44/0x80 security/security.c:1482 __do_sys_ioctl fs/ioctl.c:747 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x99/0x190 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Memory state around the buggy address: ffff8880216cd480: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ffff8880216cd500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880216cd580: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff8880216cd600: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff8880216cd680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 5 bytes skipped: 0: 48 c1 ea 03 shr $0x3,%rdx 4: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 8: 75 6d jne 0x77 a: 48 8b 45 00 mov 0x0(%rbp),%rax e: a8 08 test $0x8,%al 10: 75 c9 jne 0xffffffdb 12: e8 8d 19 3a f9 callq 0xf93a19a4 17: e9 07 00 00 00 jmpq 0x23 1c: 0f 00 2d a1 6c b4 00 verw 0xb46ca1(%rip) # 0xb46cc4 23: fb sti 24: f4 hlt * 25: 9c pushfq <-- trapping instruction 26: 58 pop %rax 27: fa cli 28: f6 c4 02 test $0x2,%ah 2b: 74 ae je 0xffffffdb 2d: 5d pop %rbp 2e: e9 e1 15 3a f9 jmpq 0xf93a1614 33: 48 89 ef mov %rbp,%rdi 36: 5d pop %rbp 37: e9 .byte 0xe9 38: c8 .byte 0xc8 39: f9 stc 3a: ff .byte 0xff