================================================================== 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 ffff88807288c0c4 by task syz-executor.4/31449 CPU: 0 PID: 31449 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+0x32d/0x560 drivers/usb/core/hcd.c:1650 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1716 dummy_timer+0x11f4/0x3280 drivers/usb/gadget/udc/dummy_hcd.c:1967 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1410 expire_timers kernel/time/timer.c:1455 [inline] __run_timers.part.0+0x67c/0xa50 kernel/time/timer.c:1747 __run_timers kernel/time/timer.c:1728 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1760 __do_softirq+0x2a0/0x9f6 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+0xaa/0xd0 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+0x132/0x200 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631 RIP: 0010:__list_add_valid+0x50/0xa0 lib/list_debug.c:26 Code: 75 50 49 8b 54 24 08 48 39 f2 0f 85 3d b0 fb 04 48 b8 00 00 00 00 00 fc ff df 48 89 f2 48 c1 ea 03 80 3c 02 00 75 3a 48 8b 16 <4c> 39 e2 0f 85 42 b0 fb 04 48 39 f5 0f 84 22 b0 fb 04 4c 39 e5 0f RSP: 0018:ffffc9000b3275f0 EFLAGS: 00000246 RAX: dffffc0000000000 RBX: ffff888067ff6200 RCX: ffffc900117b8000 RDX: ffff888067ff6a58 RSI: ffff88802f5c0a58 RDI: ffff888067ff6a60 RBP: ffff88802c4cd1d8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 1ffffffff1667e40 R12: ffff888067ff6a58 R13: ffff88802c4cd1d8 R14: ffff88802f5c0a58 R15: ffff888067ff6a58 __list_add include/linux/list.h:67 [inline] list_add_tail include/linux/list.h:100 [inline] list_move_tail include/linux/list.h:228 [inline] tcp_update_skb_after_send+0x1a4/0x3e0 net/ipv4/tcp_output.c:1221 __tcp_transmit_skb+0x191c/0x3760 net/ipv4/tcp_output.c:1413 tcp_transmit_skb net/ipv4/tcp_output.c:1422 [inline] tcp_write_xmit+0xead/0x5c70 net/ipv4/tcp_output.c:2684 __tcp_push_pending_frames+0xaa/0x390 net/ipv4/tcp_output.c:2862 tcp_push_pending_frames include/net/tcp.h:1860 [inline] tcp_data_snd_check net/ipv4/tcp_input.c:5375 [inline] tcp_rcv_established+0x1883/0x1eb0 net/ipv4/tcp_input.c:5828 tcp_v6_do_rcv+0x41d/0x1290 net/ipv6/tcp_ipv6.c:1458 sk_backlog_rcv include/net/sock.h:1010 [inline] __release_sock+0x134/0x3a0 net/core/sock.c:2523 __sk_flush_backlog+0x22/0x30 net/core/sock.c:2543 sk_flush_backlog include/net/sock.h:1097 [inline] tcp_sendmsg_locked+0x2704/0x2d20 net/ipv4/tcp.c:1291 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1444 inet6_sendmsg+0x99/0xe0 net/ipv6/af_inet6.c:638 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 __sys_sendto+0x21c/0x320 net/socket.c:1992 __do_sys_sendto net/socket.c:2004 [inline] __se_sys_sendto net/socket.c:2000 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2000 do_syscall_64+0x2d/0x70 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:00007faf8e443c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000000000002e940 RCX: 000000000045deb9 RDX: fffffffffffffea7 RSI: 0000000020f6f000 RDI: 0000000000000004 RBP: 000000000118bf78 R08: 0000000020b63fe4 R09: 000000000000001c R10: 0000000020000004 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007fff8556d95f R14: 00007faf8e4449c0 R15: 000000000118bf2c Allocated by task 4897: 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 include/linux/slab.h:557 [inline] tomoyo_realpath_from_path+0xc3/0x620 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x21b/0x400 security/tomoyo/file.c:822 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/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 4897: 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+0xdb/0x360 mm/slub.c:4124 tomoyo_realpath_from_path+0x191/0x620 security/tomoyo/realpath.c:291 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x21b/0x400 security/tomoyo/file.c:822 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/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88807288c000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 196 bytes inside of 4096-byte region [ffff88807288c000, ffff88807288d000) The buggy address belongs to the page: page:00000000e7042862 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x72888 head:00000000e7042862 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010042140 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88807288bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807288c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807288c080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807288c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807288c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================