The closest feature seems to be "security.curtain", but it's dedicated
for users.
Information filtering
NetBSD provides administrators the ability to restrict information
passed from the kernel to userland so that users can only view
information they ``own''.
The hooks that manage this restriction are located in various parts
of the system and affect programs such as ps(1), fstat(1), and
netstat(1). Information filtering is enabled as follows:
# sysctl -w security.curtain=1
http://netbsd.gw.com/cgi-bin/man-cgi?security++NetBSD-current
Also chroot(8) is a security feature on NetBSD, compared to other OSs.
On NetBSD it's not escapable.
>> Wasn't the process running as "nobody"?
>
> I used sandbox=none by inertia (on linux it's now pretty robust).
> Should we switch to sandbox=setuid? We will lose lots of useful
> coverage too...
> Is there something like gradual drop of privileges? E.g. we could drop
> some privs that we know cause problems but keep the rest, in
> particular access to /dev/ nodes.
>
We don't support other drop of privileges other than changing UID and GID.
The most complete solution out of sources was Lua-based
secmodel_sandbox, but probably it's not good enough for these purposes.
https://www.bsdcan.org/2017/schedule/track/Security/835.en.html
I was intending to look at this security namespacing.. but it requires
thorough upfront research in order to model and implement it properly.
For now I recommend to ignore these reports. At some point of time we
will add the missing features.