================================================================== BUG: KASAN: use-after-free in __tcp_hdrlen include/linux/tcp.h:31 [inline] BUG: KASAN: use-after-free in qdisc_pkt_len_segs_init+0xa51/0xb30 net/core/dev.c:4193 Read of size 2 at addr ffff888113185db4 by task syz.2.648/7887 CPU: 2 UID: 0 PID: 7887 Comm: syz.2.648 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 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 __tcp_hdrlen include/linux/tcp.h:31 [inline] qdisc_pkt_len_segs_init+0xa51/0xb30 net/core/dev.c:4193 __dev_queue_xmit+0x270/0x4970 net/core/dev.c:4835 dev_queue_xmit include/linux/netdevice.h:3461 [inline] hsr_xmit net/hsr/hsr_forward.c:440 [inline] hsr_forward_do net/hsr/hsr_forward.c:603 [inline] hsr_forward_skb+0xe2f/0x2a30 net/hsr/hsr_forward.c:777 hsr_handle_frame+0x767/0xac0 net/hsr/hsr_slave.c:84 __netif_receive_skb_core.constprop.0+0x6c5/0x3530 net/core/dev.c:6151 __netif_receive_skb_list_core+0x353/0x940 net/core/dev.c:6339 __netif_receive_skb_list net/core/dev.c:6406 [inline] netif_receive_skb_list_internal+0x722/0xd40 net/core/dev.c:6497 gro_normal_list include/net/gro.h:523 [inline] gro_normal_list include/net/gro.h:519 [inline] gro_flush_normal include/net/gro.h:531 [inline] napi_complete_done+0x221/0x940 net/core/dev.c:6865 gro_cell_poll+0x4d0/0x6c0 net/core/gro_cells.c:74 __napi_poll.constprop.0+0xaf/0x450 net/core/dev.c:7787 napi_poll net/core/dev.c:7850 [inline] net_rx_action+0xa40/0xf20 net/core/dev.c:8007 handle_softirqs+0x1e6/0x9d0 kernel/softirq.c:645 do_softirq kernel/softirq.c:546 [inline] do_softirq+0xaf/0xf0 kernel/softirq.c:533 __local_bh_enable_ip+0xff/0x120 kernel/softirq.c:473 local_bh_enable include/linux/bottom_half.h:33 [inline] tun_rx_batched.isra.0+0x407/0x750 drivers/net/tun.c:1596 tun_get_user+0x1f53/0x3cc0 drivers/net/tun.c:2045 tun_chr_write_iter+0xdc/0x200 drivers/net/tun.c:2091 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x6af/0x1050 fs/read_write.c:687 ksys_write+0x12a/0x250 fs/read_write.c:739 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f72bdf9e0d9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f72beec1028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f72be225fa0 RCX: 00007f72bdf9e0d9 RDX: 000000000000007a RSI: 00002000000004c0 RDI: 0000000000000005 RBP: 00007f72be035024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f72be226038 R14: 00007f72be225fa0 R15: 00007fff67f3c868 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113185 flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000000000 ffffea00044c6148 ffffea00044c6148 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffff888113185c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888113185d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888113185d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888113185e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888113185e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================