Skip to content

process hardening causes obscure errors #2368

@sporksmith

Description

@sporksmith

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.

Metadata

Metadata

Assignees

Labels

Type: BugError or flaw producing unexpected results

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions