Repository navigation
Tags
Tags
1.1.78: sealed X servers, one shared X11 socket, Wayland security con… …text, jail display for services (#273) The three items 1.1.77 left open in TODO §7. X servers crate starts (Xvfb, Xephyr, Xorg) ran without access control (-ac, or no -auth). Each run now makes a MIT-MAGIC-COOKIE-1, starts the server with -auth and gives the cookie to the jail (/var/run/crate-Xauthority, XAUTHORITY), x11vnc, the embedded VNC server and `crate gui screenshot`. The shared X11 mode mounted the host's whole /tmp/.X11-unix read-write; it mounts a private directory with a hard link to the socket of the display DISPLAY names, read-only. websockify had no listen address (every interface); it listens on gui/vnc_bind, which is now accepted in every mode with a VNC server. gui: auto / gui.mode: wayland bound the host compositor's own socket, privileged protocols included. crate asks the compositor for a security context (wp_security_context_v1, hand-written wire client, no libwayland) and mounts that restricted socket. New key gui/wayland_security_context: auto | require | off; `crate doctor` and `crate audit` know about it. Services, hooks and the healthcheck get the jail's DISPLAY, XAUTHORITY, WAYLAND_DISPLAY and XDG_RUNTIME_DIR on both exec paths; exec_in_jail gains the optional fields lang, display, xauthority, wayland_display, xdg_runtime_dir, each validated by the daemon. Jail env values are quoted on the sh -c line. Checked on Linux stand-ins (Xvfb, websockify, sway 1.9); not yet on FreeBSD — docs/on-hardware-validation.md §4t. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK
1.1.74: six HIGH findings of the 1.1.71 bug hunt (#269) privops FIFO/idle-client lockout, viewer-token stream DoS, firewall policy scoped to the jail, netgraph mode, snapshot restore keeping newer snapshots, gui nested/headless/gpu limited to their own X socket. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK
1.1.71: the bug hunt's MED findings (#265) - privops: a mount_nullfs source that contains the tenant root (/var/run, /var, /) is DenyForeignSource; it reached every tenant's rootfs. - ${VAR:-default} in specs and stack files (one scan, nested defaults, also without --var); webapp.yml and postgres.yml work. - The lite FreeBSD CI validates every examples/*.yml (and runs on example changes); four bridge-mode examples that declared NAT-only inbound ports are fixed. - .local policy: key paths in the '_' spelling, nested security/ipc/zfs keys, devices and duplicate keys are refused. - Profile cache keyed by sha256 of the merged spec, the --var values and the version instead of mtimes. - etc/keep replaces files the jail's /etc already has (lstat; a symlink is unlinked, never followed). - run/user under a root crate run: HOME/USER/LOGNAME/SHELL and the cwd from the jail's passwd; the X cookie moves into the run user's home. - profile-from-trace: O_DIRECTORY opens are shared as directories. - crate audit: nc -v for the gateway probe; bpf is a WARN only without vnet. - backup / export write new 0600 files with O_EXCL|O_NOFOLLOW; pipeline outputs are opened by the parent and never through a symlink. - crated's start / restart (control socket and HTTP) replay warm-base registry entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK
1.1.70: the bug hunt's HIGH findings and three more regressions (#263) Folded into 1.1.70 (not tagged yet), on top of #262: - Host descriptors no longer reach jails: SOCK_CLOEXEC on the cached IfconfigOps socket; closefrom(3) in the children of the Util exec helpers, JailExec and the ws-console shell; the crated-spawned supervisor keeps only stdio and its status pipe. - devfs: a per-user caller may fill only a private ruleset (10000..59999) that no live jail of another caller uses; crated records every apply_devfs_rules; add_devfs_unhide_rule is refused to tenants; crate run steps to the next number on a refusal. - backup-prune applies retention per jail; 128-char jail names parse. - HTTP export: tar --one-file-system, paths from pathnames.h. - JailQuery::findContainer: targets by kernel name, jid or container name (RunPure::containerNameOf / containerNameOfJail); restart in the CLI, the control socket and HTTP decides what to start before it stops; start no longer spawns a second instance. - A tmpfs over /tmp is mounted before the X11 setup (firefox/chromium). - crate -p stack up: --log-progress before `run` (StatusPure::crateRunArgv). - One terminal event per --status-fd stream; jail_created carries the kernel's jail name. Docs: crate.5, trust-model en/uk, README en/uk, runbook §4m, CHANGELOG, TODO (what this left open). make test-unit -Werror: 1602/1602. Claude-Session: https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK Co-authored-by: Claude <noreply@anthropic.com>
TODO §7 MED: backup chains, prune, update --pkg-only, warm restart, c… …lean lock, top (1.1.69) (#260) - replicate gets its own repl-<ts> snapshot family and bases an --auto-incremental send on the newest snapshot present on BOTH sides (remote listed over the same ssh hop); base lookup is `-d 1` and pinned to <dataset>@<prefix>; a failed replicate / template warm / run-time clone destroys its snapshot. - backup-prune keeps an incremental whose base is a kept incremental (transitive chain), not only a kept full. - pkg/keep-pkg (default true): create keeps pkg(8), /var/db/pkg and the /usr/sbin/pkg stub so `crate update --pkg-only` can work; update explains a missing pkg/database instead of ENOENT. - spec registry "<name> warm-base=<dataset>" entries; `crate restart` replays --warm-base/--name. - DirLock: run/create flock their jail/chroot directory; clean skips a held one and sweeps dead chroot-create-* directories. - top: WRITE/s column (writebps is a rate), CPU% from RCTL pcpu, 5 s baseline 8000 for the cputime fallback. - crate.5, README en/uk, runbook §4l, CHANGELOG, TODO, VERSION 1.1.69. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK
TODO §17.9–17.10: releases 1.1.66–1.1.67 (crate wrap, privacy/hostid) (… …#258) 1.1.66 — crate wrap install|remove|list: launchers in ~/.local/bin and .desktop entries that start a program in its container (TODO §17.9). 1.1.67 — privacy/hostid (host|random|<uuid>) and privacy/hostname (host|random|<name>): the jail is created with host.hostuuid/host.hostid and its /etc/hostid; privops whitelist gained both keys (TODO §17.10). Closes TODO §17: all ten items DONE. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK
1.1.65: `crate run --status-fd`, `run/timeout`, stack up/crated over … …the status pipe (#257) TODO §17.8 (bwrap --json-status-fd, firejail --timeout). - `crate run --status-fd N`: one JSON object per line on an inherited descriptor (>= 3), one per phase: started, jail_created (jid, name, path), net_ready (mode, ip), mounts_ready, services_started, healthy/unhealthy, exec_started, exited (code, reason, timed_out), teardown_done; failed + teardown_done when the run throws. The fd is CLOEXEC; SIGPIPE is blocked around the write so a vanished reader never takes the jail down. - `run/timeout`: 90 / 90s / 15m / 2h -> timeout(1) -k 10 in front of the command or /run.sh; exit 124 is reported as timed out. validate warns on service-only crates and a start_period >= the limit. - `crate stack up` and crated's start/restart spawn `crate run` over a pipe on fd 3 (StatusFd::spawnCrateRun) and read until jail_created instead of polling jls(8); a failing member reports the reason. registerSpawnedJailOwner records jid/name/path from the event; the jls poll stays as the fallback when no pipe could be made. - New lib/status_pure (format, reader, LineBuffer, parseStatusFd), lib/status_fd (Writer, spawnCrateRun, waitForJail); RunPure::parseRunTimeout/runTimeoutPrefix/runTimedOut. - Tests: status_pure_test (6 cases), validate_pure_test run_timeout_warnings, spec_validate_test run_timeout_validation. - Docs: crate.5 (run/timeout, Lifecycle stream, example), run -h, README en/uk, completions, runbook §4h, CHANGELOG, TODO. Claude-Session: https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK Co-authored-by: Claude <noreply@anthropic.com>
1.1.60: `crate profile-from-trace` — a spec draft from one traced run (… …#252) Runs a command once on the host under truss -f (or reads a saved trace) and turns the trace into a minimal spec draft: pkg/install from the executed programs (owners via pkg which), dirs/files shares under $HOME, x11/dbus/gl/video/ssl-certs from sockets and devices, options/net by address class, inbound-tcp/udp from bind+listen. New lib/trace_pure (yaml-free parser + generator, unit-tested on Linux) and lib/trace (truss and pkg which runners), CmdProfileFromTrace in the CLI, audit target, completions, crate.5, READMEs, runbook §4c. lib/trace.o now depends on the generated lib/version.h. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK
TODO §1: releases 1.1.56–1.1.57 (#248) 1.1.56: exec_in_jail resolves the user in the parent from the jail's master.passwd/group (O_RESOLVE_BENEATH, PasswdPure), applies the jail's login.conf limits via setusercontext; per-user PfLock; inter-dns / stack up|down refuse up front as non-root; iface_owner_registry_pure_test and mac_pure_test registered in the Kyuafile (never run before), make check-kyuafile. 1.1.57: NAT mode under rootless — acquire_fw_lease / release_fw_lease (jid-gated): crated keeps one firewall lease per jid (ipfw slot, fwd4/fwd6 refcount), flips net.inet(6).ip(6).forwarding on the first user and restores after the last (release, destroy_jail, startup reconcile); rootless bridge mode on forwarding=0 hosts fixed; set_iface_inet_addr inet6; ensureKernelModuleIsLoaded checks kldfind first; crated links -lutil. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK
TODO §4–§16: releases 1.1.45–1.1.55 (#247) 1.1.45 stack exact matching, stack down, policy slots; 1.1.46 spec/config/registries (stable .lock files, stricter parse); 1.1.47 doctor paths/racct/firewall; 1.1.48 lifecycle/storage/GUI/DNS (export --one-file-system, VNC loopback, zfs handle fix); 1.1.49 crate-hub (envelope, fork order, TLS, loopback bind); 1.1.50 crate-snmpd (reconnect, session id, decoder bounds); 1.1.51 run teardown order, RunAtEnd at acquisition, stack up spawn, cron per user, wire escaper; 1.1.52 crate-hub build/install/ship, VERSION single source, CI/port fixes; 1.1.53 crate.5/crate-snmpd.8/crated.8/README/trust-model docs; 1.1.54 test gaps + ASan-caught test over-read; 1.1.55 crated.sock bind→chmod race closed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6t6tzVypHye5bDGLxzmZK
PreviousNext