==================================================================
BUG: KASAN: slab-out-of-bounds in memcpy include/linux/fortify-string.h:225 [inline]
BUG: KASAN: slab-out-of-bounds in ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:562 [inline]
BUG: KASAN: slab-out-of-bounds in ath9k_hif_usb_rx_cb+0x3d3/0x10b0 drivers/net/wireless/ath/ath9k/hif_usb.c:680
Read of size 48406 at addr ffff8880333a0000 by task syz-executor.4/4539
CPU: 0 PID: 4539 Comm: syz-executor.4 Not tainted 5.16.0-rc7-syzkaller #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/0x2ed mm/kasan/report.c:247
__kasan_report mm/kasan/report.c:433 [inline]
kasan_report.cold+0x83/0xdf mm/kasan/report.c:450
check_region_inline mm/kasan/generic.c:183 [inline]
kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189
memcpy+0x20/0x60 mm/kasan/shadow.c:65
memcpy include/linux/fortify-string.h:225 [inline]
ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:562 [inline]
ath9k_hif_usb_rx_cb+0x3d3/0x10b0 drivers/net/wireless/ath/ath9k/hif_usb.c:680
__usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1656
usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1726
dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1987
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+0x29b/0x9c2 kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x38/0x70 kernel/locking/spinlock.c:194
Code: 74 24 10 e8 ea 05 15 f8 48 89 ef e8 a2 7b 15 f8 81 e3 00 02 00 00 75 25 9c 58 f6 c4 02 75 2d 48 85 db 74 01 fb bf 01 00 00 00 33 46 08 f8 65 8b 05 2c 9a bb 76 85 c0 74 0a 5b 5d c3 e8 a0 32
RSP: 0018:ffffc9000459fe20 EFLAGS: 00000206
RAX: 0000000000000006 RBX: 0000000000000200 RCX: 1ffffffff1b21e01
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: ffff88802827e008 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff817d08b8 R11: 0000000000000000 R12: 0000000000000293
R13: ffff88802827e008 R14: fffffffffffffff0 R15: 1ffff920008b3fce
spin_unlock_irqrestore include/linux/spinlock.h:404 [inline]
raw_ioctl_ep0_stall drivers/usb/gadget/legacy/raw_gadget.c:751 [inline]
raw_ioctl+0xed2/0x2690 drivers/usb/gadget/legacy/raw_gadget.c:1247
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
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:0x7f14d0b46c57
Code: 3c 1c 48 f7 d8 49 39 c4 72 b8 e8 04 54 02 00 85 c0 78 bd 48 83 c4 08 4c 89 e0 5b 41 5c c3 0f 1f 44 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f14cf4ba098 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f14cf4bb110 RCX: 00007f14d0b46c57
RDX: 0000000000000000 RSI: 0000000000005501 RDI: 0000000000000004
RBP: 0000000000000004 R08: 000000000000f0ff R09: 000000000000000b
R10: 00007f14cf4ba140 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000020000080 R15: 0000000000000868
Allocated by task 3689:
kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc mm/kasan/common.c:513 [inline]
____kasan_kmalloc mm/kasan/common.c:472 [inline]
__kasan_kmalloc+0xa6/0xd0 mm/kasan/common.c:522
kmalloc_reserve net/core/skbuff.c:354 [inline]
__alloc_skb+0xde/0x340 net/core/skbuff.c:426
alloc_skb include/linux/skbuff.h:1127 [inline]
ath9k_hif_usb_alloc_rx_urbs drivers/net/wireless/ath/ath9k/hif_usb.c:882 [inline]
ath9k_hif_usb_alloc_urbs+0x689/0x1070 drivers/net/wireless/ath/ath9k/hif_usb.c:1012
ath9k_hif_usb_dev_init drivers/net/wireless/ath/ath9k/hif_usb.c:1102 [inline]
ath9k_hif_usb_firmware_cb+0x148/0x530 drivers/net/wireless/ath/ath9k/hif_usb.c:1235
request_firmware_work_func+0x12c/0x230 drivers/base/firmware_loader/main.c:1022
process_one_work+0x9b2/0x1660 kernel/workqueue.c:2298
worker_thread+0x65d/0x1130 kernel/workqueue.c:2445
kthread+0x405/0x4f0 kernel/kthread.c:327
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
The buggy address belongs to the object at ffff8880333a0000
which belongs to the cache kmalloc-32k of size 32768
The buggy address is located 0 bytes inside of
32768-byte region [ffff8880333a0000, ffff8880333a8000)
The buggy address belongs to the page:
page:ffffea0000cce800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x333a0
head:ffffea0000cce800 order:4 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0000c3d008 ffffea0000cce408 ffff888010c40c00
raw: 0000000000000000 ffff8880333a0000 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 4, migratetype Unmovable, gfp_mask 0x3c20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_THISNODE), pid 3689, ts 189114695875, free_ts 174279830260
prep_new_page mm/page_alloc.c:2418 [inline]
get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4149
__alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369
__alloc_pages_node include/linux/gfp.h:570 [inline]
kmem_getpages mm/slab.c:1377 [inline]
cache_grow_begin+0x75/0x470 mm/slab.c:2593
cache_alloc_refill+0x27f/0x380 mm/slab.c:2965
____cache_alloc mm/slab.c:3048 [inline]
____cache_alloc mm/slab.c:3031 [inline]
slab_alloc_node mm/slab.c:3249 [inline]
kmem_cache_alloc_node_trace+0x49c/0x5b0 mm/slab.c:3617
__do_kmalloc_node mm/slab.c:3639 [inline]
__kmalloc_node_track_caller+0x38/0x60 mm/slab.c:3654
kmalloc_reserve net/core/skbuff.c:354 [inline]
__alloc_skb+0xde/0x340 net/core/skbuff.c:426
alloc_skb include/linux/skbuff.h:1127 [inline]
ath9k_hif_usb_alloc_rx_urbs drivers/net/wireless/ath/ath9k/hif_usb.c:882 [inline]
ath9k_hif_usb_alloc_urbs+0x689/0x1070 drivers/net/wireless/ath/ath9k/hif_usb.c:1012
ath9k_hif_usb_dev_init drivers/net/wireless/ath/ath9k/hif_usb.c:1102 [inline]
ath9k_hif_usb_firmware_cb+0x148/0x530 drivers/net/wireless/ath/ath9k/hif_usb.c:1235
request_firmware_work_func+0x12c/0x230 drivers/base/firmware_loader/main.c:1022
process_one_work+0x9b2/0x1660 kernel/workqueue.c:2298
worker_thread+0x65d/0x1130 kernel/workqueue.c:2445
kthread+0x405/0x4f0 kernel/kthread.c:327
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1338 [inline]
free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389
free_unref_page_prepare mm/page_alloc.c:3309 [inline]
free_unref_page+0x19/0x690 mm/page_alloc.c:3388
slab_destroy mm/slab.c:1627 [inline]
slabs_destroy+0x89/0xc0 mm/slab.c:1647
cache_flusharray mm/slab.c:3418 [inline]
___cache_free+0x4cc/0x610 mm/slab.c:3480
qlink_free mm/kasan/quarantine.c:146 [inline]
qlist_free_all+0x4e/0x110 mm/kasan/quarantine.c:165
kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272
__kasan_slab_alloc+0x97/0xb0 mm/kasan/common.c:444
kasan_slab_alloc include/linux/kasan.h:259 [inline]
slab_post_alloc_hook mm/slab.h:519 [inline]
slab_alloc_node mm/slab.c:3261 [inline]
kmem_cache_alloc_node+0x2ea/0x590 mm/slab.c:3599
__alloc_skb+0x215/0x340 net/core/skbuff.c:414
alloc_skb_fclone include/linux/skbuff.h:1177 [inline]
tcp_stream_alloc_skb+0x66/0x910 net/ipv4/tcp.c:861
tcp_sendmsg_locked+0xaba/0x3050 net/ipv4/tcp.c:1281
tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1440
inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:819
sock_sendmsg_nosec net/socket.c:704 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:724
sock_write_iter+0x289/0x3c0 net/socket.c:1057
call_write_iter include/linux/fs.h:2162 [inline]
new_sync_write+0x429/0x660 fs/read_write.c:503
Memory state around the buggy address:
ffff8880333a7f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880333a7f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880333a8000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff8880333a8080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880333a8100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 24 10 and $0x10,%al
2: e8 ea 05 15 f8 callq 0xf81505f1
7: 48 89 ef mov %rbp,%rdi
a: e8 a2 7b 15 f8 callq 0xf8157bb1
f: 81 e3 00 02 00 00 and $0x200,%ebx
15: 75 25 jne 0x3c
17: 9c pushfq
18: 58 pop %rax
19: f6 c4 02 test $0x2,%ah
1c: 75 2d jne 0x4b
1e: 48 85 db test %rbx,%rbx
21: 74 01 je 0x24
23: fb sti
24: bf 01 00 00 00 mov $0x1,%edi
* 29: e8 33 46 08 f8 callq 0xf8084661 <-- trapping instruction
2e: 65 8b 05 2c 9a bb 76 mov %gs:0x76bb9a2c(%rip),%eax # 0x76bb9a61
35: 85 c0 test %eax,%eax
37: 74 0a je 0x43
39: 5b pop %rbx
3a: 5d pop %rbp
3b: c3 retq
3c: e8 .byte 0xe8
3d: a0 .byte 0xa0
3e: 32 .byte 0x32