syzbot


general protection fault in do_tcp_getsockopt (2)

Status: fixed on 2020/05/10 10:42
Subsystems: net
[Documentation on labels]
Fix commit: 6cd6cbf593bf net-backports: tcp: repair: fix TCP_QUEUE_SEQ implementation
First crash: 1530d, last: 1530d
Cause bisection: introduced by (bisect log) :
commit c8856c051454909e5059df4e81c77b9c366c5515
Author: Arjun Roy <arjunroy@google.com>
Date: Fri Feb 14 23:30:49 2020 +0000

  tcp-zerocopy: Return inq along with tcp receive zerocopy.

Crash: general protection fault in do_tcp_getsockopt (log)
Repro: C syz .config
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in do_tcp_getsockopt net C 9 2138d 2150d 8/26 fixed on 2018/08/07 13:43

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000000e: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000070-0x0000000000000077]
CPU: 1 PID: 9355 Comm: syz-executor289 Not tainted 5.6.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:tcp_zerocopy_receive net/ipv4/tcp.c:1788 [inline]
RIP: 0010:do_tcp_getsockopt.isra.0+0x2457/0x3480 net/ipv4/tcp.c:3683
Code: fd ff ff 45 2b 6c 24 28 44 89 ad b0 fd ff ff e8 7f a1 ec fa 49 8d 7c 24 70 48 b9 00 00 00 00 00 fc ff df 48 89 f8 48 c1 e8 03 <0f> b6 04 08 84 c0 74 08 3c 03 0f 8e a5 0f 00 00 45 8b 74 24 70 49
RSP: 0018:ffffc90001fa7b10 EFLAGS: 00010202
RAX: 000000000000000e RBX: 0000000000000000 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffffffff86857d91 RDI: 0000000000000070
RBP: ffffc90001fa7de0 R08: ffff88809428a100 R09: ffffed10120479d8
R10: ffffed10120479d7 R11: ffff88809023cebf R12: 0000000000000000
R13: 0000000041b58ab3 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000c2d880(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 000000009bfbc000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 tcp_getsockopt+0xb2/0xd0 net/ipv4/tcp.c:3726
 __sys_getsockopt+0x14b/0x2e0 net/socket.c:2175
 __do_sys_getsockopt net/socket.c:2190 [inline]
 __se_sys_getsockopt net/socket.c:2187 [inline]
 __x64_sys_getsockopt+0xba/0x150 net/socket.c:2187
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440239
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffcad28a398 EFLAGS: 00000246 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440239
RDX: 0000000000000023 RSI: 0000000000000006 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000200000c0 R09: 0000000180000000
R10: 0000000020000000 R11: 0000000000000246 R12: 0000000000401ac0
R13: 0000000000401b50 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace f0e4a22fa76495f5 ]---
RIP: 0010:tcp_zerocopy_receive net/ipv4/tcp.c:1788 [inline]
RIP: 0010:do_tcp_getsockopt.isra.0+0x2457/0x3480 net/ipv4/tcp.c:3683
Code: fd ff ff 45 2b 6c 24 28 44 89 ad b0 fd ff ff e8 7f a1 ec fa 49 8d 7c 24 70 48 b9 00 00 00 00 00 fc ff df 48 89 f8 48 c1 e8 03 <0f> b6 04 08 84 c0 74 08 3c 03 0f 8e a5 0f 00 00 45 8b 74 24 70 49
RSP: 0018:ffffc90001fa7b10 EFLAGS: 00010202
RAX: 000000000000000e RBX: 0000000000000000 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffffffff86857d91 RDI: 0000000000000070
RBP: ffffc90001fa7de0 R08: ffff88809428a100 R09: ffffed10120479d8
R10: ffffed10120479d7 R11: ffff88809023cebf R12: 0000000000000000
R13: 0000000041b58ab3 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000c2d880(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 000000009bfbc000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/19 00:35 net-next-old a58741ef1e4a 0a96a13c .config console log report syz C ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.