usb 4-1: RX USB error -2.
usb 4-1: error -1 when submitting rx urb
==================================================================
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 ffff88813411f450 by task udevd/15034
CPU: 0 PID: 15034 Comm: udevd Not tainted 6.0.0-rc4-syzkaller-00050-ga956f91247da #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:trace_lock_acquire include/trace/events/lock.h:24 [inline]
RIP: 0010:lock_acquire+0x474/0x570 kernel/locking/lockdep.c:5637
Code: 3a fc ff ff 65 ff 05 cb 43 d8 7e 48 c7 c0 40 d2 d3 88 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 85 af 00 00 00 <48> 8b 05 65 a7 a9 07 e8 60 19 06 00 85 c0 74 17 65 ff 0d 95 43 d8
RSP: 0018:ffffc9000e63f7b0 EFLAGS: 00000246
RAX: 1ffffffff11a7a48 RBX: 1ffff92001cc7ef8 RCX: ffffffff812a2718
RDX: dffffc0000000000 RSI: 0000000000000008 RDI: ffffffff88de9990
RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff88de9997
R10: fffffbfff11bd332 R11: 0000000000052040 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8881001ac2a8 R15: 0000000000000000
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x12f/0x1350 kernel/locking/mutex.c:747
kernfs_open_file_mutex_lock fs/kernfs/file.c:54 [inline]
kernfs_get_open_node fs/kernfs/file.c:586 [inline]
kernfs_fop_open+0x7cd/0xfd0 fs/kernfs/file.c:750
do_dentry_open+0x49c/0x1240 fs/open.c:878
do_open fs/namei.c:3557 [inline]
path_openat+0x1c92/0x28f0 fs/namei.c:3691
do_filp_open+0x1b6/0x400 fs/namei.c:3718
do_sys_openat2+0x16d/0x4c0 fs/open.c:1311
do_sys_open fs/open.c:1327 [inline]
__do_sys_openat fs/open.c:1343 [inline]
__se_sys_openat fs/open.c:1338 [inline]
__x64_sys_openat+0x13f/0x1f0 fs/open.c:1338
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+0x63/0xcd
RIP: 0033:0x7fc64b792697
Code: 25 00 00 41 00 3d 00 00 41 00 74 37 64 8b 04 25 18 00 00 00 85 c0 75 5b 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 85 00 00 00 48 83 c4 68 5d 41 5c c3 0f 1f
RSP: 002b:00007ffdbc055aa0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000557c52cf32b0 RCX: 00007fc64b792697
RDX: 0000000000080000 RSI: 00007ffdbc055bd8 RDI: 00000000ffffff9c
RBP: 00007ffdbc055bd8 R08: 0000000000000008 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080000
R13: 0000557c52cf32b0 R14: 0000000000000001 R15: 0000557c51f2c160
The buggy address belongs to the physical page:
page:ffffea0004d047c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13411f
flags: 0x200000000000000(node=0|zone=2)
raw: 0200000000000000 0000000000000000 dead000000000122 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 4134, tgid 4134 (kworker/0:3), ts 1072460026826, free_ts 1074510258391
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:
ffff88813411f300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88813411f380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88813411f400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88813411f480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88813411f500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess), 3 bytes skipped:
0: ff 65 ff jmpq *-0x1(%rbp)
3: 05 cb 43 d8 7e add $0x7ed843cb,%eax
8: 48 c7 c0 40 d2 d3 88 mov $0xffffffff88d3d240,%rax
f: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx
16: fc ff df
19: 48 c1 e8 03 shr $0x3,%rax
1d: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1)
21: 0f 85 af 00 00 00 jne 0xd6
* 27: 48 8b 05 65 a7 a9 07 mov 0x7a9a765(%rip),%rax # 0x7a9a793 <-- trapping instruction
2e: e8 60 19 06 00 callq 0x61993
33: 85 c0 test %eax,%eax
35: 74 17 je 0x4e
37: 65 gs
38: ff .byte 0xff
39: 0d .byte 0xd
3a: 95 xchg %eax,%ebp
3b: 43 rex.XB
3c: d8 .byte 0xd8