syzbot


divide error in tcp_rcv_space_adjust (2)

Status: fixed on 2023/07/01 16:05
Subsystems: net
[Documentation on labels]
Fix commit: 4faeee0cf8a5 tcp: deny tcp_disconnect() when threads are waiting
First crash: 424d, last: 424d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream divide error in tcp_rcv_space_adjust (3) net C done 3 29d 30d 25/26 internal: reported C repro on 2024/04/30 11:12
upstream divide error in tcp_rcv_space_adjust net 3 729d 760d 0/26 auto-closed as invalid on 2022/08/30 02:07

Sample crash report:
divide error: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 13832 Comm: syz-executor.5 Not tainted 6.3.0-rc4-syzkaller-00224-g00c7b5f4ddc5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
RIP: 0010:tcp_rcv_space_adjust+0x36e/0x9d0 net/ipv4/tcp_input.c:740
Code: 00 00 00 00 fc ff df 4c 89 64 24 48 8b 44 24 04 44 89 f9 41 81 c7 80 03 00 00 c1 e1 04 44 29 f0 48 63 c9 48 01 e9 48 0f af c1 <49> f7 f6 48 8d 04 41 48 89 44 24 40 48 8b 44 24 30 48 c1 e8 03 48
RSP: 0018:ffffc900033af660 EFLAGS: 00010206
RAX: 4a66b76cbade2c48 RBX: ffff888076640cc0 RCX: 00000000c334e4ac
RDX: 0000000000000000 RSI: dffffc0000000000 RDI: 0000000000000001
RBP: 00000000c324e86c R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880766417f8
R13: ffff888028fbb980 R14: 0000000000000000 R15: 0000000000010344
FS:  00007f5bffbfe700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b32f25000 CR3: 000000007ced0000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 tcp_recvmsg_locked+0x100e/0x22e0 net/ipv4/tcp.c:2616
 tcp_recvmsg+0x117/0x620 net/ipv4/tcp.c:2681
 inet6_recvmsg+0x114/0x640 net/ipv6/af_inet6.c:670
 sock_recvmsg_nosec net/socket.c:1017 [inline]
 sock_recvmsg+0xe2/0x160 net/socket.c:1038
 ____sys_recvmsg+0x210/0x5a0 net/socket.c:2720
 ___sys_recvmsg+0xf2/0x180 net/socket.c:2762
 do_recvmmsg+0x25e/0x6e0 net/socket.c:2856
 __sys_recvmmsg net/socket.c:2935 [inline]
 __do_sys_recvmmsg net/socket.c:2958 [inline]
 __se_sys_recvmmsg net/socket.c:2951 [inline]
 __x64_sys_recvmmsg+0x20f/0x260 net/socket.c:2951
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f5c0108c0f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5bffbfe168 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007f5c011ac050 RCX: 00007f5c0108c0f9
RDX: 0000000000000001 RSI: 0000000020000bc0 RDI: 0000000000000003
RBP: 00007f5c010e7b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000122 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5c012cfb1f R14: 00007f5bffbfe300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:tcp_rcv_space_adjust+0x36e/0x9d0 net/ipv4/tcp_input.c:740
Code: 00 00 00 00 fc ff df 4c 89 64 24 48 8b 44 24 04 44 89 f9 41 81 c7 80 03 00 00 c1 e1 04 44 29 f0 48 63 c9 48 01 e9 48 0f af c1 <49> f7 f6 48 8d 04 41 48 89 44 24 40 48 8b 44 24 30 48 c1 e8 03 48
RSP: 0018:ffffc900033af660 EFLAGS: 00010206
RAX: 4a66b76cbade2c48 RBX: ffff888076640cc0 RCX: 00000000c334e4ac
RDX: 0000000000000000 RSI: dffffc0000000000 RDI: 0000000000000001
RBP: 00000000c324e86c R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880766417f8
R13: ffff888028fbb980 R14: 0000000000000000 R15: 0000000000010344
FS:  00007f5bffbfe700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c010b95240 CR3: 000000007ced0000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 6 bytes skipped:
   0:	df 4c 89 64          	fisttps 0x64(%rcx,%rcx,4)
   4:	24 48                	and    $0x48,%al
   6:	8b 44 24 04          	mov    0x4(%rsp),%eax
   a:	44 89 f9             	mov    %r15d,%ecx
   d:	41 81 c7 80 03 00 00 	add    $0x380,%r15d
  14:	c1 e1 04             	shl    $0x4,%ecx
  17:	44 29 f0             	sub    %r14d,%eax
  1a:	48 63 c9             	movslq %ecx,%rcx
  1d:	48 01 e9             	add    %rbp,%rcx
  20:	48 0f af c1          	imul   %rcx,%rax
* 24:	49 f7 f6             	div    %r14 <-- trapping instruction
  27:	48 8d 04 41          	lea    (%rcx,%rax,2),%rax
  2b:	48 89 44 24 40       	mov    %rax,0x40(%rsp)
  30:	48 8b 44 24 30       	mov    0x30(%rsp),%rax
  35:	48 c1 e8 03          	shr    $0x3,%rax
  39:	48                   	rex.W

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/02 03:28 upstream 00c7b5f4ddc5 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce divide error in tcp_rcv_space_adjust
* Struck through repros no longer work on HEAD.