Skip to content

hisn 0.2.2

Choose a tag to compare

@github-actions github-actions released this 02 Nov 22:04
· 209 commits to main since this release
1197119

Fixed

  • User name inside the sandbox. 0.2.1 took the name for /etc/passwd and
    /etc/group from $USER, which a scrubbed launch environment (Wakil,
    env -i) does not have, so id -un and echo $USER showed user. The name
    now comes from getpwuid_r(geteuid()) (fallback user only if the lookup
    fails or the name is unusable; hisn run -v logs why).

Changed

  • USER and LOGNAME are set in the sandbox environment, computed from that
    name, like HOME: never copied from the host environment, and env.pass,
    env.set and exec requests cannot override them (an exec request naming
    them is refused as a computed name). POLICY-SPEC and DESIGN §8 updated.
    A 0.2.1 policy yields the same mount plan. Differences: the two new
    variables; the content of the generated /etc/passwd / /etc/group (host
    login name instead of the placeholder user under a scrubbed launch
    environment); a policy that set USER/LOGNAME now loses to the computed
    value. Session start now queries the host user database once
    (getpwuid_r), which can be slow with an unreachable network backend.

Tests

  • Leak test L1c (id -un, $USER, $LOGNAME, getent passwd show the host
    user, also for a session started under env -i); unit tests for the lookup
    and fallback, stub generation and the computed names.

The leak suite (L1-L24) passed on Ubuntu 22.04 and 24.04 x86_64 CI runners for this exact commit before these binaries were built; the aarch64 binary is built and started () but has not been leak-tested. Binaries are dynamically linked against glibc and built natively on Ubuntu 22.04 (glibc 2.35 or newer required). Verify with sha256sum -c SHA256SUMS. See README, "Verifying a build".