After `systemctl restart kiri`, `packaging/linux/test-host.sh` only waited for `-S /run/kiri/docker.sock`. The daemon binds the socket before writing its POSIX access list and booting the engine, leaving a 2 ms race where the unprivileged `setpriv` check ran before socket access was granted and the daemon started accepting requests.
Add a bounded `wait_engine` helper polling `/run/kiri/docker.sock` until `/_ping` returns `OK` (up to 30 s) and use it after both `kiri host-access` and `systemctl restart kiri`.
* Linux: enforce SELinux container_t + MCS confinement, :z/:Z relabelling, and --security-opt label=...
On Linux hosts with SELinux active (`/sys/fs/selinux` `SELINUX_MAGIC`) and `container-selinux` installed (`/etc/selinux/<type>/contexts/lxc_contexts`), confine containers and `docker exec` processes under `container_t` with a unique reference-counted MCS category pair (`s0:cX,cY`), label container overlayfs roots, `/dev`, `/dev/pts`, `/dev/shm`, masked `tmpfs` directories, and `--tmpfs` mounts via `context="<mount_label>"`, label `/etc/{hosts,resolv.conf,hostname}`, shared `IpcMode::Shareable` shm, and local volumes with `container_file_t:s0`, and transition threads via `/proc/thread-self/attr/selinux/exec` (`current` for `--init` PID 1) after verifying `PROC_SUPER_MAGIC`.
Support `--security-opt label=disable|user:...|role:...|type:...|level:...|filetype:...` (`label=` and `label:`) with strict character validation preventing `context="..."` mount-option injection, persist `process_label` and `mount_label` on `Spec` for `GET /containers/{id}/json` (`ProcessLabel`, `MountLabel`) and restarts, expose `name=selinux` in `GET /info` `SecurityOptions`, support `:z` and `:Z` bind-mount relabelling via an iterative non-symlink-following `relabel_tree` with top-level system path guards while rejecting `:z,Z`, degrade cleanly when SELinux or `container-selinux` is absent, and add `Recommends: container-selinux` to `packaging/linux/rpm/kiri.spec`.
* Linux: gate SELinux relabel path guards on active confinement
Match Docker 29 and opencontainers/selinux semantics so :z and :Z remain a non-breaking no-op on non-SELinux hosts (macOS, Windows/WSL 2, Ubuntu, Debian) and when MountLabel is empty (--privileged or --security-opt label=disable), while enforcing excludePaths (including /etc/passwd, /etc/pki, /etc/shadow, /media, /srv, /var/log) and bottom-up directory relabelling whenever SELinux confinement is active.
Move GTK 3 and WebKitGTK 4.1 from hard Requires/Depends to Recommends in the full Linux .rpm and .deb packages while keeping the libc6 glibc floor check on the .deb. Desktop dnf (Fedora, openSUSE) and apt installs still pull the window libraries automatically, while RHEL, Rocky Linux and AlmaLinux (where webkit2gtk4.1 lives in EPEL) and headless servers (--no-install-recommends or install_weak_deps=False) install the static engine and bundled Docker CLI cleanly.
Before execing /usr/lib/kiri/kiri-window on Linux, kiri ui now probes dynamic library resolution via LD_TRACE_LOADED_OBJECTS=1 and reports an actionable package install message instead of a raw ld.so failure when GTK 3 or WebKitGTK 4.1 is missing.
Fixes#260
- Recognise cross-volume Copy-Item CLI plugin copies via byte-size and SHA-256 content equality when no file-ID hardlink or .kiri-cli-plugins.json stamp matches, stamp managed plugins from setup-tools.ps1 and kiri.ps1, re-heal ~/.docker/cli-plugins live in kiri-win when Docker Desktop is installed or uninstalled, and include /opt/homebrew/lib/docker/cli-plugins and NixOS plugin paths in setup.rs SYSTEM_PLUGIN_DIRS (#1150, #1054 follow-up).
- Guard macOS set_start_at_login when brew services is active so Kiri never falls through to writing a duplicate dev.kiri.daemon.plist when homebrew.mxcl.kiri.plist is absent or lacks RunAtLoad (#1134 follow-up).
- Persist /etc/kiri/no-docker-sock when WSL socket integration is disabled on a user engine distro and honour it in kiri.service ExecStartPost and daemon::maybe_link_docker_sock across restarts (#1131 follow-up).
- Pass kDNSServiceFlagsReturnIntermediates to DNSServiceGetAddrInfo, skip unusable IPv6 lookups on IPv4-only Macs, and distinguish clean NoSuchRecord results from lookup failures so DoH/DoT Supplemental domains with no UDP servers return NXDOMAIN (or NODATA when the sibling address family exists) instead of SERVFAIL (#1145 follow-up).
The Linux package build now fetches the pinned kiri-forge for each architecture, checks it against the SHA-256 in cli_pins.rs and bundles it, as the Mac and Windows builds do; before, /usr/bin/kiri-forge in the packages was a link to kiri. A release build stops if the binary is missing.
The bundled Kiri Forge is 0.1.1. docs/releases/0.3.0.md holds the notes for 0.3.0 and docs/releases/0.3.0.announce.json its announcement.
* security: harden mount/volume confinement, WSL roots, caller gates, labels & domain routing
* net: isolate --internal bridges/DNS, support gateway_mode_ipv4 & host_binding_ipv4
- GHSA-gp5c-4g58-vr24 & #1010: enforce nftables isolation for --internal
bridges across prerouting (early accept before HOST_ADDR/WSL_HOST_ADDR/
EGRESS_ROUTES redirects), forward (iifname/oifname cross-bridge drops in
both ip and ip6 tables even when non-internal subnets are empty), input
(allow only bridge gw4 or NDP+gw6 on plain internal bridges; drop all
on gateway_mode_ipv4=isolated / inhibit_ipv4=true), and postrouting
(never masquerade internal subnets; disable IPv6 on IPv4-only internal
bridges).
- GHSA-7x2g-c7pw-mpc6: refuse external UDP and TCP DNS forwarding on
internal-only containers before custom --dns and AAAA handling, track
all container bridges including kiri0 across spawn/NetAttach/NetDetach
with vacuous internal_only when disconnected from all networks, and
bind per-bridge UDP and TCP gateway DNS listeners with SO_BINDTODEVICE
when bridge != kiri0.
- GHSA-vmx6-3c4p-cjr2 (#985): honor com.docker.network.bridge.host_binding_ipv4
for TCP and UDP published ports with empty HostIp while keeping empty
value as unset, validating Ipv4Addr at network create and use, and
preserving #1011 names_sync lock ordering around container start gate.
- #1000: honor com.docker.network.bridge.enable_icc=false via IFLA_BRPORT_ISOLATED.
- #1008: support KIRI_HOST_LOOPBACK=off to block host loopback via host.docker.internal.
- #992: refuse 'default' network name and network/broadcast IPAM gateway or
auxiliary addresses for prefix < 31 without /31 or /32 shift overflow.
* Verify image rootfs.diff_ids, pin managed BuildKit, and bound rmtree FDs
* security: fix AppArmor profile, WebView URL/CSP/i18n, k3s kubeconfig/pinning, elevation TOCTOU & MSI verification, and diag redaction
- GHSA-xx5v-42pc-2x72: enforce Linux AppArmor kiri-default profile with
PROC_SUPER_MAGIC verification on /proc/thread-self/attr/apparmor/{exec,current}
and Host::Absent no-op on SELinux/VM/WSL2 hosts.
- GHSA-hmxq-c9pq-2fm2: add strict weburl allowlist (preserving all 13 exact
URLs and non-empty docs.docker.com/go/ subpath check), localUrl plainHost
validation (preserving rports running/serving guard), strict WebView CSP and
navigation blocking on macOS/Linux/Windows, typed numeric coercions in
hubrows/sharing, and strict i18n tag+attribute parity enforcement.
- GHSA-9mjv-25f8-p9p9: replace raw k3s kubeconfig line pass-through with a
strict line-by-line allowlist parser rejecting exec/auth-provider/file-path
credentials and YAML anchors/flow collections, and pin default
rancher/k3s:v1.37.1-k3s1 multi-arch index and per-arch config digests.
- GHSA-vc32-9whf-m39j / GHSA-wjfx-gjxf-6h52 / GHSA-hx2c-xfr4-jqm2: fix
AppleScript backslash-before-quote escaping in setup::as_admin, eliminate
all TMPDIR staging before root elevation in setup.rs and usb/helper.rs
(verifying SHA-256 on {bin}.new as root before codesign and atomic mv), and
enforce private staging + SHA-256 + WinVerifyTrust Authenticode / optional
Ed25519 signature verification in kiri-win/update.rs and kiri.ps1.
- #994: redact truncated secret JSON string values at end-of-input in
kiri diag.
* Keep rmtree deep-readonly test setup at O(1) open FDs and parse URL host in domain-label test
* Linux packages install beside Docker's own Compose and buildx
The full kiri .deb/.rpm put docker-compose and docker-buildx straight into
/usr/lib/docker/cli-plugins, which docker-desktop, docker-compose-plugin and
docker-buildx-plugin own, so dpkg refused the install ("trying to overwrite
'/usr/lib/docker/cli-plugins/docker-buildx', which is also in package
docker-desktop").
The plugins now live in /usr/libexec/kiri/cli-plugins and are linked into
/usr/lib/docker/cli-plugins through update-alternatives only where the slot
is free, as /usr/bin/docker already was; otherwise Docker's plugins stay and
Kiri's docker uses them. The rpm does it in %posttrans, since an upgrade
erases the old package's real files there only after %post.
* Leave Docker's plugins in /usr/libexec alone, and re-check when they change
Docker's apt/dnf packages (docker-compose-plugin, docker-buildx-plugin) put
their plugins in /usr/libexec/docker/cli-plugins. The CLI searches
/usr/lib/docker/cli-plugins first, so a Kiri link there replaced Docker's
Compose and buildx. A plugin's slot now counts as taken when Docker's copy is
in any of the CLI's plugin folders (/usr/lib, /usr/libexec, /usr/local/lib,
/usr/local/libexec), and Kiri's link is removed if Docker's copy turns up.
A dpkg trigger (interest-noawait on those folders) and rpm
%filetriggerin/%filetriggerpostun run the check again when another package
adds or removes plugins there, so Docker's packages installed or removed
after Kiri are handled too.