syzbot


BUG: stack guard page was hit in inet6_release

Status: fixed on 2023/06/08 14:41
Subsystems: bpf net
[Documentation on labels]
Reported-by: syzbot+04c21ed96d861dccc5cd@syzkaller.appspotmail.com
Fix commit: ddce1e091757 bpf, sockmap: Check for any of tcp_bpf_prots when cloning a listener
First crash: 733d, last: 682d
Cause bisection: introduced by (bisect log) :
commit 38207a5e81230d6ffbdd51e5fa5681be5116dcae
Author: John Fastabend <john.fastabend@gmail.com>
Date: Fri Nov 19 18:14:17 2021 +0000

  bpf, sockmap: Attach map progs to psock early for feature probes

Crash: BUG: stack guard page was hit in inet_release (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH bpf v2 0/4] bpf, sockmap: Fix infinite recursion in sock_map_close 10 (10) 2023/01/25 06:00
[syzbot] BUG: stack guard page was hit in inet6_release 4 (6) 2023/01/21 02:06
[PATCH bpf 0/3] bpf, sockmap: Fix infinite recursion in sock_map_close 11 (11) 2023/01/16 11:53
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/12/23 06:07 23m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log

Sample crash report:
TCP: request_sock_TCPv6: Possible SYN flooding on port [::]:20002. Sending cookies.
BUG: TASK stack guard page was hit at ffffc900039f7fe8 (stack is ffffc900039f8000..ffffc90003a00000)
stack guard page: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5063 Comm: syz-executor123 Not tainted 6.2.0-rc1-syzkaller-00084-gc8451c141e07 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:mark_lock.part.0+0x26/0x1910 kernel/locking/lockdep.c:4593
Code: 00 00 00 00 41 57 41 56 41 55 41 89 d5 48 ba 00 00 00 00 00 fc ff df 41 54 49 89 f4 55 53 48 81 ec 38 01 00 00 48 8d 5c 24 38 <48> 89 3c 24 48 c7 44 24 38 b3 8a b5 41 48 c1 eb 03 48 c7 44 24 40
RSP: 0018:ffffc900039f7ff8 EFLAGS: 00010092
RAX: 0000000000000004 RBX: ffffc900039f8030 RCX: ffffffff816393a0
RDX: dffffc0000000000 RSI: ffff888023928a60 RDI: ffff888023928000
RBP: ffff888023928a82 R08: 0000000000000000 R09: ffffffff91336b5f
R10: fffffbfff2266d6b R11: 0000000000000000 R12: ffff888023928a60
R13: 0000000000000002 R14: ffff888023928a38 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc900039f7fe8 CR3: 000000000c48e000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 mark_lock kernel/locking/lockdep.c:4598 [inline]
 mark_usage kernel/locking/lockdep.c:4543 [inline]
 __lock_acquire+0x847/0x56d0 kernel/locking/lockdep.c:5009
 reacquire_held_locks+0x214/0x4e0 kernel/locking/lockdep.c:5193
 __lock_release kernel/locking/lockdep.c:5382 [inline]
 lock_release+0x371/0x810 kernel/locking/lockdep.c:5688
 sock_release_ownership include/net/sock.h:1833 [inline]
 release_sock+0x175/0x1b0 net/core/sock.c:3493
 sock_map_close+0x694/0x7b0 net/core/sock_map.c:1617
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 sock_map_close+0x6dc/0x7b0 net/core/sock_map.c:1618
 inet_release+0x132/0x270 net/ipv4/af_inet.c:428
 inet6_release+0x50/0x70 net/ipv6/af_inet6.c:489
 __sock_release+0xcd/0x280 net/socket.c:650
 sock_close+0x1c/0x20 net/socket.c:1365
 __fput+0x27c/0xa90 fs/file_table.c:320
 task_work_run+0x16f/0x270 kernel/task_work.c:179
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0xaa8/0x2950 kernel/exit.c:867
 do_group_exit+0xd4/0x2a0 kernel/exit.c:1012
 get_signal+0x21c3/0x2450 kernel/signal.c:2859
 arch_do_signal_or_restart+0x79/0x5c0 arch/x86/kernel/signal.c:306
 exit_to_user_mode_loop kernel/entry/common.c:168 [inline]
 exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:203
 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
 syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296
 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f07f35a40b9
Code: Unable to access opcode bytes at 0x7f07f35a408f.
RSP: 002b:00007fff963108c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000120
RAX: 0000000000000007 RBX: 0000000000000000 RCX: 00007f07f35a40b9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007fff96310a68 R09: 00007fff96310a68
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f07f3567940
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:mark_lock.part.0+0x26/0x1910 kernel/locking/lockdep.c:4593
Code: 00 00 00 00 41 57 41 56 41 55 41 89 d5 48 ba 00 00 00 00 00 fc ff df 41 54 49 89 f4 55 53 48 81 ec 38 01 00 00 48 8d 5c 24 38 <48> 89 3c 24 48 c7 44 24 38 b3 8a b5 41 48 c1 eb 03 48 c7 44 24 40
RSP: 0018:ffffc900039f7ff8 EFLAGS: 00010092
RAX: 0000000000000004 RBX: ffffc900039f8030 RCX: ffffffff816393a0
RDX: dffffc0000000000 RSI: ffff888023928a60 RDI: ffff888023928000
RBP: ffff888023928a82 R08: 0000000000000000 R09: ffffffff91336b5f
R10: fffffbfff2266d6b R11: 0000000000000000 R12: ffff888023928a60
R13: 0000000000000002 R14: ffff888023928a38 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc900039f7fe8 CR3: 000000000c48e000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	00 00                	add    %al,(%rax)
   4:	41 57                	push   %r15
   6:	41 56                	push   %r14
   8:	41 55                	push   %r13
   a:	41 89 d5             	mov    %edx,%r13d
   d:	48 ba 00 00 00 00 00 	movabs $0xdffffc0000000000,%rdx
  14:	fc ff df
  17:	41 54                	push   %r12
  19:	49 89 f4             	mov    %rsi,%r12
  1c:	55                   	push   %rbp
  1d:	53                   	push   %rbx
  1e:	48 81 ec 38 01 00 00 	sub    $0x138,%rsp
  25:	48 8d 5c 24 38       	lea    0x38(%rsp),%rbx
* 2a:	48 89 3c 24          	mov    %rdi,(%rsp) <-- trapping instruction
  2e:	48 c7 44 24 38 b3 8a 	movq   $0x41b58ab3,0x38(%rsp)
  35:	b5 41
  37:	48 c1 eb 03          	shr    $0x3,%rbx
  3b:	48                   	rex.W
  3c:	c7                   	.byte 0xc7
  3d:	44 24 40             	rex.R and $0x40,%al

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/31 12:20 upstream c8451c141e07 ab32d508 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root BUG: stack guard page was hit in inet6_release
2022/12/04 22:56 net-old 6a30d3e3491d e080de16 .config strace log report syz C ci-upstream-net-this-kasan-gce BUG: stack guard page was hit in inet6_release
2022/12/04 19:10 net-next-old 65e6af6cebef e080de16 .config strace log report syz C ci-upstream-net-kasan-gce BUG: stack guard page was hit in inet6_release
2023/01/24 19:40 linux-next 691781f561e9 9dfcf09c .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: stack guard page was hit in inet6_release
* Struck through repros no longer work on HEAD.