usb 2-1: received invalid command response:got 60, instead of 4
==================================================================
BUG: KASAN: stack-out-of-bounds in carl9170_cmd_callback drivers/net/wireless/ath/carl9170/rx.c:153 [inline]
BUG: KASAN: stack-out-of-bounds in carl9170_handle_command_response+0x21f/0xc50 drivers/net/wireless/ath/carl9170/rx.c:168
Write of size 60 at addr ffffc900034efa30 by task syz.1.137/5707
CPU: 1 UID: 0 PID: 5707 Comm: syz.1.137 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
check_region_inline mm/kasan/generic.c:186 [inline]
kasan_check_range+0x10f/0x1e0 mm/kasan/generic.c:200
__asan_memcpy+0x3c/0x60 mm/kasan/shadow.c:106
carl9170_cmd_callback drivers/net/wireless/ath/carl9170/rx.c:153 [inline]
carl9170_handle_command_response+0x21f/0xc50 drivers/net/wireless/ath/carl9170/rx.c:168
carl9170_usb_rx_irq_complete+0xfc/0x1b0 drivers/net/wireless/ath/carl9170/usb.c:307
__usb_hcd_giveback_urb+0x38d/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xda1/0x36c0 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:2032 [inline]
__hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2096
hrtimer_run_softirq+0x17d/0x2c0 kernel/time/hrtimer.c:2113
handle_softirqs+0x1dd/0x990 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x160/0x210 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:bytes_is_nonzero mm/kasan/generic.c:98 [inline]
RIP: 0010:memory_is_nonzero mm/kasan/generic.c:115 [inline]
RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:140 [inline]
RIP: 0010:memory_is_poisoned mm/kasan/generic.c:172 [inline]
RIP: 0010:check_region_inline mm/kasan/generic.c:191 [inline]
RIP: 0010:kasan_check_range+0x180/0x1e0 mm/kasan/generic.c:200
Code: ff ff ff 48 85 d2 74 98 48 01 ea eb 1a 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 83 c0 01 48 39 d0 0f 84 79 ff ff ff 80 38 00 <74> ee e9 57 ff ff ff b8 01 00 00 00 e9 3f 78 61 05 48 29 c3 48 89
RSP: 0018:ffffc900129a7860 EFLAGS: 00000202
RAX: fffff52002534f2d RBX: fffff52002534f2e RCX: ffffffff82a8b8e9
RDX: fffff52002534f2e RSI: 0000000000000014 RDI: ffffc900129a7958
RBP: fffff52002534f2b R08: 0000000000000001 R09: fffff52002534f2d
R10: ffffc900129a796b R11: 0000000000000000 R12: ffffc900129a7958
R13: 0000000000000086 R14: 0000000000000022 R15: ffffc900129a7958
__asan_memcpy+0x3c/0x60 mm/kasan/shadow.c:106
avc_has_perm_noaudit+0xe9/0x3b0 security/selinux/avc.c:1164
selinux_inode_permission+0x8d4/0x1130 security/selinux/hooks.c:3280
security_inode_permission+0x83/0xc0 security/security.c:1842
inode_permission+0x36c/0x620 fs/namei.c:661
may_open+0x2b8/0x480 fs/namei.c:4274
do_open fs/namei.c:4698 [inline]
path_openat+0x8da/0x4280 fs/namei.c:4859
do_file_open+0x20e/0x430 fs/namei.c:4888
do_sys_openat2+0x10f/0x1e0 fs/open.c:1368
do_sys_open fs/open.c:1374 [inline]
__do_sys_openat fs/open.c:1390 [inline]
__se_sys_openat fs/open.c:1385 [inline]
__x64_sys_openat+0x12d/0x210 fs/open.c:1385
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0x7f0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe57e0ee68e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007fe57cb84ea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe57cb876c0 RCX: 00007fe57e0ee68e
RDX: 0000000000000002 RSI: 00007fe57e1c320a RDI: ffffffffffffff9c
RBP: 00007fe57e1c3e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000005a
R13: 00002000000001c0 R14: 0000000000000003 R15: 00007ffdc06b9d28
The buggy address belongs to a
vmalloc virtual mapping
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10e337
flags: 0x200000000000000(node=0|zone=2)
raw: 0200000000000000 ffffea000438cdc8 ffffea000438cdc8 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 0, migratetype Unmovable, gfp_mask 0x29c2(GFP_NOWAIT|__GFP_HIGHMEM|__GFP_IO|__GFP_FS|__GFP_ZERO), pid 37, tgid 37 (kworker/u8:2), ts 9582732926, free_ts 9578263834
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0xf25/0x3400 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x28f/0x2b90 mm/page_alloc.c:5304
alloc_pages_mpol+0xe8/0x410 mm/mempolicy.c:2490
alloc_pages_noprof+0x1a/0x160 mm/mempolicy.c:2581
vm_area_alloc_pages mm/vmalloc.c:3667 [inline]
__vmalloc_area_node mm/vmalloc.c:3892 [inline]
__vmalloc_node_range_noprof+0xf9a/0x1630 mm/vmalloc.c:4082
__vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:4143
alloc_thread_stack_node kernel/fork.c:359 [inline]
dup_task_struct kernel/fork.c:929 [inline]
copy_process+0x7fb/0x7dd0 kernel/fork.c:2110
kernel_clone+0x176/0x9d0 kernel/fork.c:2747
user_mode_thread+0xcc/0x110 kernel/fork.c:2823
call_usermodehelper_exec_work kernel/umh.c:171 [inline]
call_usermodehelper_exec_work+0xcb/0x180 kernel/umh.c:157
process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
process_scheduled_works kernel/workqueue.c:3405 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
kthread+0x370/0x450 kernel/kthread.c:436
ret_from_fork+0x69a/0xc80 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
page last free pid 28 tgid 28 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
free_pages_prepare+0x558/0xcb0 mm/page_alloc.c:1451
__free_contig_range_common.constprop.0+0x12c/0x230 mm/page_alloc.c:6897
__free_contig_range mm/page_alloc.c:6942 [inline]
free_pages_bulk+0x126/0x1f0 mm/page_alloc.c:5257
vm_area_free_pages+0xad/0x2b0 mm/vmalloc.c:3439
vfree mm/vmalloc.c:3488 [inline]
vfree+0x107/0x750 mm/vmalloc.c:3462
delayed_vfree_work+0x56/0x80 mm/vmalloc.c:3392
process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
process_scheduled_works kernel/workqueue.c:3405 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
kthread+0x370/0x450 kernel/kthread.c:436
ret_from_fork+0x69a/0xc80 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffffc900034ef900: f1 f1 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00
ffffc900034ef980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc900034efa00: f1 f1 f1 f1 f1 f1 04 f2 04 f3 f3 f3 00 00 00 00
^
ffffc900034efa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc900034efb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess), 2 bytes skipped:
0: ff 48 85 decl -0x7b(%rax)
3: d2 74 98 48 shlb %cl,0x48(%rax,%rbx,4)
7: 01 ea add %ebp,%edx
9: eb 1a jmp 0x25
b: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1)
12: 00 00 00 00
16: 66 90 xchg %ax,%ax
18: 48 83 c0 01 add $0x1,%rax
1c: 48 39 d0 cmp %rdx,%rax
1f: 0f 84 79 ff ff ff je 0xffffff9e
25: 80 38 00 cmpb $0x0,(%rax)
* 28: 74 ee je 0x18 <-- trapping instruction
2a: e9 57 ff ff ff jmp 0xffffff86
2f: b8 01 00 00 00 mov $0x1,%eax
34: e9 3f 78 61 05 jmp 0x5617878
39: 48 29 c3 sub %rax,%rbx
3c: 48 rex.W
3d: 89 .byte 0x89