[Bug 272401] 32 bit sysctl KERN_PROC_VM_LAYOUT hangs unkillable on 64 bit ARM

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 07 Jul 2023 00:45:29 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272401

--- Comment #1 from John F. Carr <jfc@mit.edu> ---
The corresponding test of an i386 binary on amd64 causes a panic.  It does not
require a chroot environment so it is allows an unprivileged user to crash the
machine.  I don't think this is a bug in any released version.  The test
program does not compile on 13.2.

Running on amd64 and current from a few weeks back.  First a 64 bit version of
the reproducer:

root@monax-vm:/tmp # ./a.out 
user address range 0x1000..0x7ffffffff000

Now recompile as a 32 bit binary:

root@monax-vm:/tmp # cc -g hang.c -target i386-freebsd
root@monax-vm:/tmp # file a.out
a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically
linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 14.0 (1400091),
FreeBSD-style, with debug_info, not stripped
root@monax-vm:/tmp # ./a.out
panic: releasing active pmap 0xfffffe00cdcdc170
cpuid = 4
time = 1688690396
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00b0d9b940
vpanic() at vpanic+0x150/frame 0xfffffe00b0d9b990
panic() at panic+0x43/frame 0xfffffe00b0d9b9f0
pmap_release() at pmap_release+0x2a5/frame 0xfffffe00b0d9ba20
vmspace_free() at vmspace_free+0x43/frame 0xfffffe00b0d9ba40
sysctl_kern_proc_vm_layout() at sysctl_kern_proc_vm_layout+0x35b/frame
0xfffffe00b0d9bbb0
sysctl_root_handler_locked() at sysctl_root_handler_locked+0x9c/frame
0xfffffe00b0d9bc00
sysctl_root() at sysctl_root+0x230/frame 0xfffffe00b0d9bc80
userland_sysctl() at userland_sysctl+0x184/frame 0xfffffe00b0d9bd30
freebsd32___sysctl() at freebsd32___sysctl+0xa6/frame 0xfffffe00b0d9bdf0
ia32_syscall() at ia32_syscall+0x157/frame 0xfffffe00b0d9bf30
int0x80_syscall_common() at int0x80_syscall_common+0x9c/frame 0xffffdc2c

-- 
You are receiving this mail because:
You are the assignee for the bug.