Skip to content

Require the parent-death signal before launching PASTA - #398

Open
ProMartY wants to merge 1 commit into
google:masterfrom
ProMartY:pasta-parent-death-guard
Open

ProMartY wants to merge 1 commit into
google:masterfrom
ProMartY:pasta-parent-death-guard

Conversation

@ProMartY

Copy link
Copy Markdown

Summary

NsJail currently proceeds with PASTA startup if setting the helper's parent-death signal fails. This change reuses contain::setupParentDeathSignal() to arm SIGKILL and verify that the original supervisor is still the helper's parent before executing PASTA.

If the check fails, the helper reports the failure over the existing startup pipe. The supervisor also rejects truncated status messages and read errors, cleans up the helper, and aborts jail startup.

Linux validation

  • The upstream Dockerfile built successfully on Debian Bookworm, x86-64, under WSL2.
  • All seven command-line checks, four NSTUN tests, and the recursive read-only mount test passed.
  • A test helper confirmed PR_GET_PDEATHSIG == SIGKILL and was reaped after the workload exited. A missing helper executable, an injected guard failure, a truncated status message, and a status pipe read error each prevented the workload from starting.
  • A local HTTP request succeeded through both the system-installed PASTA and the copy built into NsJail with EMBED_PASTA=1.

The full make test stopped at the supplementary-group setpriv test. It returned 0 instead of the expected 255 on both the patched and unmodified builds.

AI assistance

OpenAI Codex helped implement the patch, ran the Linux validation, and drafted this description.

@google-cla

google-cla Bot commented Nov 21, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@ProMartY

Copy link
Copy Markdown
Author

I signed the Google Individual CLA and confirmed that my GitHub username is saved, but the self-service rescan returns HTTP 400. Could a maintainer please recheck the CLA and approve the pending Docker workflow? Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant