syzbot


BUG: stack guard page was hit in vsock_bpf_recvmsg

Status: upstream: reported C repro on 2024/08/09 17:42
Subsystems: net virt
[Documentation on labels]
Reported-by: syzbot+bdb4bd87b5e22058e2a4@syzkaller.appspotmail.com
Fix commit: 69139d2919dd vsock: fix recursive ->recvmsg calls
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 36d, last: 35d
Cause bisection: introduced by (bisect log) :
commit 634f1a7110b439c65fd8a809171c1d2d28bcea6f
Author: Bobby Eshleman <bobby.eshleman@bytedance.com>
Date: Mon Mar 27 19:11:51 2023 +0000

  vsock: support sockmap

Crash: BUG: stack guard page was hit in vsock_bpf_recvmsg (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[Patch net] vsock: fix recursive ->recvmsg calls 3 (3) 2024/08/15 10:20
[syzbot] [net?] [virt?] BUG: stack guard page was hit in vsock_bpf_recvmsg 1 (6) 2024/08/12 01:46
Last patch testing requests (3)
Created Duration User Patch Repo Result
2024/08/12 01:46 31m xiyou.wangcong@gmail.com patch net-next OK log
2024/08/12 01:19 17m xiyou.wangcong@gmail.com patch net-next report log
2024/08/11 00:13 31m hdanton@sina.com patch git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git eb3ab13d997a OK log

Sample crash report:
BUG: TASK stack guard page was hit at ffffc90003327f58 (stack is ffffc90003328000..ffffc90003330000)
Oops: stack guard page: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 5230 Comm: syz-executor797 Not tainted 6.11.0-rc2-syzkaller-00271-geb3ab13d997a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
RIP: 0010:validate_chain+0x1f/0x5900 kernel/locking/lockdep.c:3824
Code: 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 48 81 ec c0 02 00 00 49 89 ce <89> 54 24 58 48 89 bc 24 80 00 00 00 65 48 8b 04 25 28 00 00 00 48
RSP: 0018:ffffc90003327f60 EFLAGS: 00010086
RAX: 1ffffffff268c861 RBX: ffffffff93464308 RCX: 19c27e4cbe712c8a
RDX: 0000000000000001 RSI: ffff88805fadc6e0 RDI: ffff88805fadbc00
RBP: ffffc90003328260 R08: ffffffff9372e8cf R09: 1ffffffff26e5d19
R10: dffffc0000000000 R11: fffffbfff26e5d1a R12: 0000000000000001
R13: ffff88805fadc6d8 R14: 19c27e4cbe712c8a R15: ffff88805fadc700
FS:  000055558fdeb380(0000) GS:ffff8880b9300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90003327f58 CR3: 000000007bf4c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <#DF>
 </#DF>
 <TASK>
 __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142
 reacquire_held_locks+0x3eb/0x690 kernel/locking/lockdep.c:5284
 __lock_release kernel/locking/lockdep.c:5473 [inline]
 lock_release+0x396/0xa30 kernel/locking/lockdep.c:5780
 sock_release_ownership include/net/sock.h:1722 [inline]
 release_sock+0x12f/0x1f0 net/core/sock.c:3564
 vsock_bpf_recvmsg+0x60f/0x1090 net/vmw_vsock/vsock_bpf.c:88
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 vsock_bpf_recvmsg+0xcf5/0x1090
 sock_recvmsg_nosec net/socket.c:1046 [inline]
 sock_recvmsg+0x22f/0x280 net/socket.c:1068
 ____sys_recvmsg+0x1db/0x470 net/socket.c:2816
 ___sys_recvmsg net/socket.c:2858 [inline]
 __sys_recvmsg+0x2f0/0x3e0 net/socket.c:2888
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7efff8fd4c79
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 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:00007ffd30d5f148 EFLAGS: 00000246 ORIG_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007efff8fd4c79
RDX: 0000000000010042 RSI: 00000000200003c0 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000006 R09: 0000000000000006
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:validate_chain+0x1f/0x5900 kernel/locking/lockdep.c:3824
Code: 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 48 81 ec c0 02 00 00 49 89 ce <89> 54 24 58 48 89 bc 24 80 00 00 00 65 48 8b 04 25 28 00 00 00 48
RSP: 0018:ffffc90003327f60 EFLAGS: 00010086
RAX: 1ffffffff268c861 RBX: ffffffff93464308 RCX: 19c27e4cbe712c8a
RDX: 0000000000000001 RSI: ffff88805fadc6e0 RDI: ffff88805fadbc00
RBP: ffffc90003328260 R08: ffffffff9372e8cf R09: 1ffffffff26e5d19
R10: dffffc0000000000 R11: fffffbfff26e5d1a R12: 0000000000000001
R13: ffff88805fadc6d8 R14: 19c27e4cbe712c8a R15: ffff88805fadc700
FS:  000055558fdeb380(0000) GS:ffff8880b9300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90003327f58 CR3: 000000007bf4c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	90                   	nop
   1:	90                   	nop
   2:	90                   	nop
   3:	90                   	nop
   4:	90                   	nop
   5:	90                   	nop
   6:	90                   	nop
   7:	90                   	nop
   8:	90                   	nop
   9:	90                   	nop
   a:	90                   	nop
   b:	f3 0f 1e fa          	endbr64
   f:	55                   	push   %rbp
  10:	48 89 e5             	mov    %rsp,%rbp
  13:	41 57                	push   %r15
  15:	41 56                	push   %r14
  17:	41 55                	push   %r13
  19:	41 54                	push   %r12
  1b:	53                   	push   %rbx
  1c:	48 83 e4 e0          	and    $0xffffffffffffffe0,%rsp
  20:	48 81 ec c0 02 00 00 	sub    $0x2c0,%rsp
  27:	49 89 ce             	mov    %rcx,%r14
* 2a:	89 54 24 58          	mov    %edx,0x58(%rsp) <-- trapping instruction
  2e:	48 89 bc 24 80 00 00 	mov    %rdi,0x80(%rsp)
  35:	00
  36:	65 48 8b 04 25 28 00 	mov    %gs:0x28,%rax
  3d:	00 00
  3f:	48                   	rex.W

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/10 00:35 net-next eb3ab13d997a a9e7e9e3 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: stack guard page was hit in vsock_bpf_recvmsg
2024/08/09 22:46 net-next eb3ab13d997a a9e7e9e3 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: stack guard page was hit in vsock_bpf_recvmsg
2024/08/09 20:55 net-next eb3ab13d997a a9e7e9e3 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: stack guard page was hit in vsock_bpf_recvmsg
2024/08/09 19:18 net-next eb3ab13d997a a9e7e9e3 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: stack guard page was hit in vsock_bpf_recvmsg
2024/08/09 17:41 net-next eb3ab13d997a a9e7e9e3 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: stack guard page was hit in vsock_bpf_recvmsg
2024/08/09 13:13 net-next eb3ab13d997a 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: stack guard page was hit in vsock_bpf_recvmsg
* Struck through repros no longer work on HEAD.