-
Notifications
You must be signed in to change notification settings - Fork 268
process hardening causes obscure errors #2368
Description
arti recently started enabling some process hardening via the secmem-proc crate. One of the things that does is to call prctl with PR_SET_DUMPABLE to disable core dumps and memory inspection from other processes. In Shadow, we allow unhandled prctl operations to execute natively, including this one. This causes shadow's memory accesses via process_vm_readv to start failing with EPERM.
For arti in particular, this can be worked around by disabling the harden feature at compile time, or setting the configuration flag application.permit_debugging = true.
It probably makes sense to emulate this particular operation - return success without making the native prctl call.
More generally it might be worth validating that hardening via the secmem-proc crate either doesn't break shadow, or fails in a more-debuggable way.