Skip to content

WSL2 walls: PrivateDevices, one kit for walls and launcher, more property forms (#197 follow-up) #210

Closed

Description

@scuttletoby

Follow-ups from the re-check reviews of #197 (WSL2 walls). Both re-checks said SAFE; none of these blocks. Details and probes are in the review comments: security #197 (comment) and correctness #197 (comment).

  1. PrivateDevices= is not checked (minor, .github/scripts/fork-fleet-walls/wsl2, the sockets wall). On WSL2, PrivateDevices=yes keeps /dev/dxg (the world-writable paravirtual GPU channel to the Windows kernel) out of job units. A launcher that drops it or sets it to no passes every wall; only check-net's one-time device probe would notice. Fix: require the merged PrivateDevices= to be true (in the sockets wall or a new devices wall) and add the case to OPENS.
  2. Walls and launcher can be two different kits on a desktop (minor, fork-fleet-desk-agent.py). The desk agent runs WALLS check and LAUNCH start from two settings, and accepts a LAUNCH outside the WALLS kit. During an upgrade the walls can pass on a new kit while jobs start under an old launcher. Fix: drop the separate LAUNCH setting, or refuse one that is not realpath(dirname(WALLS))/fork-fleet-launch.sh.
  3. Unread property forms (nit). The walls read only -p NAME=VALUE words inside sandbox(). --property=..., -pNAME=..., or a -p added in start() after the sandbox properties are not seen. Fix: parse those forms too and read start()'s systemd-run line, or fail on any property word the parser cannot read.
  4. A direct bind in sandbox() is not seen (minor). The sockets wall sees only what paths prints and TemporaryFileSystem=. A line like -p BindReadOnlyPaths=/run/WSL:/run/WSL added straight into sandbox() would let jobs reach WSL's interop or WSLg sockets while every wall passes. It needs an edit to reviewed launcher code, so a job cannot cause it. Fix: fail on any Bind*Paths= in sandbox() that paths did not produce.
  5. Nits: the moved launcher cases no longer also run through the dispatcher; the sockets_wall docstring describes more than the code checks.

State question for any fix: what happens when this runs again, stops half-way, or meets existing, old or empty state?

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions