==================================================================
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+0x7f7/0xa30 net/core/dev.c:4145
Read of size 2 at addr ffff888168b81db4 by task syz.1.5109/22986
CPU: 1 UID: 0 PID: 22986 Comm: syz.1.5109 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
__tcp_hdrlen include/linux/tcp.h:31 [inline]
qdisc_pkt_len_segs_init+0x7f7/0xa30 net/core/dev.c:4145
sch_handle_ingress net/core/dev.c:4482 [inline]
__netif_receive_skb_core+0x13aa/0x30b0 net/core/dev.c:6063
__netif_receive_skb_list_core+0x24d/0x830 net/core/dev.c:6287
__netif_receive_skb_list net/core/dev.c:6354 [inline]
netif_receive_skb_list_internal+0x995/0xcf0 net/core/dev.c:6445
gro_normal_list include/net/gro.h:523 [inline]
gro_flush_normal include/net/gro.h:531 [inline]
napi_complete_done+0x299/0x730 net/core/dev.c:6813
gro_cell_poll+0x5ab/0x5d0 net/core/gro_cells.c:74
__napi_poll+0xaa/0x330 net/core/dev.c:7735
napi_poll net/core/dev.c:7798 [inline]
net_rx_action+0x61d/0xf50 net/core/dev.c:7955
handle_softirqs+0x225/0x840 kernel/softirq.c:622
do_softirq+0x76/0xd0 kernel/softirq.c:523
__local_bh_enable_ip+0xf8/0x130 kernel/softirq.c:450
local_bh_enable include/linux/bottom_half.h:33 [inline]
tun_rx_batched+0x616/0x790 drivers/net/tun.c:-1
tun_get_user+0x2b44/0x4370 drivers/net/tun.c:1986
tun_chr_write_iter+0x113/0x200 drivers/net/tun.c:2032
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x612/0xba0 fs/read_write.c:687
ksys_write+0x150/0x270 fs/read_write.c:739
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0x23e/0x6f0 arch/x86/entry/syscall_32.c:307
do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:332
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf701f0ec
Code: 90 85 d2 74 0a 89 ce 81 e6 ff 0f 00 00 89 32 85 c0 74 05 c1 e9 0c 89 08 31 c0 5e 5d c3 90 0f 1f 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 58 b8
RSP: 002b:00000000f540d50c EFLAGS: 00000206 ORIG_RAX: 0000000000000004
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000800004c0
RDX: 000000000000007a RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x168b81
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000000 ffffea0005a2e048 ffffea0005a2e048 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:
ffff888168b81c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888168b81d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888168b81d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888168b81e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888168b81e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
----------------
Code disassembly (best guess):
0: 90 nop
1: 85 d2 test %edx,%edx
3: 74 0a je 0xf
5: 89 ce mov %ecx,%esi
7: 81 e6 ff 0f 00 00 and $0xfff,%esi
d: 89 32 mov %esi,(%rdx)
f: 85 c0 test %eax,%eax
11: 74 05 je 0x18
13: c1 e9 0c shr $0xc,%ecx
16: 89 08 mov %ecx,(%rax)
18: 31 c0 xor %eax,%eax
1a: 5e pop %rsi
1b: 5d pop %rbp
1c: c3 ret
1d: 90 nop
1e: 0f 1f 00 nopl (%rax)
21: 51 push %rcx
22: 52 push %rdx
23: 55 push %rbp
24: 89 e5 mov %esp,%ebp
26: 0f 34 sysenter
28: cd 80 int $0x80
* 2a: 5d pop %rbp <-- trapping instruction
2b: 5a pop %rdx
2c: 59 pop %rcx
2d: c3 ret
2e: 90 nop
2f: 90 nop
30: 90 nop
31: 90 nop
32: 90 nop
33: 90 nop
34: 90 nop
35: 90 nop
36: 90 nop
37: 90 nop
38: 90 nop
39: 90 nop
3a: 90 nop
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: 58 pop %rax
3f: b8 .byte 0xb8