================================================================== BUG: KASAN: use-after-free in ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:589 [inline] BUG: KASAN: use-after-free in ath9k_hif_usb_rx_cb+0xca2/0x1020 drivers/net/wireless/ath/ath9k/hif_usb.c:680 Read of size 4 at addr ffff88810ddf40c4 by task syz-executor.4/11392 CPU: 0 PID: 11392 Comm: syz-executor.4 Not tainted 5.10.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:589 [inline] ath9k_hif_usb_rx_cb+0xca2/0x1020 drivers/net/wireless/ath/ath9k/hif_usb.c:680 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1657 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1728 dummy_timer+0x11f4/0x3280 drivers/usb/gadget/udc/dummy_hcd.c:1969 call_timer_fn+0x1a5/0x630 kernel/time/timer.c:1410 expire_timers kernel/time/timer.c:1455 [inline] __run_timers.part.0+0x67c/0xa10 kernel/time/timer.c:1747 __run_timers kernel/time/timer.c:1728 [inline] run_timer_softirq+0x80/0x120 kernel/time/timer.c:1760 __do_softirq+0x1b2/0x945 kernel/softirq.c:298 asm_call_irq_on_stack+0xf/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0x80/0xa0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:393 [inline] __irq_exit_rcu kernel/softirq.c:423 [inline] irq_exit_rcu+0x110/0x1a0 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x43/0xa0 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631 RIP: 0010:rmqueue mm/page_alloc.c:3477 [inline] RIP: 0010:get_page_from_freelist+0xec5/0x30e0 mm/page_alloc.c:3901 Code: 39 44 24 60 0f 85 49 f6 ff ff 48 c7 44 24 20 00 00 00 00 48 83 bc 24 d0 00 00 00 00 0f 85 79 11 00 00 ff b4 24 88 00 00 00 9d <49> 8d 9f d8 03 00 00 be 08 00 00 00 48 89 df e8 b7 24 06 00 48 89 RSP: 0018:ffffc900110ef630 EFLAGS: 00000246 RAX: 000000000001d8ef RBX: 0000000000000000 RCX: ffffffff8125c797 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff81642a8b RBP: 0000000000000004 R08: 0000000000000001 R09: ffffffff898c84bf R10: fffffbfff1319097 R11: 0000000000000000 R12: ffffea0004f74cb4 R13: dffffc0000000000 R14: ffffea0004f74c88 R15: ffff88823fffaa80 __alloc_pages_nodemask+0x288/0x690 mm/page_alloc.c:4946 alloc_pages_vma+0xbb/0x430 mm/mempolicy.c:2234 alloc_zeroed_user_highpage_movable include/linux/highmem.h:277 [inline] wp_page_copy+0xe59/0x1e80 mm/memory.c:2831 do_wp_page+0x27b/0x14b0 mm/memory.c:3134 handle_pte_fault mm/memory.c:4392 [inline] __handle_mm_fault mm/memory.c:4509 [inline] handle_mm_fault+0x1b2a/0x3220 mm/memory.c:4607 do_user_addr_fault+0x560/0xb40 arch/x86/mm/fault.c:1372 handle_page_fault arch/x86/mm/fault.c:1429 [inline] exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1485 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:583 RIP: 0010:__clear_user+0x40/0x70 arch/x86/lib/usercopy_64.c:24 Code: 07 01 86 e8 32 b3 56 ff 0f 1f 00 48 89 d8 48 c1 eb 03 48 89 ef 83 e0 07 48 89 d9 48 85 c9 74 19 66 2e 0f 1f 84 00 00 00 00 00 <48> c7 07 00 00 00 00 48 83 c7 08 ff c9 75 f1 48 89 c1 85 c9 74 0a RSP: 0018:ffffc900110efd28 EFLAGS: 00010212 RAX: 0000000000000005 RBX: 000000001fffffd6 RCX: 000000001fe8bc4f RDX: 0000000000040000 RSI: ffffffff8206679e RDI: 0000000020ba2000 RBP: 00000000200003c8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 000000012000027d R13: 00000000200003c8 R14: 0000000000000008 R15: 00000000200003c0 clear_user+0xd3/0x110 arch/x86/lib/usercopy_64.c:54 evdev_get_mask drivers/input/evdev.c:1023 [inline] evdev_do_ioctl+0xc49/0x1820 drivers/input/evdev.c:1105 evdev_ioctl_handler drivers/input/evdev.c:1272 [inline] evdev_ioctl+0x145/0x1a0 drivers/input/evdev.c:1281 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f9e3b0c1c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000000d400 RCX: 000000000045deb9 RDX: 0000000020000280 RSI: 0000000080104592 RDI: 0000000000000006 RBP: 000000000118c008 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bfd4 R13: 00007ffc617d58cf R14: 00007f9e3b0c29c0 R15: 000000000118bfd4 The buggy address belongs to the page: page:00000000455cf00e refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10ddf4 flags: 0x200000000000000() raw: 0200000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88810ddf3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88810ddf4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88810ddf4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88810ddf4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88810ddf4180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================