usb 4-1: received invalid command response:got 14, 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 14 at addr ffffc90013647a30 by task syz.3.4331/23583 CPU: 1 UID: 0 PID: 23583 Comm: syz.3.4331 Not tainted syzkaller #0 PREEMPT(lazy) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/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:do_syscall_x64 arch/x86/entry/syscall_64.c:59 [inline] RIP: 0010:do_syscall_64+0x96/0x7f0 arch/x86/entry/syscall_64.c:94 Code: 4f 05 00 00 48 8b 7d 08 e8 87 65 00 00 0f 1f 44 00 00 0f 1f 44 00 00 90 e8 47 23 41 fa 90 90 e8 b0 22 41 fa fb 4d 8b 74 24 08 <45> 89 fd 41 f6 c6 bf 74 41 41 f6 c6 20 0f 85 33 04 00 00 41 f6 c6 RSP: 0018:ffffc900005d7f18 EFLAGS: 00000206 RAX: 000000000000164b RBX: ffffc900005d7f58 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff890f1bd0 RDI: ffffffff87b15380 RBP: ffffc900005d7f48 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffff8881120e0000 R13: 0000000000000000 R14: 0000000000000000 R15: 00000000000000e6 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f61f092e6ce 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:00007f61ef3c5f38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 00007f61ef3c76c0 RCX: 00007f61f092e6ce RDX: 00007f61ef3c5f90 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000080 R13: 000000000000000c R14: 00007f61f0bf5fa0 R15: 00007ffd60651788 The buggy address belongs to a 8-page vmalloc region starting at 0xffffc90013640000 allocated at kernel_clone+0x176/0x9d0 kernel/fork.c:2748 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10b6ff flags: 0x200000000000000(node=0|zone=2) raw: 0200000000000000 0000000000000000 ffffea00042dbfc8 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 215841657484, free_ts 215840076852 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:2115 kernel_clone+0x176/0x9d0 kernel/fork.c:2748 kernel_thread+0xdb/0x120 kernel/fork.c:2809 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 last free pid 6262 tgid 6261 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x716/0xf50 mm/page_alloc.c:2950 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4612 [inline] slab_alloc_node mm/slub.c:4945 [inline] __do_kmalloc_node mm/slub.c:5361 [inline] __kmalloc_node_track_caller_noprof+0x2cf/0x7d0 mm/slub.c:5497 memdup_user+0x2a/0xe0 mm/util.c:221 raw_alloc_io_data drivers/usb/gadget/legacy/raw_gadget.c:674 [inline] raw_alloc_io_data+0x186/0x1c0 drivers/usb/gadget/legacy/raw_gadget.c:660 raw_ioctl_ep0_write drivers/usb/gadget/legacy/raw_gadget.c:764 [inline] raw_ioctl+0x1332/0x2b80 drivers/usb/gadget/legacy/raw_gadget.c:1313 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 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 Memory state around the buggy address: ffffc90013647900: f1 f1 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 ffffc90013647980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90013647a00: f1 f1 f1 f1 f1 f1 04 f2 04 f3 f3 f3 00 00 00 00 ^ ffffc90013647a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90013647b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 4f 05 00 00 48 8b rex.WRXB add $0xffffffff8b480000,%rax 6: 7d 08 jge 0x10 8: e8 87 65 00 00 call 0x6594 d: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 12: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 17: 90 nop 18: e8 47 23 41 fa call 0xfa412364 1d: 90 nop 1e: 90 nop 1f: e8 b0 22 41 fa call 0xfa4122d4 24: fb sti 25: 4d 8b 74 24 08 mov 0x8(%r12),%r14 * 2a: 45 89 fd mov %r15d,%r13d <-- trapping instruction 2d: 41 f6 c6 bf test $0xbf,%r14b 31: 74 41 je 0x74 33: 41 f6 c6 20 test $0x20,%r14b 37: 0f 85 33 04 00 00 jne 0x470 3d: 41 rex.B 3e: f6 .byte 0xf6 3f: c6 .byte 0xc6