Description
The isolate invocation includes --dir=/etc/alternatives=/etc/alternatives without the :ro suffix. Isolate’s --dir option supports dest=src:ro to mount directories read‑only, but the current configuration mounts /etc/alternatives as writable from inside the sandbox.
This unnecessarily exposes system alternative configuration to potential modification from sandboxed processes if they manage to bypass other protections.
Impact
- Sandbox processes may be able to write to
/etc/alternatives inside the container/host namespace, depending on user and isolation settings.
- Could allow tampering with alternative symlinks or binaries, increasing the blast radius of a sandbox escape.
Expected Behavior
/etc/alternatives should be mounted read‑only using :ro so sandboxed processes cannot make changes.
Actual Behavior
/etc/alternatives is mounted without :ro, allowing potential writes from within the sandbox.
Possible Solution
- Update the isolate command in
core/sandbox.ts to:
--dir=/etc/alternatives=/etc/alternatives:ro
- Re‑run tests to ensure no language runtime relies on write access to
/etc/alternatives.
Description
The isolate invocation includes
--dir=/etc/alternatives=/etc/alternativeswithout the:rosuffix. Isolate’s--diroption supportsdest=src:roto mount directories read‑only, but the current configuration mounts/etc/alternativesas writable from inside the sandbox.This unnecessarily exposes system alternative configuration to potential modification from sandboxed processes if they manage to bypass other protections.
Impact
/etc/alternativesinside the container/host namespace, depending on user and isolation settings.Expected Behavior
/etc/alternativesshould be mounted read‑only using:roso sandboxed processes cannot make changes.Actual Behavior
/etc/alternativesis mounted without:ro, allowing potential writes from within the sandbox.Possible Solution
core/sandbox.tsto:--dir=/etc/alternatives=/etc/alternatives:ro/etc/alternatives.