syzbot


divide error in __tcp_select_window (3)

Status: fixed on 2024/12/17 10:00
Subsystems: net
[Documentation on labels]
Fix commit: ce7356ae3594 mptcp: cope racing subflow creation in mptcp_rcv_space_adjust
First crash: 49d, last: 43d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream divide error in __tcp_select_window (2) net C done 4 1351d 1352d 20/28 fixed on 2021/11/10 00:50
android-49 divide error in __tcp_select_window 2 2685d 2685d 0/3 closed as invalid on 2019/01/01 20:10
upstream divide error in __tcp_select_window net C done 1119 1486d 1491d 19/28 fixed on 2021/03/10 01:48
Last patch testing requests (3)
Created Duration User Patch Repo Result
2024/11/21 18:50 23m retest repro upstream OK log
2024/11/21 18:50 23m retest repro upstream OK log
2024/11/07 18:36 12m edumazet@google.com upstream report log

Sample crash report:
Oops: divide error: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 6599 Comm: syz-executor430 Not tainted 6.12.0-rc5-syzkaller-00291-g05b92660cdfe #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:__tcp_select_window+0x5b4/0x1310 net/ipv4/tcp_output.c:3163
Code: f6 44 01 e3 89 df e8 9b 75 09 f8 44 39 f3 0f 8d 11 ff ff ff e8 0d 74 09 f8 45 89 f4 e9 04 ff ff ff e8 00 74 09 f8 44 89 f0 99 <f7> 7c 24 14 41 29 d6 45 89 f4 e9 ec fe ff ff e8 e8 73 09 f8 48 89
RSP: 0018:ffffc90004987930 EFLAGS: 00010293
RAX: 0000000000017e67 RBX: 0000000000017e67 RCX: ffffffff8983314b
RDX: 0000000000000000 RSI: ffffffff898331b0 RDI: 0000000000000004
RBP: 00000000005d6000 R08: 0000000000000004 R09: 0000000000017e67
R10: 0000000000010000 R11: 0000000000000000 R12: 0000000000010000
R13: ffff888030ed4dc0 R14: 0000000000017e67 R15: 00000000002eb000
FS:  00007ff8ec0066c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff8ec0a1bb8 CR3: 000000006fa26000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __tcp_cleanup_rbuf+0x3e7/0x4b0 net/ipv4/tcp.c:1493
 mptcp_rcv_space_adjust net/mptcp/protocol.c:2085 [inline]
 mptcp_recvmsg+0x2156/0x2600 net/mptcp/protocol.c:2289
 inet_recvmsg+0x469/0x6a0 net/ipv4/af_inet.c:885
 sock_recvmsg_nosec net/socket.c:1051 [inline]
 sock_recvmsg+0x1b2/0x250 net/socket.c:1073
 __sys_recvfrom+0x1a5/0x2e0 net/socket.c:2265
 __do_sys_recvfrom net/socket.c:2283 [inline]
 __se_sys_recvfrom net/socket.c:2279 [inline]
 __x64_sys_recvfrom+0xe0/0x1c0 net/socket.c:2279
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff8ec04b559
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 00 00 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 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff8ec006208 EFLAGS: 00000246 ORIG_RAX: 000000000000002d
RAX: ffffffffffffffda RBX: 00007ff8ec0d5308 RCX: 00007ff8ec04b559
RDX: 000000800000000e RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007ff8ec0d5300 R08: 0000000000000000 R09: ffffffff81000000
R10: 0000000000000100 R11: 0000000000000246 R12: 00007ff8ec0d530c
R13: 00007ff8ec0a2074 R14: 000000800000000e R15: 00000000fffffdef
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__tcp_select_window+0x5b4/0x1310 net/ipv4/tcp_output.c:3163
Code: f6 44 01 e3 89 df e8 9b 75 09 f8 44 39 f3 0f 8d 11 ff ff ff e8 0d 74 09 f8 45 89 f4 e9 04 ff ff ff e8 00 74 09 f8 44 89 f0 99 <f7> 7c 24 14 41 29 d6 45 89 f4 e9 ec fe ff ff e8 e8 73 09 f8 48 89
RSP: 0018:ffffc90004987930 EFLAGS: 00010293
RAX: 0000000000017e67 RBX: 0000000000017e67 RCX: ffffffff8983314b
RDX: 0000000000000000 RSI: ffffffff898331b0 RDI: 0000000000000004
RBP: 00000000005d6000 R08: 0000000000000004 R09: 0000000000017e67
R10: 0000000000010000 R11: 0000000000000000 R12: 0000000000010000
R13: ffff888030ed4dc0 R14: 0000000000017e67 R15: 00000000002eb000
FS:  00007ff8ec0066c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff8ec0a1bb8 CR3: 000000006fa26000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	f6 44 01 e3 89       	testb  $0x89,-0x1d(%rcx,%rax,1)
   5:	df e8                	fucomip %st(0),%st
   7:	9b                   	fwait
   8:	75 09                	jne    0x13
   a:	f8                   	clc
   b:	44 39 f3             	cmp    %r14d,%ebx
   e:	0f 8d 11 ff ff ff    	jge    0xffffff25
  14:	e8 0d 74 09 f8       	call   0xf8097426
  19:	45 89 f4             	mov    %r14d,%r12d
  1c:	e9 04 ff ff ff       	jmp    0xffffff25
  21:	e8 00 74 09 f8       	call   0xf8097426
  26:	44 89 f0             	mov    %r14d,%eax
  29:	99                   	cltd
* 2a:	f7 7c 24 14          	idivl  0x14(%rsp) <-- trapping instruction
  2e:	41 29 d6             	sub    %edx,%r14d
  31:	45 89 f4             	mov    %r14d,%r12d
  34:	e9 ec fe ff ff       	jmp    0xffffff25
  39:	e8 e8 73 09 f8       	call   0xf8097426
  3e:	48                   	rex.W
  3f:	89                   	.byte 0x89

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/02 11:30 upstream 05b92660cdfe f00eed24 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto divide error in __tcp_select_window
2024/11/04 01:27 upstream a33ab3f94f51 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto divide error in __tcp_select_window
2024/11/02 10:28 upstream 05b92660cdfe f00eed24 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto divide error in __tcp_select_window
2024/11/02 06:19 upstream 05b92660cdfe f00eed24 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto divide error in __tcp_select_window
2024/11/02 05:12 upstream 05b92660cdfe f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto divide error in __tcp_select_window
* Struck through repros no longer work on HEAD.