syzbot


general protection fault in tls_setsockopt

Status: fixed on 2019/08/27 17:15
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+23d9570edec63669d890@syzkaller.appspotmail.com
Fix commit: 5d92e631b8be net/tls: partially revert fix transition through disconnect with close
First crash: 1808d, last: 1790d
Cause bisection: introduced by (bisect log) :
commit 7c85c448e7d74c4ddd759440a2141eab663567cf
Author: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Date: Tue Oct 9 01:04:54 2018 +0000

  selftests/bpf: test_verifier, check bpf_map_lookup_elem access in bpf prog

Crash: KASAN: use-after-free Read in psock_map_pop (log)
Repro: syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
general protection fault in tls_setsockopt 1 (2) 2019/08/19 21:29

Sample crash report:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8922 Comm: syz-executor.5 Not tainted 5.2.0+ #59
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:tls_setsockopt+0x87/0x8c0 net/tls/tls_main.c:592
Code: 80 3c 02 00 0f 85 a5 07 00 00 49 8b 84 24 b0 06 00 00 48 ba 00 00 00 00 00 fc ff df 48 8d b8 88 00 00 00 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85 85 07 00 00 41 89 d8 4c 89 f1 44 89 ea 44 89 fe
RSP: 0018:ffff88807b5d7d30 EFLAGS: 00010206
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000000011
RDX: dffffc0000000000 RSI: ffffffff8618ba84 RDI: 0000000000000088
RBP: ffff88807b5d7d80 R08: ffff8880a2108300 R09: ffff8880a2108b88
R10: ffffed1015d06c83 R11: ffff8880ae83641b R12: ffff88808d022040
R13: 000000000000001f R14: 0000000020000340 R15: 0000000000000006
FS:  00007f27d5dba700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f65b6fd5518 CR3: 00000000a7ea9000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 sock_common_setsockopt+0x94/0xd0 net/core/sock.c:3130
 __sys_setsockopt+0x253/0x4b0 net/socket.c:2080
 __do_sys_setsockopt net/socket.c:2096 [inline]
 __se_sys_setsockopt net/socket.c:2093 [inline]
 __x64_sys_setsockopt+0xbe/0x150 net/socket.c:2093
 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x459819
Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f27d5db9c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000459819
RDX: 000000000000001f RSI: 0000000000000006 RDI: 0000000000000005
RBP: 000000000075bf20 R08: 0000000000000004 R09: 0000000000000000
R10: 0000000020000340 R11: 0000000000000246 R12: 00007f27d5dba6d4
R13: 00000000004c7cb9 R14: 00000000004dd878 R15: 00000000ffffffff
Modules linked in:
---[ end trace f2d7598368950f0d ]---
RIP: 0010:tls_setsockopt+0x87/0x8c0 net/tls/tls_main.c:592
Code: 80 3c 02 00 0f 85 a5 07 00 00 49 8b 84 24 b0 06 00 00 48 ba 00 00 00 00 00 fc ff df 48 8d b8 88 00 00 00 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85 85 07 00 00 41 89 d8 4c 89 f1 44 89 ea 44 89 fe
RSP: 0018:ffff88807b5d7d30 EFLAGS: 00010206
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000000011
RDX: dffffc0000000000 RSI: ffffffff8618ba84 RDI: 0000000000000088
RBP: ffff88807b5d7d80 R08: ffff8880a2108300 R09: ffff8880a2108b88
R10: ffffed1015d06c83 R11: ffff8880ae83641b R12: ffff88808d022040
R13: 000000000000001f R14: 0000000020000340 R15: 0000000000000006
FS:  00007f27d5dba700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000075c091 CR3: 00000000a7ea9000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/07/12 22:29 upstream d7d170a8e357 baa5258a .config console log report syz ci-upstream-kasan-gce-root
2019/07/12 22:27 net-old 114a5c324015 baa5258a .config console log report syz ci-upstream-net-this-kasan-gce
2019/07/30 06:44 net-next-old 31cc088a4f5d f67095ee .config console log report syz ci-upstream-net-kasan-gce
2019/07/12 21:57 net-next-old a131c2bf1656 baa5258a .config console log report syz ci-upstream-net-kasan-gce
2019/07/30 04:27 linux-next 0d8b3265d9a6 f67095ee .config console log report syz ci-upstream-linux-next-kasan-gce-root
2019/07/12 22:27 linux-next 2c51253c1714 baa5258a .config console log report syz ci-upstream-linux-next-kasan-gce-root
2019/07/25 06:21 linux-next 9e6dfe8045f8 32329ceb .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.