==================================================================
BUG: KASAN: slab-out-of-bounds in ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:642 [inline]
BUG: KASAN: slab-out-of-bounds in ath9k_hif_usb_rx_cb+0xea7/0x10d0 drivers/net/wireless/ath/ath9k/hif_usb.c:686
Read of size 4 at addr ffff888108dac2e8 by task udevd/31962
CPU: 1 PID: 31962 Comm: udevd Not tainted 5.19.0-rc7-syzkaller-00199-g8288c99fc263 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
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
ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:642 [inline]
ath9k_hif_usb_rx_cb+0xea7/0x10d0 drivers/net/wireless/ath/ath9k/hif_usb.c:686
__usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670
usb_hcd_giveback_urb+0x380/0x430 drivers/usb/core/hcd.c:1753
dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1988
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1519 [inline]
__run_timers.part.0+0x679/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+0x288/0x9a5 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:stack_trace_consume_entry+0xd3/0x160 kernel/stacktrace.c:93
Code: 02 00 0f 85 92 00 00 00 8d 45 01 89 43 10 48 8b 03 48 8d 2c e8 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 80 3c 02 00 <75> 5c 48 89 75 00 8b 43 08 39 43 10 0f 92 c0 48 83 c4 08 5b 5d c3
RSP: 0018:ffffc90003cff628 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: ffffc90003cff700 RCX: 0000000000000000
RDX: 1ffff9200079fef8 RSI: ffffffff85ee0d75 RDI: ffffc90003cff70c
RBP: ffffc90003cff7c0 R08: 0000000000000001 R09: ffffc90003cff67c
R10: fffff5200079fed4 R11: ffffc90003cfff38 R12: ffffc90003cff700
R13: 0000000000000000 R14: ffff888116630000 R15: 0000000000000053
arch_stack_walk+0x6d/0xe0 arch/x86/kernel/stacktrace.c:27
stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:122
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_kmalloc mm/kasan/common.c:515 [inline]
__kasan_kmalloc+0x81/0xa0 mm/kasan/common.c:524
kmalloc include/linux/slab.h:605 [inline]
kzalloc include/linux/slab.h:733 [inline]
tomoyo_encode2.part.0+0xe9/0x3a0 security/tomoyo/realpath.c:45
tomoyo_encode2 security/tomoyo/realpath.c:31 [inline]
tomoyo_encode+0x28/0x50 security/tomoyo/realpath.c:80
tomoyo_realpath_from_path+0x186/0x620 security/tomoyo/realpath.c:288
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x21b/0x400 security/tomoyo/file.c:822
security_inode_getattr+0xcf/0x140 security/security.c:1344
vfs_getattr fs/stat.c:157 [inline]
vfs_statx+0x16a/0x390 fs/stat.c:232
vfs_fstatat+0x8c/0xb0 fs/stat.c:255
__do_sys_newfstatat+0x91/0x110 fs/stat.c:425
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:0x7f6d842ff1da
Code: 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 0b 00 00 00 66 2e 0f 1f 84 00 00 00 00 00 90 41 89 ca b8 06 01 00 00 0f 05 <3d> 00 f0 ff ff 77 07 31 c0 c3 0f 1f 40 00 48 8b 15 69 fc 0c 00 f7
RSP: 002b:00007fff61e3a6d8 EFLAGS: 00000202 ORIG_RAX: 0000000000000106
RAX: ffffffffffffffda RBX: 00007f6d843cc380 RCX: 00007f6d842ff1da
RDX: 00007fff61e3a6e0 RSI: 00007f6d8439575a RDI: 0000000000000008
RBP: 000055cbc479d020 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000001000 R11: 0000000000000202 R12: 000055cbc479d020
R13: 0000000000000000 R14: 00007fff61e3acb8 R15: 0000000000003fff
The buggy address belongs to the physical page:
page:ffffea0004236a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x108da8
head:ffffea0004236a00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x200000000010000(head|node=0|zone=2)
raw: 0200000000010000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x140cc0(GFP_USER|__GFP_COMP), pid 20, tgid 20 (kworker/1:0), ts 2537404639357, free_ts 2537390566257
prep_new_page mm/page_alloc.c:2456 [inline]
get_page_from_freelist+0x138c/0x27a0 mm/page_alloc.c:4198
__alloc_pages+0x1c7/0x510 mm/page_alloc.c:5426
alloc_pages+0x1aa/0x310 mm/mempolicy.c:2272
kmalloc_order+0x34/0xf0 mm/slab_common.c:945
kmalloc_order_trace+0x14/0x120 mm/slab_common.c:961
kmalloc_array include/linux/slab.h:640 [inline]
iowarrior_probe+0xaa6/0x12e0 drivers/usb/misc/iowarrior.c:837
usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:555 [inline]
really_probe+0x23e/0xb90 drivers/base/dd.c:634
__driver_probe_device+0x338/0x4d0 drivers/base/dd.c:764
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:794
__device_attach_driver+0x20b/0x2f0 drivers/base/dd.c:917
bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
__device_attach+0x1e4/0x530 drivers/base/dd.c:989
bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487
device_add+0xbda/0x1ea0 drivers/base/core.c:3428
usb_set_configuration+0x101e/0x1900 drivers/usb/core/message.c:2170
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1371 [inline]
free_pcp_prepare+0x537/0xb80 mm/page_alloc.c:1421
free_unref_page_prepare mm/page_alloc.c:3343 [inline]
free_unref_page+0x19/0x5a0 mm/page_alloc.c:3438
device_release+0x9f/0x240 drivers/base/core.c:2241
kobject_cleanup lib/kobject.c:673 [inline]
kobject_release lib/kobject.c:704 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x1c8/0x540 lib/kobject.c:721
put_device+0x1b/0x30 drivers/base/core.c:3535
ath9k_htc_probe_device+0x1c7/0x1f00 drivers/net/wireless/ath/ath9k/htc_drv_init.c:976
ath9k_htc_hw_init+0x31/0x60 drivers/net/wireless/ath/ath9k/htc_hst.c:508
ath9k_hif_usb_firmware_cb+0x274/0x530 drivers/net/wireless/ath/ath9k/hif_usb.c:1245
request_firmware_work_func+0x12c/0x230 drivers/base/firmware_loader/main.c:1107
process_one_work+0x996/0x1610 kernel/workqueue.c:2289
worker_thread+0x665/0x1080 kernel/workqueue.c:2436
kthread+0x2ef/0x3a0 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
Memory state around the buggy address:
ffff888108dac180: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
ffff888108dac200: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
>ffff888108dac280: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
^
ffff888108dac300: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
ffff888108dac380: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
==================================================================
----------------
Code disassembly (best guess):
0: 02 00 add (%rax),%al
2: 0f 85 92 00 00 00 jne 0x9a
8: 8d 45 01 lea 0x1(%rbp),%eax
b: 89 43 10 mov %eax,0x10(%rbx)
e: 48 8b 03 mov (%rbx),%rax
11: 48 8d 2c e8 lea (%rax,%rbp,8),%rbp
15: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
1c: fc ff df
1f: 48 89 ea mov %rbp,%rdx
22: 48 c1 ea 03 shr $0x3,%rdx
26: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
* 2a: 75 5c jne 0x88 <-- trapping instruction
2c: 48 89 75 00 mov %rsi,0x0(%rbp)
30: 8b 43 08 mov 0x8(%rbx),%eax
33: 39 43 10 cmp %eax,0x10(%rbx)
36: 0f 92 c0 setb %al
39: 48 83 c4 08 add $0x8,%rsp
3d: 5b pop %rbx
3e: 5d pop %rbp
3f: c3 retq