================================================================== BUG: KASAN: use-after-free in ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:636 [inline] BUG: KASAN: use-after-free in ath9k_hif_usb_rx_cb+0xdab/0x1020 drivers/net/wireless/ath/ath9k/hif_usb.c:680 Read of size 4 at addr ffff88811331c0b8 by task systemd-udevd/7129 CPU: 0 PID: 7129 Comm: systemd-udevd 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:636 [inline] ath9k_hif_usb_rx_cb+0xdab/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:tomoyo_check_acl+0x26f/0x450 security/tomoyo/domain.c:171 Code: e6 07 0f b6 0c 28 48 8d 43 07 48 89 c2 48 c1 ea 03 0f b6 14 2a 40 38 f1 40 0f 9e c6 84 c9 0f 95 c1 40 84 ce 0f 85 4e 01 00 00 <83> e0 07 38 c2 0f 9e c1 84 d2 0f 95 c0 84 c1 0f 85 39 01 00 00 48 RSP: 0018:ffffc90014277a20 EFLAGS: 00000246 RAX: ffff888100a11087 RBX: ffff888100a11080 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000002 R11: ffffc90014277f58 R12: ffffc90014277b50 R13: ffff888102361d90 R14: 0000000000000002 R15: 0000000000000000 tomoyo_path_permission security/tomoyo/file.c:586 [inline] tomoyo_path_permission+0x1ff/0x3a0 security/tomoyo/file.c:573 tomoyo_path_perm+0x2f0/0x400 security/tomoyo/file.c:838 security_inode_getattr+0xcf/0x140 security/security.c:1279 vfs_getattr fs/stat.c:121 [inline] vfs_statx+0x164/0x390 fs/stat.c:189 vfs_fstatat fs/stat.c:207 [inline] vfs_lstat include/linux/fs.h:3109 [inline] __do_sys_newlstat+0x91/0x110 fs/stat.c:362 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fc7c7582335 Code: 69 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 48 89 f0 77 30 48 89 c7 48 89 d6 b8 06 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 03 f3 c3 90 48 8b 15 31 db 2b 00 f7 d8 64 89 RSP: 002b:00007fff94eb1148 EFLAGS: 00000246 ORIG_RAX: 0000000000000006 RAX: ffffffffffffffda RBX: 000056222a822b90 RCX: 00007fc7c7582335 RDX: 00007fff94eb1180 RSI: 00007fff94eb1180 RDI: 000056222a821b90 RBP: 00007fff94eb1240 R08: 00007fc7c78411b8 R09: 0000000000001010 R10: 0000000000000020 R11: 0000000000000246 R12: 000056222a821b90 R13: 000056222a821bb1 R14: 000056222a821ac6 R15: 000056222a821ad1 Allocated by task 7127: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:526 [inline] slab_alloc_node mm/slub.c:2891 [inline] slab_alloc mm/slub.c:2899 [inline] kmem_cache_alloc+0x10d/0x390 mm/slub.c:2904 getname_flags.part.0+0x50/0x4f0 fs/namei.c:138 getname_flags fs/namei.c:2647 [inline] user_path_at_empty+0xa1/0x100 fs/namei.c:2647 user_path_at include/linux/namei.h:59 [inline] vfs_statx+0x142/0x390 fs/stat.c:185 vfs_fstatat fs/stat.c:207 [inline] vfs_lstat include/linux/fs.h:3109 [inline] __do_sys_newlstat+0x91/0x110 fs/stat.c:362 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 7127: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x102/0x140 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1544 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1577 slab_free mm/slub.c:3142 [inline] kmem_cache_free+0x8b/0x5d0 mm/slub.c:3158 putname+0xe1/0x120 fs/namei.c:259 filename_lookup+0x3b1/0x560 fs/namei.c:2377 user_path_at include/linux/namei.h:59 [inline] vfs_statx+0x142/0x390 fs/stat.c:185 vfs_fstatat fs/stat.c:207 [inline] vfs_lstat include/linux/fs.h:3109 [inline] __do_sys_newlstat+0x91/0x110 fs/stat.c:362 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88811331b300 which belongs to the cache names_cache of size 4096 The buggy address is located 3512 bytes inside of 4096-byte region [ffff88811331b300, ffff88811331c300) The buggy address belongs to the page: page:00000000639b6055 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113318 head:00000000639b6055 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x200000000010200(slab|head) raw: 0200000000010200 dead000000000100 dead000000000122 ffff888100164140 raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88811331bf80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811331c000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88811331c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811331c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811331c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================