usb 1-1: received invalid command response:got -2, instead of 0
usb 1-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 ffffc9000009fa30 by task kworker/0:6/6305
CPU: 0 UID: 0 PID: 6305 Comm: kworker/0:6 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Workqueue: usb_hub_wq hub_event
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:find_stack lib/stackdepot.c:609 [inline]
RIP: 0010:stack_depot_save_flags+0x16b/0x9d0 lib/stackdepot.c:676
Code: c1 41 c1 c8 08 45 29 c1 4c 8b 3d 90 fa 38 11 45 89 c8 44 23 05 7e fa 38 11 49 c1 e0 04 4d 01 c7 65 ff 05 18 ce 13 0a 4d 8b 37 <4d> 39 f7 75 1c e9 af 00 00 00 66 66 2e 0f 1f 84 00 00 00 00 00 4d
RSP: 0018:ffffc9001339f458 EFLAGS: 00000282
RAX: 00000000cfba9560 RBX: 0000000000000000 RCX: 0000000053706b17
RDX: 0000000000000013 RSI: 00000000eee1d894 RDI: 0000000000000002
RBP: 0000000000000000 R08: 0000000000b44900 R09: 00000000f8db4490
R10: 0000000000000200 R11: 000000000000595b R12: ffffc9001339f4b0
R13: 0000000000000013 R14: ffff8881083c8980 R15: ffff8881f4544900
kasan_save_stack+0x3f/0x50 mm/kasan/common.c:58
kasan_record_aux_stack+0x8c/0xa0 mm/kasan/generic.c:556
__call_rcu_common.constprop.0+0xa5/0x9b0 kernel/rcu/tree.c:3159
kernfs_put.part.0+0x3a6/0xaa0 fs/kernfs/dir.c:618
kernfs_put fs/kernfs/dir.c:1787 [inline]
kernfs_remove_by_name_ns+0xf3/0x120 fs/kernfs/dir.c:1798
kernfs_remove_by_name include/linux/kernfs.h:644 [inline]
sysfs_unmerge_group+0xe7/0x170 fs/sysfs/group.c:408
remove_power_attributes drivers/usb/core/sysfs.c:675 [inline]
usb_remove_sysfs_dev_files+0x6d/0xf0 drivers/usb/core/sysfs.c:1100
usb_bus_notify+0xe7/0x110 drivers/usb/core/usb.c:1185
notifier_call_chain+0x99/0x3f0 kernel/notifier.c:85
blocking_notifier_call_chain kernel/notifier.c:380 [inline]
blocking_notifier_call_chain+0x69/0xa0 kernel/notifier.c:368
bus_notify+0x56/0x80 drivers/base/bus.c:1086
device_del+0x178/0x9b0 drivers/base/core.c:3934
usb_disconnect+0x5b5/0x9a0 drivers/usb/core/hub.c:2376
hub_port_connect drivers/usb/core/hub.c:5407 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5707 [inline]
port_event drivers/usb/core/hub.c:5871 [inline]
hub_event+0x1d0c/0x4af0 drivers/usb/core/hub.c:5953
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
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:0x101e87
flags: 0x200000000000000(node=0|zone=2)
raw: 0200000000000000 ffffea000407a1c8 ffffea000407a1c8 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 2, tgid 2 (kthreadd), ts 2355172300, free_ts 0
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_noprof+0xb/0x110 mm/page_alloc.c:5338
__alloc_pages_node_noprof include/linux/gfp.h:291 [inline]
alloc_pages_node_noprof include/linux/gfp.h:318 [inline]
vm_area_alloc_pages mm/vmalloc.c:3669 [inline]
__vmalloc_area_node mm/vmalloc.c:3892 [inline]
__vmalloc_node_range_noprof+0xe0c/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
kernel_thread+0xdb/0x120 kernel/fork.c:2808
create_kthread kernel/kthread.c:459 [inline]
kthreadd+0x498/0x7a0 kernel/kthread.c:817
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_owner free stack trace missing
Memory state around the buggy address:
ffffc9000009f900: f1 f1 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00
ffffc9000009f980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc9000009fa00: f1 f1 f1 f1 f1 f1 04 f2 04 f3 f3 f3 00 00 00 00
^
ffffc9000009fa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000009fb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: c1 41 c1 c8 roll $0xc8,-0x3f(%rcx)
4: 08 45 29 or %al,0x29(%rbp)
7: c1 4c 8b 3d 90 rorl $0x90,0x3d(%rbx,%rcx,4)
c: fa cli
d: 38 11 cmp %dl,(%rcx)
f: 45 89 c8 mov %r9d,%r8d
12: 44 23 05 7e fa 38 11 and 0x1138fa7e(%rip),%r8d # 0x1138fa97
19: 49 c1 e0 04 shl $0x4,%r8
1d: 4d 01 c7 add %r8,%r15
20: 65 ff 05 18 ce 13 0a incl %gs:0xa13ce18(%rip) # 0xa13ce3f
27: 4d 8b 37 mov (%r15),%r14
* 2a: 4d 39 f7 cmp %r14,%r15 <-- trapping instruction
2d: 75 1c jne 0x4b
2f: e9 af 00 00 00 jmp 0xe3
34: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1)
3b: 00 00 00 00
3f: 4d rex.WRB