==================================================================
BUG: KASAN: out-of-bounds in ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:589 [inline]
BUG: KASAN: out-of-bounds in ath9k_hif_usb_rx_cb+0xd14/0x10c0 drivers/net/wireless/ath/ath9k/hif_usb.c:687
Read of size 4 at addr ffff888117cec354 by task syz-executor.1/8927
CPU: 1 PID: 8927 Comm: syz-executor.1 Not tainted 5.17.0-rc8-syzkaller-00178-g46d2c20b0b10 #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+0x8d/0x336 mm/kasan/report.c:255
__kasan_report mm/kasan/report.c:442 [inline]
kasan_report.cold+0x83/0xdf mm/kasan/report.c:459
ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:589 [inline]
ath9k_hif_usb_rx_cb+0xd14/0x10c0 drivers/net/wireless/ath/ath9k/hif_usb.c:687
__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+0x288/0x9a5 kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x113/0x170 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:local_lock_acquire include/linux/local_lock_internal.h:30 [inline]
RIP: 0010:folio_add_lru+0x1a4/0x6a0 mm/swap.c:466
Code: c4 c0 d6 d3 8a e8 bc bc e8 ff 31 c9 31 d2 68 00 44 5b 81 45 31 c9 31 f6 41 b8 01 00 00 00 4c 89 ef e8 f0 43 ce ff 4c 89 e2 59 <48> b8 00 00 00 00 00 fc ff df 48 c1 ea 03 0f b6 14 02 4c 89 e0 83
RSP: 0018:ffffc900084f7588 EFLAGS: 00000286
RAX: 0000000000000000 RBX: 0000000000033940 RCX: ffffffff815b4400
RDX: ffffffff8ad3d6c0 RSI: 0000000000000002 RDI: 0000000000000000
RBP: ffffea000488a440 R08: 0000000000000000 R09: ffffffff8a7ef73f
R10: fffffbfff14fdee7 R11: 0000000000000001 R12: ffffffff8ad3d6c0
R13: ffff8881f6933940 R14: ffff888139ffe900 R15: ffffea000488a440
wp_page_copy+0xa36/0x1d90 mm/memory.c:3070
do_wp_page+0x282/0x14d0 mm/memory.c:3322
handle_pte_fault mm/memory.c:4588 [inline]
__handle_mm_fault+0xf22/0x2760 mm/memory.c:4705
handle_mm_fault+0x1c8/0x790 mm/memory.c:4803
do_user_addr_fault+0x489/0x11c0 arch/x86/mm/fault.c:1397
handle_page_fault arch/x86/mm/fault.c:1484 [inline]
exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1540
asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568
RIP: 0010:copy_user_enhanced_fast_string+0xe/0x40 arch/x86/lib/copy_user_64.S:196
Code: 89 d1 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 31 c0 0f 01 ca c3 8d 0c ca 89 ca eb 20 0f 01 cb 83 fa 40 0f 82 60 ff ff ff 89 d1 a4 31 c0 0f 01 ca c3 89 ca eb 06 66 0f 1f 44 00 00 83 f8 12 74
RSP: 0018:ffffc900084f7a00 EFLAGS: 00050206
RAX: 0000000000000001 RBX: 0000000000001000 RCX: 00000000000002aa
RDX: 0000000000001000 RSI: ffff8881233add56 RDI: 000000002020a000
RBP: 00000000202092aa R08: 0000000000000000 R09: ffff8881233adfff
R10: ffffed1024675bff R11: 0000000000000000 R12: ffff8881233ad000
R13: 000000002020a2aa R14: 0000000000000000 R15: ffffc900084f7d68
copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline]
copyout.part.0+0xe4/0x110 lib/iov_iter.c:155
copyout lib/iov_iter.c:189 [inline]
copy_page_to_iter_iovec lib/iov_iter.c:226 [inline]
__copy_page_to_iter lib/iov_iter.c:852 [inline]
copy_page_to_iter+0x3ac/0xe50 lib/iov_iter.c:880
copy_folio_to_iter include/linux/uio.h:153 [inline]
filemap_read+0x5a2/0xb90 mm/filemap.c:2727
generic_file_read_iter+0x35a/0x540 mm/filemap.c:2822
ext4_file_read_iter fs/ext4/file.c:130 [inline]
ext4_file_read_iter+0x184/0x490 fs/ext4/file.c:113
call_read_iter include/linux/fs.h:2068 [inline]
new_sync_read+0x429/0x6e0 fs/read_write.c:400
vfs_read+0x35c/0x600 fs/read_write.c:481
ksys_read+0x12d/0x250 fs/read_write.c:619
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
RIP: 0033:0x7f89eca57049
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f89ebb8b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f89ecb6a100 RCX: 00007f89eca57049
RDX: 0000000020002340 RSI: 0000000020001340 RDI: 0000000000000004
RBP: 00007f89ecab108d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc44e8cbbf R14: 00007f89ebb8b300 R15: 0000000000022000
Allocated by task 8928:
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+0x66/0x80 mm/kasan/common.c:469
kasan_slab_alloc include/linux/kasan.h:260 [inline]
slab_post_alloc_hook mm/slab.h:732 [inline]
slab_alloc_node mm/slub.c:3230 [inline]
slab_alloc mm/slub.c:3238 [inline]
kmem_cache_alloc+0x241/0x480 mm/slub.c:3243
mempool_alloc+0x146/0x350 mm/mempool.c:392
__sg_alloc_table+0x244/0x380 lib/scatterlist.c:318
sg_alloc_table_chained+0x9b/0x1f0 lib/sg_pool.c:133
scsi_alloc_sgtables+0x1c4/0xb30 drivers/scsi/scsi_lib.c:1045
sd_setup_read_write_cmnd drivers/scsi/sd.c:1228 [inline]
sd_init_command+0x2ad/0x3590 drivers/scsi/sd.c:1354
scsi_prepare_cmd drivers/scsi/scsi_lib.c:1625 [inline]
scsi_queue_rq+0x11ef/0x3380 drivers/scsi/scsi_lib.c:1730
blk_mq_dispatch_rq_list+0x6ea/0x22e0 block/blk-mq.c:1855
__blk_mq_do_dispatch_sched+0x3bc/0xa70 block/blk-mq-sched.c:173
blk_mq_do_dispatch_sched block/blk-mq-sched.c:186 [inline]
__blk_mq_sched_dispatch_requests+0x2a0/0x410 block/blk-mq-sched.c:306
blk_mq_sched_dispatch_requests+0xfb/0x180 block/blk-mq-sched.c:332
__blk_mq_run_hw_queue+0xf9/0x350 block/blk-mq.c:1972
__blk_mq_delay_run_hw_queue+0x5b6/0x6c0 block/blk-mq.c:2049
blk_mq_run_hw_queue+0x30f/0x480 block/blk-mq.c:2100
blk_mq_sched_insert_requests+0x1d5/0x990 block/blk-mq-sched.c:486
blk_mq_flush_plug_list+0x416/0xd60 block/blk-mq.c:2632
blk_add_rq_to_plug block/blk-mq.c:2694 [inline]
blk_mq_submit_bio+0x117e/0x1f70 block/blk-mq.c:2846
__submit_bio+0x1f1/0x270 block/blk-core.c:800
__submit_bio_noacct_mq block/blk-core.c:875 [inline]
submit_bio_noacct block/blk-core.c:901 [inline]
submit_bio_noacct+0x6c9/0x8a0 block/blk-core.c:890
iomap_dio_submit_bio+0x1a8/0x200 fs/iomap/direct-io.c:66
iomap_dio_bio_iter+0xe2b/0x1550 fs/iomap/direct-io.c:351
iomap_dio_iter fs/iomap/direct-io.c:434 [inline]
__iomap_dio_rw+0x84a/0x1ad0 fs/iomap/direct-io.c:590
iomap_dio_rw+0x38/0x90 fs/iomap/direct-io.c:680
ext4_dio_write_iter fs/ext4/file.c:564 [inline]
ext4_file_write_iter+0xa53/0x1970 fs/ext4/file.c:675
call_write_iter include/linux/fs.h:2074 [inline]
new_sync_write+0x431/0x660 fs/read_write.c:503
vfs_write+0x7cd/0xae0 fs/read_write.c:590
ksys_write+0x12d/0x250 fs/read_write.c:643
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
The buggy address belongs to the object at ffff888117cebb80
which belongs to the cache sgpool-64 of size 2048
The buggy address is located 2004 bytes inside of
2048-byte region [ffff888117cebb80, ffff888117cec380)
The buggy address belongs to the page:
page:ffffea00045f3a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x117ce8
head:ffffea00045f3a00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x200000000010200(slab|head|node=0|zone=2)
raw: 0200000000010200 0000000000000000 dead000000000122 ffff88810a5e6a00
raw: 0000000000000000 00000000000f000f 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 0x1d2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 8928, ts 2523246662245, free_ts 2523070616014
prep_new_page mm/page_alloc.c:2434 [inline]
get_page_from_freelist+0x122d/0x2940 mm/page_alloc.c:4165
__alloc_pages+0x1b2/0x500 mm/page_alloc.c:5389
alloc_pages+0x1aa/0x310 mm/mempolicy.c:2271
alloc_slab_page mm/slub.c:1799 [inline]
allocate_slab+0x27f/0x3e0 mm/slub.c:1944
new_slab mm/slub.c:2004 [inline]
___slab_alloc+0xc12/0x1450 mm/slub.c:3018
__slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105
slab_alloc_node mm/slub.c:3196 [inline]
slab_alloc mm/slub.c:3238 [inline]
kmem_cache_alloc+0x3bb/0x480 mm/slub.c:3243
mempool_alloc+0x146/0x350 mm/mempool.c:392
__sg_alloc_table+0x244/0x380 lib/scatterlist.c:318
sg_alloc_table_chained+0x9b/0x1f0 lib/sg_pool.c:133
scsi_alloc_sgtables+0x1c4/0xb30 drivers/scsi/scsi_lib.c:1045
sd_setup_read_write_cmnd drivers/scsi/sd.c:1228 [inline]
sd_init_command+0x2ad/0x3590 drivers/scsi/sd.c:1354
scsi_prepare_cmd drivers/scsi/scsi_lib.c:1625 [inline]
scsi_queue_rq+0x11ef/0x3380 drivers/scsi/scsi_lib.c:1730
blk_mq_dispatch_rq_list+0x6ea/0x22e0 block/blk-mq.c:1855
__blk_mq_do_dispatch_sched+0x3bc/0xa70 block/blk-mq-sched.c:173
blk_mq_do_dispatch_sched block/blk-mq-sched.c:186 [inline]
__blk_mq_sched_dispatch_requests+0x2a0/0x410 block/blk-mq-sched.c:306
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1352 [inline]
free_pcp_prepare+0x361/0x760 mm/page_alloc.c:1404
free_unref_page_prepare mm/page_alloc.c:3325 [inline]
free_unref_page+0x19/0x580 mm/page_alloc.c:3404
device_release+0x9f/0x240 drivers/base/core.c:2229
kobject_cleanup lib/kobject.c:705 [inline]
kobject_release lib/kobject.c:736 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x1c8/0x540 lib/kobject.c:753
put_device+0x1b/0x30 drivers/base/core.c:3512
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:503
ath9k_hif_usb_firmware_cb+0x274/0x530 drivers/net/wireless/ath/ath9k/hif_usb.c:1246
request_firmware_work_func+0x12c/0x230 drivers/base/firmware_loader/main.c:1022
process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307
worker_thread+0x657/0x1110 kernel/workqueue.c:2454
kthread+0x2ef/0x3a0 kernel/kthread.c:377
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888117cec200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888117cec280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888117cec300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffff888117cec380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888117cec400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: c0 d6 d3 rcl $0xd3,%dh
3: 8a e8 mov %al,%ch
5: bc bc e8 ff 31 mov $0x31ffe8bc,%esp
a: c9 leaveq
b: 31 d2 xor %edx,%edx
d: 68 00 44 5b 81 pushq $0xffffffff815b4400
12: 45 31 c9 xor %r9d,%r9d
15: 31 f6 xor %esi,%esi
17: 41 b8 01 00 00 00 mov $0x1,%r8d
1d: 4c 89 ef mov %r13,%rdi
20: e8 f0 43 ce ff callq 0xffce4415
25: 4c 89 e2 mov %r12,%rdx
28: 59 pop %rcx
* 29: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax <-- trapping instruction
30: fc ff df
33: 48 c1 ea 03 shr $0x3,%rdx
37: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx
3b: 4c 89 e0 mov %r12,%rax
3e: 83 .byte 0x83