Skip to content

Block writes to /proc/self/exe and /proc/self/map_files #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,22 @@ tells userspace that there was an fd, but it was not allowed through.

**Use-Case:** Any code that wants to use `SCM_RIGHTS` properly.

### Block reopening R/O file descriptor for /proc/self/exe and /proc/self/map_files/*

Provide a security primitive that prevents processes from reopening a
read-only file descriptor to `/proc/self/exe` and files under
`/proc/self/map_files`. This directly addresses the attack vector used
in CVE-2019-5736.

A common workaround used by container runtimes to prevent an untrusted
container process from overwriting the host's runtime executable is to
"re-exec" themselves from a read-only copy of the binary.

While this looks like a kernel issue, the assumption is still that any
container runtime must ensure its binary cannot be overwritten.

**Use-Case:** Any container runtime that executes an untrusted executable.

---

## Finished Items
Expand Down