==================================================================
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:1234 [inline]
BUG: KASAN: use-after-free in kfree_skb_reason+0x2f/0x110 net/core/skbuff.c:772
Read of size 4 at addr ffff8880767ec99c by task swapper/0/0
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.18.0-rc1-next-20220407-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
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+0xeb/0x495 mm/kasan/report.c:313
print_report mm/kasan/report.c:429 [inline]
kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491
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:1234 [inline]
kfree_skb_reason+0x2f/0x110 net/core/skbuff.c:772
kfree_skb include/linux/skbuff.h:1250 [inline]
ath9k_hif_usb_reg_in_cb+0x4c5/0x640 drivers/net/wireless/ath/ath9k/hif_usb.c:771
__usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670
usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1747
dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1988
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers.part.0+0x67c/0xa30 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
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:645
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:117 [inline]
RIP: 0010:acpi_idle_do_entry+0x1c6/0x250 drivers/acpi/processor_idle.c:559
Code: 89 de e8 dd e8 13 f8 84 db 75 ac e8 f4 e4 13 f8 e8 2f 33 1a f8 eb 0c e8 e8 e4 13 f8 0f 00 2d b1 65 cc 00 e8 dc e4 13 f8 fb f4 <9c> 5b 81 e3 00 02 00 00 fa 31 ff 48 89 de e8 57 e7 13 f8 48 85 db
RSP: 0018:ffffffff8ba07d60 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffffffff8babc880 RSI: ffffffff89662214 RDI: 0000000000000000
RBP: ffff888140174064 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff81805568 R11: 0000000000000000 R12: 0000000000000001
R13: ffff888140174000 R14: ffff888140174064 R15: ffff888147161804
acpi_idle_enter+0x361/0x500 drivers/acpi/processor_idle.c:696
cpuidle_enter_state+0x1b1/0xc80 drivers/cpuidle/cpuidle.c:237
cpuidle_enter+0x4a/0xa0 drivers/cpuidle/cpuidle.c:351
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
start_kernel+0x47f/0x4a0 init/main.c:1143
secondary_startup_64_no_verify+0xc3/0xcb
Allocated by task 3676:
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:436 [inline]
__kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:469
kasan_slab_alloc include/linux/kasan.h:224 [inline]
slab_post_alloc_hook mm/slab.h:750 [inline]
slab_alloc_node mm/slub.c:3220 [inline]
kmem_cache_alloc_node+0x255/0x3f0 mm/slub.c:3270
__alloc_skb+0x215/0x340 net/core/skbuff.c:414
alloc_skb include/linux/skbuff.h:1300 [inline]
ath9k_hif_usb_alloc_reg_in_urbs drivers/net/wireless/ath/ath9k/hif_usb.c:964 [inline]
ath9k_hif_usb_alloc_urbs+0x91d/0x1050 drivers/net/wireless/ath/ath9k/hif_usb.c:1023
ath9k_hif_usb_dev_init drivers/net/wireless/ath/ath9k/hif_usb.c:1109 [inline]
ath9k_hif_usb_firmware_cb+0x148/0x530 drivers/net/wireless/ath/ath9k/hif_usb.c:1242
request_firmware_work_func+0x12c/0x230 drivers/base/firmware_loader/main.c:1022
process_one_work+0x996/0x1610 kernel/workqueue.c:2289
worker_thread+0x665/0x1080 kernel/workqueue.c:2436
kthread+0x2e9/0x3a0 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
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:366 [inline]
____kasan_slab_free+0x166/0x1a0 mm/kasan/common.c:328
kasan_slab_free include/linux/kasan.h:200 [inline]
slab_free_hook mm/slub.c:1731 [inline]
slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1757
slab_free mm/slub.c:3513 [inline]
kmem_cache_free+0xdd/0x5a0 mm/slub.c:3530
kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:700
kfree_skb_reason+0x85/0x110 include/linux/refcount.h:279
kfree_skb include/linux/skbuff.h:1250 [inline]
ath9k_htc_rx_msg+0x1f0/0xb70 drivers/net/wireless/ath/ath9k/htc_hst.c:456
ath9k_hif_usb_reg_in_cb+0x1ac/0x640 drivers/net/wireless/ath/ath9k/hif_usb.c:740
__usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670
usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1747
dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1988
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers.part.0+0x67c/0xa30 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 ffff8880767ec8c0
which belongs to the cache skbuff_head_cache of size 232
The buggy address is located 220 bytes inside of
232-byte region [ffff8880767ec8c0, ffff8880767ec9a8)
The buggy address belongs to the physical page:
page:ffffea0001d9fb00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x767ec
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 0000000000000000 dead000000000001 ffff888011adc500
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 2951, tgid 2951 (klogd), ts 1430800590260, free_ts 1377237399684
prep_new_page mm/page_alloc.c:2394 [inline]
get_page_from_freelist+0xba2/0x3e00 mm/page_alloc.c:4135
__alloc_pages+0x1b2/0x500 mm/page_alloc.c:5356
alloc_pages+0x1aa/0x310 mm/mempolicy.c:2269
alloc_slab_page mm/slub.c:1802 [inline]
allocate_slab+0x26c/0x3c0 mm/slub.c:1947
new_slab mm/slub.c:2007 [inline]
___slab_alloc+0x8d0/0xf30 mm/slub.c:3008
__slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3095
slab_alloc_node mm/slub.c:3186 [inline]
kmem_cache_alloc_node+0x122/0x3f0 mm/slub.c:3270
__alloc_skb+0x215/0x340 net/core/skbuff.c:414
alloc_skb include/linux/skbuff.h:1300 [inline]
alloc_skb_with_frags+0x93/0x730 net/core/skbuff.c:5995
sock_alloc_send_pskb+0x793/0x920 net/core/sock.c:2600
unix_dgram_sendmsg+0x414/0x1a90 net/unix/af_unix.c:1897
sock_sendmsg_nosec net/socket.c:705 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:725
__sys_sendto+0x216/0x310 net/socket.c:2040
__do_sys_sendto net/socket.c:2052 [inline]
__se_sys_sendto net/socket.c:2048 [inline]
__x64_sys_sendto+0xdd/0x1b0 net/socket.c:2048
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1309 [inline]
free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1359
free_unref_page_prepare mm/page_alloc.c:3281 [inline]
free_unref_page+0x19/0x6a0 mm/page_alloc.c:3376
kasan_depopulate_vmalloc_pte+0x5c/0x70 mm/kasan/shadow.c:359
apply_to_pte_range mm/memory.c:2543 [inline]
apply_to_pmd_range mm/memory.c:2587 [inline]
apply_to_pud_range mm/memory.c:2623 [inline]
apply_to_p4d_range mm/memory.c:2659 [inline]
__apply_to_page_range+0x686/0x1030 mm/memory.c:2693
kasan_release_vmalloc+0xa7/0xc0 mm/kasan/shadow.c:469
__purge_vmap_area_lazy+0x8f9/0x1c50 mm/vmalloc.c:1722
drain_vmap_area_work+0x52/0xe0 mm/vmalloc.c:1761
process_one_work+0x996/0x1610 kernel/workqueue.c:2289
worker_thread+0x665/0x1080 kernel/workqueue.c:2436
kthread+0x2e9/0x3a0 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
Memory state around the buggy address:
ffff8880767ec880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
ffff8880767ec900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880767ec980: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc
^
ffff8880767eca00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880767eca80: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 89 de mov %ebx,%esi
2: e8 dd e8 13 f8 callq 0xf813e8e4
7: 84 db test %bl,%bl
9: 75 ac jne 0xffffffb7
b: e8 f4 e4 13 f8 callq 0xf813e504
10: e8 2f 33 1a f8 callq 0xf81a3344
15: eb 0c jmp 0x23
17: e8 e8 e4 13 f8 callq 0xf813e504
1c: 0f 00 2d b1 65 cc 00 verw 0xcc65b1(%rip) # 0xcc65d4
23: e8 dc e4 13 f8 callq 0xf813e504
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 57 e7 13 f8 callq 0xf813e794
3d: 48 85 db test %rbx,%rbx