syzbot


BUG: stack guard page was hit in sys_setsockopt

Status: auto-closed as invalid on 2021/12/11 16:25
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 499d, last: 446d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: stack guard page was hit in sys_setsockopt (2) 1 354d 354d 0/24 auto-closed as invalid on 2022/03/14 06:27

Sample crash report:
BUG: stack guard page was hit at ffffc90004a87ff8 (stack is ffffc90004a88000..ffffc90004a8ffff)
kernel stack overflow (double-fault): 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 10336 Comm: syz-executor.2 Not tainted 5.14.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:write_comp_data kernel/kcov.c:218 [inline]
RIP: 0010:__sanitizer_cov_trace_const_cmp4+0x17/0x70 kernel/kcov.c:284
Code: 30 f0 4c 89 54 d8 20 48 89 10 5b c3 0f 1f 80 00 00 00 00 41 89 f8 bf 03 00 00 00 4c 8b 14 24 89 f1 65 48 8b 34 25 40 f0 01 00 <e8> 54 f0 ff ff 84 c0 74 4b 48 8b 86 18 15 00 00 8b b6 14 15 00 00
RSP: 0018:ffffc90004a88000 EFLAGS: 00010216
RAX: 0000000000000189 RBX: 1ffff92000951008 RCX: 0000000000000000
RDX: 0000000000040000 RSI: ffff88807039b880 RDI: 0000000000000003
RBP: ffffc90004a880c8 R08: 000000000000011a R09: 00000000000000e8
R10: ffffffff87c1ce00 R11: 0000000000000000 R12: ffff88807025c680
R13: 0000000000000000 R14: 0000000000000010 R15: dffffc0000000000
FS:  00007f30aa5de700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90004a87ff8 CR3: 000000001c2d4000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 tls_setsockopt+0x90/0xe60 net/tls/tls_main.c:620
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 tls_setsockopt+0x128/0xe60 net/tls/tls_main.c:621
 __sys_setsockopt+0x2db/0x610 net/socket.c:2161
 __do_sys_setsockopt net/socket.c:2172 [inline]
 __se_sys_setsockopt net/socket.c:2169 [inline]
 __x64_sys_setsockopt+0xba/0x150 net/socket.c:2169
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f30aa5de188 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665f9
RDX: 0000000000000010 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00000000004bfcc4 R08: 00000000000000e8 R09: 0000000000000000
R10: 0000000020000200 R11: 0000000000000246 R12: 000000000056bf80
R13: 00007ffe5a0b20df R14: 00007f30aa5de300 R15: 0000000000022000
Modules linked in:
---[ end trace 526fa53939cb2e24 ]---
RIP: 0010:write_comp_data kernel/kcov.c:218 [inline]
RIP: 0010:__sanitizer_cov_trace_const_cmp4+0x17/0x70 kernel/kcov.c:284
Code: 30 f0 4c 89 54 d8 20 48 89 10 5b c3 0f 1f 80 00 00 00 00 41 89 f8 bf 03 00 00 00 4c 8b 14 24 89 f1 65 48 8b 34 25 40 f0 01 00 <e8> 54 f0 ff ff 84 c0 74 4b 48 8b 86 18 15 00 00 8b b6 14 15 00 00
RSP: 0018:ffffc90004a88000 EFLAGS: 00010216
RAX: 0000000000000189 RBX: 1ffff92000951008 RCX: 0000000000000000
RDX: 0000000000040000 RSI: ffff88807039b880 RDI: 0000000000000003
RBP: ffffc90004a880c8 R08: 000000000000011a R09: 00000000000000e8
R10: ffffffff87c1ce00 R11: 0000000000000000 R12: ffff88807025c680
R13: 0000000000000000 R14: 0000000000000010 R15: dffffc0000000000
FS:  00007f30aa5de700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90004a87ff8 CR3: 000000001c2d4000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	30 f0                	xor    %dh,%al
   2:	4c 89 54 d8 20       	mov    %r10,0x20(%rax,%rbx,8)
   7:	48 89 10             	mov    %rdx,(%rax)
   a:	5b                   	pop    %rbx
   b:	c3                   	retq
   c:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
  13:	41 89 f8             	mov    %edi,%r8d
  16:	bf 03 00 00 00       	mov    $0x3,%edi
  1b:	4c 8b 14 24          	mov    (%rsp),%r10
  1f:	89 f1                	mov    %esi,%ecx
  21:	65 48 8b 34 25 40 f0 	mov    %gs:0x1f040,%rsi
  28:	01 00
* 2a:	e8 54 f0 ff ff       	callq  0xfffff083 <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	74 4b                	je     0x7e
  33:	48 8b 86 18 15 00 00 	mov    0x1518(%rsi),%rax
  3a:	8b b6 14 15 00 00    	mov    0x1514(%rsi),%esi

Crashes (10):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-net-this-kasan-gce 2021/09/04 18:17 net 57f780f1c433 d236a457 .config log report info BUG: stack guard page was hit in sys_setsockopt
ci-upstream-net-this-kasan-gce 2021/08/15 00:29 net 5f7735196390 2489ab88 .config log report info BUG: stack guard page was hit in sys_setsockopt
ci-upstream-net-this-kasan-gce 2021/07/21 13:04 net 09cfae9f13d5 1b201b48 .config log report info BUG: stack guard page was hit in sys_setsockopt
ci-upstream-net-kasan-gce 2021/09/12 16:21 net-next 626bf91a292e 5ae8508a .config log report info BUG: stack guard page was hit in sys_setsockopt
ci-upstream-net-kasan-gce 2021/09/08 01:18 net-next 27151f177827 064c9eb7 .config log report info BUG: stack guard page was hit in sys_setsockopt
ci-upstream-net-kasan-gce 2021/09/05 16:17 net-next 29ce8f970107 d236a457 .config log report info BUG: stack guard page was hit in sys_setsockopt
ci-upstream-net-kasan-gce 2021/09/03 03:55 net-next 29ce8f970107 15cea0a3 .config log report info BUG: stack guard page was hit in sys_setsockopt
ci-upstream-net-kasan-gce 2021/08/10 17:43 net-next 4ef3960ea19c 6972b106 .config log report info BUG: stack guard page was hit in sys_setsockopt
ci-upstream-net-kasan-gce 2021/08/04 23:53 net-next c2eecaa193ff b97d64c9 .config log report info BUG: stack guard page was hit in sys_setsockopt
ci-upstream-net-kasan-gce 2021/07/31 13:50 net-next 3e12361b6d23 6c236867 .config log report info BUG: stack guard page was hit in sys_setsockopt
* Struck through repros no longer work on HEAD.