==================================================================
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 ffff88813d30b450 by task syz-executor.0/21165
CPU: 1 PID: 21165 Comm: syz-executor.0 Not tainted 5.19.0-syzkaller-13666-gffcf9c5700e4 #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:crc32_body+0x28b/0x5f0 lib/crc32.c:111
Code: 49 83 c5 01 31 eb 48 8b 2c 24 44 31 cb 33 1a 48 89 ef 44 31 c3 31 f3 4c 89 ee 31 cb e8 9e b7 2d ff 4c 39 ed 0f 85 f4 fd ff ff <48> 8b 44 24 08 48 8b 3c 24 48 8d 04 f8 48 89 44 24 08 e8 1e bb 2d
RSP: 0018:ffffc900029ff820 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 000000003ad19094 RCX: ffffffff82184dd2
RDX: ffff8881136f9c80 RSI: 0000000000000000 RDI: 0000000000000006
RBP: 000000000000000f R08: 0000000000000006 R09: 000000000000000f
R10: 000000000000000f R11: 0000000000000000 R12: dffffc0000000000
R13: 000000000000000f R14: ffff888121aa0274 R15: ffffffff8662d180
chksum_update+0x4c/0xb0 crypto/crct10dif_generic.c:56
crypto_shash_update+0xc4/0x120 crypto/shash.c:131
ext4_chksum fs/ext4/ext4.h:2465 [inline]
ext4_inode_csum+0x189/0x8d0 fs/ext4/inode.c:61
ext4_inode_csum_set fs/ext4/inode.c:115 [inline]
ext4_inode_csum_set+0x169/0x360 fs/ext4/inode.c:105
ext4_fill_raw_inode+0x118a/0x1e90 fs/ext4/inode.c:4433
ext4_do_update_inode fs/ext4/inode.c:5146 [inline]
ext4_mark_iloc_dirty+0x585/0x1ce0 fs/ext4/inode.c:5741
__ext4_mark_inode_dirty+0x21b/0x8d0 fs/ext4/inode.c:5937
ext4_evict_inode+0xc0e/0x1d40 fs/ext4/inode.c:327
evict+0x2ed/0x6b0 fs/inode.c:664
iput_final fs/inode.c:1744 [inline]
iput.part.0+0x55d/0x810 fs/inode.c:1770
iput+0x58/0x70 fs/inode.c:1760
d_delete_notify include/linux/fsnotify.h:261 [inline]
vfs_rmdir.part.0+0x496/0x5a0 fs/namei.c:4111
vfs_rmdir fs/namei.c:4083 [inline]
do_rmdir+0x3a6/0x430 fs/namei.c:4159
__do_sys_unlinkat fs/namei.c:4339 [inline]
__se_sys_unlinkat fs/namei.c:4333 [inline]
__x64_sys_unlinkat+0xeb/0x130 fs/namei.c:4333
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:0x7f99e4b44be7
Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 07 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd00837fb8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f99e4b44be7
RDX: 0000000000000200 RSI: 00007ffd00839140 RDI: 00000000ffffff9c
RBP: 00007ffd00838080 R08: 0000000000000000 R09: 00007ffd00837e50
R10: 00005555564d2bd3 R11: 0000000000000207 R12: 00007f99e4b9e42e
R13: 00007ffd00839140 R14: 00005555564d2b00 R15: 00007ffd00839180
The buggy address belongs to the physical page:
page:ffffea0004f4c2c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13d30b
flags: 0x200000000000000(node=0|zone=2)
raw: 0200000000000000 0000000000000000 ffffffff00000101 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 23226, tgid 23226 (kworker/1:3), ts 1825209844922, free_ts 1827279752357
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:917
kmalloc_order_trace+0x13/0x120 mm/slab_common.c:933
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:530 [inline]
really_probe+0x249/0xb90 drivers/base/dd.c:609
__driver_probe_device+0x1df/0x4d0 drivers/base/dd.c:748
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:778
__device_attach_driver+0x206/0x2e0 drivers/base/dd.c:901
bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
__device_attach+0x1e4/0x530 drivers/base/dd.c:973
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:530 [inline]
really_probe+0x249/0xb90 drivers/base/dd.c:609
__driver_probe_device+0x1df/0x4d0 drivers/base/dd.c:748
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:778
__device_attach_driver+0x206/0x2e0 drivers/base/dd.c:901
bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
__device_attach+0x1e4/0x530 drivers/base/dd.c:973
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:
ffff88813d30b300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88813d30b380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88813d30b400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88813d30b480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88813d30b500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess):
0: 49 83 c5 01 add $0x1,%r13
4: 31 eb xor %ebp,%ebx
6: 48 8b 2c 24 mov (%rsp),%rbp
a: 44 31 cb xor %r9d,%ebx
d: 33 1a xor (%rdx),%ebx
f: 48 89 ef mov %rbp,%rdi
12: 44 31 c3 xor %r8d,%ebx
15: 31 f3 xor %esi,%ebx
17: 4c 89 ee mov %r13,%rsi
1a: 31 cb xor %ecx,%ebx
1c: e8 9e b7 2d ff callq 0xff2db7bf
21: 4c 39 ed cmp %r13,%rbp
24: 0f 85 f4 fd ff ff jne 0xfffffe1e
* 2a: 48 8b 44 24 08 mov 0x8(%rsp),%rax <-- trapping instruction
2f: 48 8b 3c 24 mov (%rsp),%rdi
33: 48 8d 04 f8 lea (%rax,%rdi,8),%rax
37: 48 89 44 24 08 mov %rax,0x8(%rsp)
3c: e8 .byte 0xe8
3d: 1e (bad)
3e: bb .byte 0xbb
3f: 2d .byte 0x2d