syzbot
divide error in tcp_rcv_space_adjust (4)
Status: internal: reported on 2026/08/11 00:01
Subsystems:
net
Labels:
prio:normal
[Documentation on labels]
Fix commit:
tcp: do not let tcp_rmem be set below 4096
Patched on: [ci-upstream-net-this-kasan-gce], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-rust-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 38d, last: 21d
Sample crash report:
Oops: divide error: 0000 [#1] SMP KASAN NOPTI
CPU: 1 UID: 0 PID: 6262 Comm: syz.4.94 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:div_u64_rem include/linux/math64.h:29 [inline]
RIP: 0010:div_u64 include/linux/math64.h:148 [inline]
RIP: 0010:tcp_rcvbuf_grow net/ipv4/tcp_input.c:-1 [inline]
RIP: 0010:tcp_rcv_space_adjust+0x401/0xba0 net/ipv4/tcp_input.c:988
Code: 41 29 ec 4d 0f af f4 4d 01 f6 4d 89 f5 89 e9 4c 89 e8 48 c1 e8 20 74 0d 4c 89 e8 31 d2 48 f7 f1 49 89 c4 eb 0a 44 89 e8 31 d2 <f7> f1 41 89 c4 4c 8d ab 38 09 00 00 4c 89 e8 48 c1 e8 03 48 b9 00
RSP: 0018:ffffc90004b0f6d0 EFLAGS: 00010246
RAX: 0000000000010000 RBX: ffff8880518cce00 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000066 RDI: 0000000000000067
RBP: 0000000000000000 R08: ffffffff907a2e7f R09: 1ffffffff20f45cf
R10: dffffc0000000000 R11: fffffbfff20f45d0 R12: 0000000000000080
R13: 0000000000010000 R14: 0000000000010000 R15: 0000000000000100
FS: 00007fc4721c96c0(0000) GS:ffff888124de0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc471386d80 CR3: 00000000338a0000 CR4: 0000000000350ef0
Call Trace:
<TASK>
tcp_recvmsg_locked+0x2192/0x3770 net/ipv4/tcp.c:2880
tcp_recvmsg+0x203/0x7f0 net/ipv4/tcp.c:2944
sock_recvmsg_nosec net/socket.c:1153 [inline]
sock_recvmsg+0x166/0x1e0 net/socket.c:1173
__sys_recvfrom+0x231/0x3a0 net/socket.c:2331
__do_sys_recvfrom net/socket.c:2346 [inline]
__se_sys_recvfrom net/socket.c:2342 [inline]
__x64_sys_recvfrom+0xde/0x100 net/socket.c:2342
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc47139e0d9
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:00007fc4721c9028 EFLAGS: 00000246 ORIG_RAX: 000000000000002d
RAX: ffffffffffffffda RBX: 00007fc471625fa0 RCX: 00007fc47139e0d9
RDX: fffffffffffffd0b RSI: 0000200000000080 RDI: 0000000000000005
RBP: 00007fc471435024 R08: 0000000000000000 R09: fffffffffffffd25
R10: 00000000c9100120 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc471626038 R14: 00007fc471625fa0 R15: 00007ffdf39a7288
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:div_u64_rem include/linux/math64.h:29 [inline]
RIP: 0010:div_u64 include/linux/math64.h:148 [inline]
RIP: 0010:tcp_rcvbuf_grow net/ipv4/tcp_input.c:-1 [inline]
RIP: 0010:tcp_rcv_space_adjust+0x401/0xba0 net/ipv4/tcp_input.c:988
Code: 41 29 ec 4d 0f af f4 4d 01 f6 4d 89 f5 89 e9 4c 89 e8 48 c1 e8 20 74 0d 4c 89 e8 31 d2 48 f7 f1 49 89 c4 eb 0a 44 89 e8 31 d2 <f7> f1 41 89 c4 4c 8d ab 38 09 00 00 4c 89 e8 48 c1 e8 03 48 b9 00
RSP: 0018:ffffc90004b0f6d0 EFLAGS: 00010246
RAX: 0000000000010000 RBX: ffff8880518cce00 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000066 RDI: 0000000000000067
RBP: 0000000000000000 R08: ffffffff907a2e7f R09: 1ffffffff20f45cf
R10: dffffc0000000000 R11: fffffbfff20f45d0 R12: 0000000000000080
R13: 0000000000010000 R14: 0000000000010000 R15: 0000000000000100
FS: 00007fc4721c96c0(0000) GS:ffff888124de0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc471386d80 CR3: 00000000338a0000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess):
0: 41 29 ec sub %ebp,%r12d
3: 4d 0f af f4 imul %r12,%r14
7: 4d 01 f6 add %r14,%r14
a: 4d 89 f5 mov %r14,%r13
d: 89 e9 mov %ebp,%ecx
f: 4c 89 e8 mov %r13,%rax
12: 48 c1 e8 20 shr $0x20,%rax
16: 74 0d je 0x25
18: 4c 89 e8 mov %r13,%rax
1b: 31 d2 xor %edx,%edx
1d: 48 f7 f1 div %rcx
20: 49 89 c4 mov %rax,%r12
23: eb 0a jmp 0x2f
25: 44 89 e8 mov %r13d,%eax
28: 31 d2 xor %edx,%edx
* 2a: f7 f1 div %ecx <-- trapping instruction
2c: 41 89 c4 mov %eax,%r12d
2f: 4c 8d ab 38 09 00 00 lea 0x938(%rbx),%r13
36: 4c 89 e8 mov %r13,%rax
39: 48 c1 e8 03 shr $0x3,%rax
3d: 48 rex.W
3e: b9 .byte 0xb9
* Struck through repros no longer work on HEAD.