==================================================================
BUG: KASAN: use-after-free in ar5523_cmd_tx_cb+0x220/0x240 drivers/net/wireless/ath/ar5523/ar5523.c:228
Read of size 8 at addr ffff888111b93450 by task syz-executor.4/8899
CPU: 0 PID: 8899 Comm: syz-executor.4 Not tainted 6.0.0-rc4-syzkaller-00055-g6690986da1e2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/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
ar5523_cmd_tx_cb+0x220/0x240 drivers/net/wireless/ath/ar5523/ar5523.c:228
__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+0x1c0/0x9a9 kernel/softirq.c:571
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x113/0x170 kernel/softirq.c:650
irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
sysvec_apic_timer_interrupt+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:lockdep_enabled kernel/locking/lockdep.c:121 [inline]
RIP: 0010:lock_is_held_type+0x3a/0x140 kernel/locking/lockdep.c:5702
Code: 48 83 ec 08 8b 0d a2 a9 ea 02 85 c9 0f 84 d9 00 00 00 65 8b 05 0f 78 0e 7a 85 c0 0f 85 ca 00 00 00 65 4c 8b 24 25 c0 6e 02 00 <41> 8b 94 24 f4 09 00 00 85 d2 0f 85 b1 00 00 00 48 89 fd 41 89 f6
RSP: 0000:ffffc90007fdfb10 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 1ffff92000ffbf6e RCX: 0000000000000001
RDX: 0000000000000003 RSI: 00000000ffffffff RDI: ffffffff87a94fe0
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff88de98d7
R10: fffffbfff11bd31a R11: 0000000000000000 R12: ffff88811ccc3900
R13: 00000000ffffffff R14: ffffffff87a950a0 R15: 0000000000000000
lock_is_held include/linux/lockdep.h:283 [inline]
rcu_read_lock_sched_held+0x3a/0x70 kernel/rcu/update.c:125
trace_lock_acquire include/trace/events/lock.h:24 [inline]
lock_acquire+0x480/0x570 kernel/locking/lockdep.c:5637
rcu_lock_acquire include/linux/rcupdate.h:280 [inline]
rcu_read_lock include/linux/rcupdate.h:706 [inline]
percpu_ref_tryget_many include/linux/percpu-refcount.h:241 [inline]
percpu_ref_tryget include/linux/percpu-refcount.h:266 [inline]
obj_cgroup_tryget include/linux/memcontrol.h:796 [inline]
__get_obj_cgroup_from_memcg+0x55/0x270 mm/memcontrol.c:2945
get_obj_cgroup_from_current+0x116/0x250 mm/memcontrol.c:2965
memcg_slab_pre_alloc_hook mm/slab.h:480 [inline]
slab_pre_alloc_hook mm/slab.h:705 [inline]
slab_alloc_node mm/slub.c:3157 [inline]
slab_alloc mm/slub.c:3251 [inline]
__kmem_cache_alloc_lru mm/slub.c:3258 [inline]
kmem_cache_alloc+0x82/0x4a0 mm/slub.c:3268
anon_vma_alloc mm/rmap.c:93 [inline]
__anon_vma_prepare+0x2c8/0x580 mm/rmap.c:202
anon_vma_prepare include/linux/rmap.h:159 [inline]
do_anonymous_page mm/memory.c:4082 [inline]
handle_pte_fault mm/memory.c:4909 [inline]
__handle_mm_fault+0x24bf/0x31c0 mm/memory.c:5053
handle_mm_fault+0x1c8/0x780 mm/memory.c:5151
do_user_addr_fault+0x475/0x1210 arch/x86/mm/fault.c:1397
handle_page_fault arch/x86/mm/fault.c:1488 [inline]
exc_page_fault+0x94/0x170 arch/x86/mm/fault.c:1544
asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0033:0x7f738f6c571d
Code: 0f 11 5f 30 0f 11 64 17 f0 0f 11 6c 17 e0 0f 11 74 17 d0 0f 11 7c 17 c0 c3 0f 10 06 0f 10 4e 10 0f 10 54 16 f0 0f 10 5c 16 e0 <0f> 11 07 0f 11 4f 10 0f 11 54 17 f0 0f 11 5c 17 e0 c3 48 39 f7 0f
RSP: 002b:00007ffec8c01328 EFLAGS: 00010287
RAX: 0000000020000200 RBX: 0000000000000000 RCX: 000000000028bdb0
RDX: 0000000000000033 RSI: 00007f738f7e1020 RDI: 0000000020000200
RBP: 00007ffec8c013e8 R08: 00007f738fbe1000 R09: 00007f738f7e1008
R10: 00007ffec8cdc090 R11: 000000000007c900 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000001 R15: 00007ffec8c015d0
The buggy address belongs to the physical page:
page:ffffea000446e4c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111b93
flags: 0x200000000000000(node=0|zone=2)
raw: 0200000000000000 0000000000000000 ffffea000446e4c8 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x140dc0(GFP_USER|__GFP_COMP|__GFP_ZERO), pid 6273, tgid 6273 (kworker/0:0), ts 2668543582615, free_ts 2670584007310
prep_new_page mm/page_alloc.c:2532 [inline]
get_page_from_freelist+0x11cc/0x2a20 mm/page_alloc.c:4283
__alloc_pages+0x1c7/0x510 mm/page_alloc.c:5515
alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270
kmalloc_order+0x34/0xf0 mm/slab_common.c:930
kmalloc_order_trace+0x13/0x120 mm/slab_common.c:946
kmalloc include/linux/slab.h:605 [inline]
kzalloc include/linux/slab.h:733 [inline]
wiphy_new_nm+0x6fc/0x2090 net/wireless/core.c:440
ieee80211_alloc_hw_nm+0x44b/0x2450 net/mac80211/main.c:668
ieee80211_alloc_hw include/net/mac80211.h:4511 [inline]
ar5523_probe+0x11a/0x1d10 drivers/net/wireless/ath/ar5523/ar5523.c:1595
usb_probe_interface+0x30b/0x7f0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:560 [inline]
really_probe+0x249/0xb90 drivers/base/dd.c:639
__driver_probe_device+0x1df/0x4d0 drivers/base/dd.c:778
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:808
__device_attach_driver+0x1d0/0x2e0 drivers/base/dd.c:936
bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
__device_attach+0x1e4/0x530 drivers/base/dd.c:1008
bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487
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+0x5d2/0xb80 mm/page_alloc.c:1499
free_unref_page_prepare mm/page_alloc.c:3380 [inline]
free_unref_page+0x19/0x420 mm/page_alloc.c:3476
device_release+0x9f/0x240 drivers/base/core.c:2330
kobject_cleanup lib/kobject.c:673 [inline]
kobject_release lib/kobject.c:704 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x1be/0x4c0 lib/kobject.c:721
put_device+0x1b/0x30 drivers/base/core.c:3624
ar5523_probe+0xe38/0x1d10 drivers/net/wireless/ath/ar5523/ar5523.c:1719
usb_probe_interface+0x30b/0x7f0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:560 [inline]
really_probe+0x249/0xb90 drivers/base/dd.c:639
__driver_probe_device+0x1df/0x4d0 drivers/base/dd.c:778
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:808
__device_attach_driver+0x1d0/0x2e0 drivers/base/dd.c:936
bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
__device_attach+0x1e4/0x530 drivers/base/dd.c:1008
bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487
device_add+0xbd5/0x1e90 drivers/base/core.c:3517
usb_set_configuration+0x1019/0x1900 drivers/usb/core/message.c:2170
Memory state around the buggy address:
ffff888111b93300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888111b93380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888111b93400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888111b93480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888111b93500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess):
0: 48 83 ec 08 sub $0x8,%rsp
4: 8b 0d a2 a9 ea 02 mov 0x2eaa9a2(%rip),%ecx # 0x2eaa9ac
a: 85 c9 test %ecx,%ecx
c: 0f 84 d9 00 00 00 je 0xeb
12: 65 8b 05 0f 78 0e 7a mov %gs:0x7a0e780f(%rip),%eax # 0x7a0e7828
19: 85 c0 test %eax,%eax
1b: 0f 85 ca 00 00 00 jne 0xeb
21: 65 4c 8b 24 25 c0 6e mov %gs:0x26ec0,%r12
28: 02 00
* 2a: 41 8b 94 24 f4 09 00 mov 0x9f4(%r12),%edx <-- trapping instruction
31: 00
32: 85 d2 test %edx,%edx
34: 0f 85 b1 00 00 00 jne 0xeb
3a: 48 89 fd mov %rdi,%rbp
3d: 41 89 f6 mov %esi,%r14d