==================================================================
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 ffff888112f9c0b8 by task systemd-udevd/7319
CPU: 0 PID: 7319 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:arch_local_irq_restore arch/x86/include/asm/irqflags.h:85 [inline]
RIP: 0010:lock_acquire kernel/locking/lockdep.c:5439 [inline]
RIP: 0010:lock_acquire+0x2af/0x870 kernel/locking/lockdep.c:5401
Code: ff 74 24 20 e8 d2 8e ff ff b8 ff ff ff ff 48 83 c4 20 65 0f c1 05 b1 9d db 7e 83 f8 01 4c 8b 14 24 0f 85 f1 03 00 00 41 52 9d 55 fe ff ff 65 ff 05 f5 8d db 7e 48 8b 05 ce 25 0c 07 e8 c9 dd
RSP: 0018:ffffc900057cf728 EFLAGS: 00000246
RAX: 0000000000000001 RBX: 1ffff92000af9ee7 RCX: ffffffff81260674
RDX: 1ffff11025f13114 RSI: 0000000000000001 RDI: ffffffff892558f8
RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff898c84af
R10: 0000000000000246 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88810a4453c0 R14: 0000000000000000 R15: 0000000000000000
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151
spin_lock include/linux/spinlock.h:354 [inline]
__d_lookup+0x1bc/0x6f0 fs/dcache.c:2393
lookup_fast+0x2d0/0x6c0 fs/namei.c:1502
walk_component+0xc6/0x6a0 fs/namei.c:1857
link_path_walk.part.0+0x6b8/0xc20 fs/namei.c:2184
link_path_walk fs/namei.c:2113 [inline]
path_openat+0x25a/0x2730 fs/namei.c:3365
do_filp_open+0x17e/0x3c0 fs/namei.c:3396
do_sys_openat2+0x16d/0x420 fs/open.c:1168
do_sys_open fs/open.c:1184 [inline]
__do_sys_open fs/open.c:1192 [inline]
__se_sys_open fs/open.c:1188 [inline]
__x64_sys_open+0x119/0x1c0 fs/open.c:1188
do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f19264056f0
Code: 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d 19 30 2c 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 fe 9d 01 00 48 89 04 24
RSP: 002b:00007ffecd383eb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 0000560a5219da60 RCX: 00007f19264056f0
RDX: 00000000000001b6 RSI: 0000000000080000 RDI: 00007ffecd384060
RBP: 0000000000000008 R08: 0000000000000008 R09: 0000000000000001
R10: 0000000000080000 R11: 0000000000000246 R12: 0000560a507bf68a
R13: 0000000000000001 R14: 00000000ffffffff R15: 00007ffecd3840e0
Allocated by task 7315:
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
kmalloc_node include/linux/slab.h:575 [inline]
kvmalloc_node+0x61/0xf0 mm/util.c:575
kvmalloc include/linux/mm.h:765 [inline]
seq_buf_alloc fs/seq_file.c:35 [inline]
seq_read_iter+0x791/0x10c0 fs/seq_file.c:205
seq_read+0x3dd/0x5b0 fs/seq_file.c:159
kernfs_fop_read+0xe9/0x590 fs/kernfs/file.c:251
vfs_read+0x1b5/0x570 fs/read_write.c:494
ksys_read+0x12d/0x250 fs/read_write.c:634
do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Freed by task 7315:
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]
kfree+0xe5/0x5e0 mm/slub.c:4124
kvfree+0x42/0x50 mm/util.c:604
seq_release+0x4f/0x80 fs/seq_file.c:355
kernfs_fop_release+0xee/0x190 fs/kernfs/file.c:780
__fput+0x28a/0x930 fs/file_table.c:281
task_work_run+0xdd/0x1a0 kernel/task_work.c:151
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_user_mode_loop kernel/entry/common.c:164 [inline]
exit_to_user_mode_prepare+0x155/0x160 kernel/entry/common.c:191
syscall_exit_to_user_mode+0x38/0x250 kernel/entry/common.c:266
entry_SYSCALL_64_after_hwframe+0x44/0xa9
The buggy address belongs to the object at ffff888112f9c000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 184 bytes inside of
4096-byte region [ffff888112f9c000, ffff888112f9d000)
The buggy address belongs to the page:
page:00000000f454770d refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x112f98
head:00000000f454770d order:3 compound_mapcount:0 compound_pincount:0
flags: 0x200000000010200(slab|head)
raw: 0200000000010200 dead000000000100 dead000000000122 ffff888100042140
raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff888112f9bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888112f9c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888112f9c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888112f9c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888112f9c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================