diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index b4b832ccd..29e3a7905 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -1,11 +1,19 @@ name: Fuzz # Coverage-guided fuzzing of the two parsers of zone bytes (docs/design/broker.md), weekly on a pinned nightly. +# A pull request that touches their code builds both targets without fuzzing them, so a new request +# variant the harness does not match fails there, not on the next weekly run. on: schedule: - cron: '0 4 * * 0' workflow_dispatch: + pull_request: + paths: + - 'compartments/kryptikd/src/**' + - 'compartments/kryptikd/fuzz/**' + - 'compositor/wlproxy/**' + - '.github/workflows/fuzz.yml' permissions: contents: read @@ -59,8 +67,14 @@ jobs: fi echo "$(find "$RUNNER_TEMP/corpus" -type f | wc -l) seeds" + - name: The target builds + if: github.event_name == 'pull_request' + working-directory: ${{ matrix.dir }} + run: cargo fuzz build --sanitizer none "$FUZZ_TARGET" + # Safe Rust throughout, so no sanitizer: panics, overflow checks and the harness's asserts are the oracle. - name: Twenty minutes of fuzzing + if: github.event_name != 'pull_request' working-directory: ${{ matrix.dir }} run: cargo fuzz run --sanitizer none "$FUZZ_TARGET" "$RUNNER_TEMP/corpus" -- -max_total_time=1200 -max_len="$MAX_LEN" -timeout=10 -print_final_stats=1 diff --git a/README.md b/README.md index 234b88b20..d47a9f289 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,9 @@ From the Releases page take the medium, its signed checksums and the anchor: `kryptik-VERSION-usb.img.zst` (or `kryptik-VERSION.iso.zst`), `kryptik-VERSION.SHA256SUMS` with its `.sig`, and `release-signers`. Check the download, then write it to a USB stick. The stick is overwritten whole: -be sure of the disk you name. +be sure of the disk you name. Between releases, a tested build of main is a +Distro run's `kryptik-release` artifact +([releases](docs/releases.md#a-build-of-main)). **Linux** diff --git a/build/config/kernel/boot.fragment b/build/config/kernel/boot.fragment index 9a2e3afd3..fae33f99a 100644 --- a/build/config/kernel/boot.fragment +++ b/build/config/kernel/boot.fragment @@ -230,6 +230,13 @@ CONFIG_AMD_PMC=m # (root, /sys/power), amd_pmc's SMU idle mask and the LPS0 constraints reach the # kernel log, and pm_wakeup_irq names what woke it. Root-only switches, off until set. CONFIG_PM_DEBUG=y +# The processor's clock: amd-pstate in active mode, where the power service sets the energy +# preference, and schedutil for a machine whose processor falls back to acpi-cpufreq, where +# defconfig's userspace governor would hold the clock wherever the firmware left it. +CONFIG_X86_AMD_PSTATE=y +CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3 +CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_INTEL_VSEC=m CONFIG_INTEL_PMT_TELEMETRY=m CONFIG_INTEL_PMC_CORE=m diff --git a/build/config/kernel/hardening.fragment b/build/config/kernel/hardening.fragment index 74c50bba1..e03eef676 100644 --- a/build/config/kernel/hardening.fragment +++ b/build/config/kernel/hardening.fragment @@ -195,7 +195,8 @@ CONFIG_IOMMU_DEFAULT_DMA_STRICT=y CONFIG_INTEL_IOMMU_DEFAULT_ON=y CONFIG_INTEL_IOMMU_SVM=y CONFIG_AMD_IOMMU=y -# The TPM, as an entropy source. +# The TPM, as an entropy source where it gives one: on AMD, 6.18 turns a firmware +# TPM's off (AMD's PA-410), so there only a TPM chip of its own or Pluton feeds it. CONFIG_TCG_TPM=y CONFIG_TCG_TIS=y CONFIG_TCG_CRB=y diff --git a/build/config/modprobe.d/sound.conf b/build/config/modprobe.d/sound.conf index 700205143..e8091dd7e 100644 --- a/build/config/modprobe.d/sound.conf +++ b/build/config/modprobe.d/sound.conf @@ -1,8 +1,10 @@ # The HD Audio codec drivers, loaded ahead of the controller: the kernel cannot # load them itself (STATIC_USERMODEHELPER), and a codec binds only to a driver # loaded when snd-hda-intel probes it. Stage 05 holds this list to the codec -# drivers build/config/kernel/boot.fragment builds, both ways. -softdep snd-hda-intel pre: snd-hda-codec-generic \ +# drivers build/config/kernel/boot.fragment builds, both ways. snd-ctl-led too, +# which a codec's parser would load by request_module: a laptop's mute and +# microphone-mute lights follow the mixer only through it. +softdep snd-hda-intel pre: snd-ctl-led snd-hda-codec-generic \ snd-hda-codec-alc269 snd-hda-codec-alc662 snd-hda-codec-alc882 \ snd-hda-codec-conexant snd-hda-codec-senarytech snd-hda-codec-idt \ snd-hda-codec-cs420x snd-hda-codec-cs421x snd-hda-codec-cs8409 \ diff --git a/build/config/versions.env b/build/config/versions.env index a12e16032..30407b345 100644 --- a/build/config/versions.env +++ b/build/config/versions.env @@ -38,7 +38,7 @@ V_XZ=5.8.4 V_ZLIB=1.3.1 V_FILE=5.45 V_MAKE=4.4.1 -V_PATCH=2.8 +V_PATCH=2.8.1 V_M4=1.4.19 V_NCURSES=6.6 V_READLINE=8.3 @@ -99,7 +99,7 @@ V_S6_RC=0.7.0.0 V_S6_LINUX_INIT=1.2.0.2 # --- language runtimes needed at build time --- -V_PYTHON=3.12.15 +V_PYTHON=3.12.16 V_PERL=5.40.5 # --- encrypted zone volumes: cryptsetup and what it needs --- @@ -128,7 +128,7 @@ V_WPA_SUPPLICANT=2.12 V_IW=6.17 # Mozilla's CA bundle as curl.se publishes it: how the net zone checks a # release server. -V_CA_BUNDLE=2026-08-13 +V_CA_BUNDLE=2026-10-20 # --- the desktop --- # dwl on wlroots (pixman renderer, no GPU stack), havoc, lynx and nano. diff --git a/build/guest-tests/sound-check.sh b/build/guest-tests/sound-check.sh index 08fc61e97..4d89780fc 100755 --- a/build/guest-tests/sound-check.sh +++ b/build/guest-tests/sound-check.sh @@ -312,6 +312,27 @@ else fail "volume-steps" "${stepped}; ${top}" fi +# The card's switches follow the master's mute and the microphone's grant, as a laptop's mute +# lights do through them: outputs off while muted, inputs off while no zone holds the microphone. +sw() { "$PROBE" switches 0 2>&1; } +outs='^(Master|PCM|Speaker|Headphone|Headset|Front|Line Out) playback' +ins='^(Capture|Mic|Headset) capture' +ctl revoke > /dev/null; ctl mute on > /dev/null; muted="$(sw)" +ctl mute off > /dev/null; unmuted="$(sw)" +ctl grant untrusted > /dev/null; given="$(sw)" +ctl revoke > /dev/null; taken="$(sw)" +follows() { # follows PATTERN OFF ON: every switch PATTERN names is off in OFF and on in ON + grep -qE "$1 off$" <<<"$2" && ! grep -qE "$1 on$" <<<"$2" && grep -qE "$1 on$" <<<"$3" && ! grep -qE "$1 off$" <<<"$3" +} +# Every card has an output switch the generic parser names Master or PCM; QEMU's codec may have +# no input one, and then only the outputs are checked. +if follows "$outs" "$muted" "$unmuted" && { ! grep -qE "$ins" <<<"$given" || follows "$ins" "$taken" "$given"; }; then + in_said="$(grep -E "$ins" <<<"$given" | paste -sd, -)" + pass "switches-follow" "muted: $(grep -E "$outs" <<<"$muted" | paste -sd, -); granted: ${in_said:-no input switch on this card}" +else + fail "switches-follow" "muted: $(paste -sd, - <<<"$muted"); unmuted: $(paste -sd, - <<<"$unmuted"); granted: $(paste -sd, - <<<"$given"); taken back: $(paste -sd, - <<<"$taken")" +fi + # The levels outlast the mixer, never the microphone's grant. A restart starts from the last # mixer's record in /run; a boot, with /run empty, from what the finish script kept on the state # partition. Removing the record stands in for the boot here. diff --git a/build/images/sources.lock b/build/images/sources.lock index c7b30d009..69378a833 100644 --- a/build/images/sources.lock +++ b/build/images/sources.lock @@ -3,7 +3,7 @@ cca6b6a86e4389d89b370288761ce2385ddeceb10c4412da78689bc30c88af2d at-spi2-core-2 1c767308174337a74694da0f3ec069c271452163a1ef4540964c50c301f157d4 cairo-1.18.6.tar.xz ea1de9f9e23107d97ee2b41a72c552f34064a593da503789218387aee59f3ba4 cargo-1.98.1-x86_64-unknown-linux-gnu.tar.xz 2ecb53484c9c167ba674026b656d8a27d7657a58e6066aa902bfb1a4aa00ae20 cbindgen-0.29.4.crate -28714a7d4f9b38c7aafbe38022de7775a3d9cb3c1ebf19a567c26eb761e3410b firefox-153.5.0esr.source.tar.xz +91cb675ddfc678255f57ecd7aad498501961577686d19c1947a82b14edea7f25 firefox-153.6.0esr.source.tar.xz 4f7b554a38cdf78c033f666c8871f3749e14a094f65a07f630c91ed0b43d35e3 fontconfig-2.18.3.tar.xz 93cd47eb719c325107f2d3cf087d06299e944c3b48a40b55537302304dea1dd5 freetype-2.15.0.tar.xz 6949dcde27d41cebad1fd741fcafc36d55a1020d2d872d4a6eb3914caabbada2 fribidi-1.0.17.tar.xz @@ -16,7 +16,7 @@ a7ced37f4102b745ac86d6a70a9da399cc139ff168ba6b8002b4d8d43c900c15 libepoxy-1.5.1 2b6e15b06aafb4c0b6e2348124808cbd9b291c647299eaaba2e3202f51ff2f3d libglvnd-v1.7.0.tar.gz d80dd2a38a37f803cb9b6ac7b14bd6e74ddc3b654780a8380bdf93523fdb4389 libpng-1.6.59.tar.xz 87336eba53b4acfe917424ab5d500d2b0054d9f5148d35c2273ccf2cfb712f0d nasm-3.02.tar.xz -cc2f601cee82d9a5a233302fe307abc600727035fd7d2c3a3571755989e95008 node-v24.22.0-linux-x64.tar.xz +48cc0e21e048790e54c0cf5749c2725005313d652651c40b7a21feb9697aaf75 node-v24.22.2-linux-x64.tar.xz 342385b6ca3b7c73455d7c80a13b7dbe4489e00bc3bd4c5bd6ed4dce421e374a pango-1.58.2.tar.xz 53c156e1ba416a20da8e65395daa132da0d80e76910424caca3fcdae7831d384 pcre2-10.49.tar.bz2 fa3ff450172a16c026944030230c5069947af93c728d9179971d44e5e0cfb561 rust-std-1.98.1-x86_64-unknown-linux-gnu.tar.xz diff --git a/build/images/versions.env b/build/images/versions.env index 39a15e67b..389b920a3 100644 --- a/build/images/versions.env +++ b/build/images/versions.env @@ -30,7 +30,7 @@ V_GTK3=3.24.52 # --- browser: Firefox ESR, over the toolkit and build-only layers no zone gets --- # The ESR after 140, which ends once the two stop overlapping. Mozilla's key is taken from the KEY file # beside this release (tools/key-provenance.tsv), so a bump changes both. -V_FIREFOX=153.5.0 +V_FIREFOX=153.6.0 # The compiler kryptikd is built with: build/config/rust.lock holds the same three tarballs. V_RUST=1.98.1 # LLVM's release build, for the libclang bindgen loads. @@ -38,4 +38,4 @@ V_LLVM=23.1.3 V_CBINDGEN=0.29.4 V_NASM=3.02 # Node.js's release build, which Firefox's build runs for its devtools: an LTS line. -V_NODE=24.22.0 +V_NODE=24.22.2 diff --git a/build/patches/firefox-153.5.0/0001-features-h-unwrapped-for-fortify.patch b/build/patches/firefox-153.6.0/0001-features-h-unwrapped-for-fortify.patch similarity index 100% rename from build/patches/firefox-153.5.0/0001-features-h-unwrapped-for-fortify.patch rename to build/patches/firefox-153.6.0/0001-features-h-unwrapped-for-fortify.patch diff --git a/build/patches/firefox-153.5.0/0002-ffvpx-gcc-incompatible-pointer-types.patch b/build/patches/firefox-153.6.0/0002-ffvpx-gcc-incompatible-pointer-types.patch similarity index 100% rename from build/patches/firefox-153.5.0/0002-ffvpx-gcc-incompatible-pointer-types.patch rename to build/patches/firefox-153.6.0/0002-ffvpx-gcc-incompatible-pointer-types.patch diff --git a/build/patches/firefox-153.5.0/0003-cstdint-includes.patch b/build/patches/firefox-153.6.0/0003-cstdint-includes.patch similarity index 100% rename from build/patches/firefox-153.5.0/0003-cstdint-includes.patch rename to build/patches/firefox-153.6.0/0003-cstdint-includes.patch diff --git a/build/patches/firefox-153.5.0/0004-remote-needs-dbus-or-x11.patch b/build/patches/firefox-153.6.0/0004-remote-needs-dbus-or-x11.patch similarity index 100% rename from build/patches/firefox-153.5.0/0004-remote-needs-dbus-or-x11.patch rename to build/patches/firefox-153.6.0/0004-remote-needs-dbus-or-x11.patch diff --git a/build/patches/firefox-153.5.0/README.md b/build/patches/firefox-153.6.0/README.md similarity index 97% rename from build/patches/firefox-153.5.0/README.md rename to build/patches/firefox-153.6.0/README.md index 84977a345..900d43611 100644 --- a/build/patches/firefox-153.5.0/README.md +++ b/build/patches/firefox-153.6.0/README.md @@ -1,4 +1,4 @@ -# Firefox 153.5.0 ESR: building with GCC 14 +# Firefox 153.6.0 ESR: building with GCC 14 Applied by `s_browser_firefox` in the browser image through `apply_repo_patches`; `SHA256SUMS` is verified before anything is applied. diff --git a/build/patches/firefox-153.5.0/SHA256SUMS b/build/patches/firefox-153.6.0/SHA256SUMS similarity index 100% rename from build/patches/firefox-153.5.0/SHA256SUMS rename to build/patches/firefox-153.6.0/SHA256SUMS diff --git a/build/service-scripts/ask.sh b/build/service-scripts/ask.sh index fb2eae233..6119a25f9 100755 --- a/build/service-scripts/ask.sh +++ b/build/service-scripts/ask.sh @@ -3,8 +3,10 @@ # POSIX sh, sourced by sysinit and firstboot. # consoles the console devices, one per line # tell LINE... each LINE on every console -# ask [-s] SECS Q Q on every console; the first line typed on any goes to stdout. -# -s keeps echo off; SECS 0 waits forever; fails if nothing comes in time. +# ask [-s] [-h HSECS HINT] SECS Q +# Q on every console; the first line typed on any goes to stdout. +# -s keeps echo off; -h tells HINT once when HSECS pass with no answer; +# SECS 0 waits forever; fails if nothing comes in time. ask_dir=/run/kryptik @@ -24,8 +26,14 @@ tell() { # One reader per console, first line wins; stty never discards input, so an early answer is kept. ask() { - _a_quiet='' - [ "$1" = -s ] && { _a_quiet=1; shift; } + _a_quiet='' _a_hsecs=0 _a_hint='' + while :; do + case "$1" in + -s) _a_quiet=1; shift ;; + -h) _a_hsecs=$2 _a_hint=$3; shift 3 ;; + *) break ;; + esac + done _a_secs=$1 _a_q=$2 _a_devs=$(consoles) rm -f "$ask_dir/ask" @@ -54,6 +62,15 @@ ask() { ) < /dev/null > /dev/null 2>&1 & _a_pids="$_a_pids $!" fi + # The hint is only told: the readers keep reading, and what was typed before it stays theirs. + if [ -n "$_a_hint" ] && [ "$_a_hsecs" -gt 0 ]; then + ( + trap 'kill "$!" 2>/dev/null; exit 0' TERM + sleep "$_a_hsecs" & wait "$!" + tell "" "$_a_hint" + ) < /dev/null > /dev/null 2>&1 & + _a_pids="$_a_pids $!" + fi _a_ans='' _a_from='' _a_ended=0 while [ "$_a_ended" -lt "$_a_n" ] && IFS= read -r _a_msg <&3; do case "$_a_msg" in diff --git a/build/service-scripts/sysinit.sh b/build/service-scripts/sysinit.sh index dc531c2e9..17a511084 100755 --- a/build/service-scripts/sysinit.sh +++ b/build/service-scripts/sysinit.sh @@ -5,6 +5,14 @@ echo running > /run/kryptik-sysinit trap 'echo finished > /run/kryptik-sysinit' EXIT +# A console= port the machine lacks, as a laptop's legacy ttyS0 (type 0: no UART answered), is +# still /dev/console, and every write to it fails. Dropped, it hands /dev/console to the screen's +# console, so whatever opens /dev/console later is seen. A port with a UART behind it is kept. +for t in "${KRYPTIK_SYSFS:-/sys}"/class/tty/ttyS*; do + [ "$(cat "$t/type" 2>/dev/null)" = 0 ] && [ "$(cat "$t/console" 2>/dev/null)" = Y ] || continue + echo N > "$t/console" 2>/dev/null || true +done + [ -r /etc/hostname ] && hostname "$(cat /etc/hostname)" || true # The only names the /etc upper layer may carry: accounts, identity, clock, zone 0's resolver. @@ -39,10 +47,12 @@ prune_etc_upper() { # prune_etc_upper UPPER QUARANTINE } . /usr/libexec/kryptik/ask.sh +# Told after a minute with nothing typed: a keyboard whose driver is a module types nothing here. +NO_KEY="sysinit: if no key reaches this prompt, a plain USB keyboard will: some keyboards' drivers load only after it." unlock_state() { # unlock_state DEVICE -> /dev/mapper/kryptik-state try=1 while [ "$try" -le 3 ] && [ ! -b /dev/mapper/kryptik-state ]; do - pass=$(ask -s 0 "sysinit: passphrase for the state partition (try $try of 3): ") || pass="" + pass=$(ask -s -h 60 "$NO_KEY" 0 "sysinit: passphrase for the state partition (try $try of 3): ") || pass="" # printf is a builtin: the passphrase never appears as an argument. printf '%s' "$pass" | cryptsetup open --type luks2 --key-file=- "$1" kryptik-state 2>/dev/null || true try=$((try + 1)) diff --git a/compartments/kryptikd/fuzz/broker_request.rs b/compartments/kryptikd/fuzz/broker_request.rs index 3012a5111..dfa6e5bfc 100644 --- a/compartments/kryptikd/fuzz/broker_request.rs +++ b/compartments/kryptikd/fuzz/broker_request.rs @@ -11,7 +11,7 @@ fuzz_target!(|data: &[u8]| { let Some(nl) = data.iter().position(|b| *b == b'\n') else { return }; let header = String::from_utf8_lossy(&data[..nl]); match parse_request(&header) { - Err(_) | Ok(Request::Version | Request::ClipboardGet | Request::UpdatePoll) => {} + Err(_) | Ok(Request::Version | Request::ClipboardGet | Request::UpdatePoll | Request::Stick) => {} Ok(Request::ClipboardSet { mime, len }) => assert!(MIME_TYPES.contains(&mime.as_str()) && len <= CLIPBOARD_MAX), Ok(Request::Transfer { dest, name }) => { assert!((1..=12).contains(&dest.len())); diff --git a/docs/audit-scope.md b/docs/audit-scope.md index ba879e25d..8d3ba83b6 100644 --- a/docs/audit-scope.md +++ b/docs/audit-scope.md @@ -146,7 +146,7 @@ Everything runs on GitHub's runners, so a fork is enough: medium. Its `acceptance-report` artifact holds `REPORT.md`, one row per item, `results.tsv`, and every item's log and serial transcript ([status](status.md#the-last-full-pass)). A run from no cache takes about - three hours. + six hours. - **Locally**, [building](building.md) lists the host packages and stages; `make test` and `make zone-tests` need no build, and `make acceptance` needs KVM and two built releases. diff --git a/docs/design/boot-and-updates.md b/docs/design/boot-and-updates.md index a45a5bb63..8ce6cda05 100644 --- a/docs/design/boot-and-updates.md +++ b/docs/design/boot-and-updates.md @@ -58,6 +58,10 @@ root=/dev/dm-0 ro rootwait console=tty0 console=ttyS0,115200 panic=10 loglevel=4 - `CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG` is on but not the mechanism; the kernel's signature authenticates the hash. - `tools/check-kernel-hardening.sh` checks the parameters after `loglevel`. +- `console=ttyS0` comes last so a VM's serial port is `/dev/console`, which + the suites read. On a machine with no UART behind ttyS0, as most laptops, + the kernel registers the console anyway and every write to it fails, so + `sysinit` drops it at once and `/dev/console` becomes the screen's. Stage 06 relinks stage 05's unbound kernel per variant (`media-usb`, `media-iso`, `slot-a`, `slot-b`; `06-kernel-bind.sh`), changing only diff --git a/docs/design/browser-and-graphics.md b/docs/design/browser-and-graphics.md index bb04e086f..ec9df6799 100644 --- a/docs/design/browser-and-graphics.md +++ b/docs/design/browser-and-graphics.md @@ -254,7 +254,7 @@ floors are given with each layer. `-fno-delete-null-pointer-checks`, under which GCC 14 cannot evaluate SpiderMonkey's compile-time checks (Mozilla's own builds go without it too), and carries the few changes a GCC - build needs (`build/patches/firefox-153.5.0`). + build needs (`build/patches/firefox-153.6.0`). - `--enable-default-toolkit=cairo-gtk3-wayland-only`, `--disable-dbus`, `--enable-release`, `--disable-tests`, `--disable-crashreporter`, `--disable-updater` (updates are the image's) and `--disable-eme`. diff --git a/docs/design/camera.md b/docs/design/camera.md index 9baa44f02..601e8bb70 100644 --- a/docs/design/camera.md +++ b/docs/design/camera.md @@ -21,7 +21,9 @@ to grant it, and the grant visible for as long as it lasts. device made for it. - **Not covered:** the MIPI cameras of many Intel laptops since 2022, behind the IPU6, which need a camera stack in userspace (libcamera and Intel's - image processing), and infrared face-login cameras. + image processing); those behind the image processor of AMD's Ryzen AI Max + (HP's ZBook Ultra G1a), whose driver came in Linux 7.2, after 6.18; and + infrared face-login cameras. ## Who reaches that code, and when @@ -115,9 +117,10 @@ itself waits for the tests on physical hardware. ## Not covered -- MIPI cameras behind the IPU6 (below), and infrared cameras. Of several - cameras, a grant gives the zone the lowest numbered node that is its - device's first (`index` 0), which a camera's metadata node is not +- MIPI cameras behind Intel's IPU6 and AMD's image processor (below), and + infrared cameras. Of several cameras, a grant gives the zone the lowest + numbered node that is its device's first (`index` 0), which a camera's + metadata node is not (`camera_in` in `camera.rs`). On a laptop whose infrared face-login camera is a USB device of its own, that node may be the infrared camera's, which gives a call no picture. Preferring a node that offers a colour format @@ -159,3 +162,13 @@ it; a USB camera works on those laptops. The firmware is the small part of the cost. Where the image processing runs and what a grant hands over are the questions, and they wait for a machine with such a camera to answer them on. + +AMD's Ryzen AI Max has an image processor of its own, the ISP4, behind the +MIPI camera of HP's ZBook Ultra G1a. Its firmware drives the sensor and +makes the picture, and its driver gives one capture node of NV12 or YUYV +frames, as a USB camera does, rather than a graph of raw ones, so it would +fit a grant of one node. That driver (`VIDEO_AMD_ISP4_CAPTURE`) came in +Linux 7.2, and Kryptik builds 6.18. It would also need amdgpu's half +(`DRM_AMD_ISP`, off), platform cameras in the media filter (off), the +processor's firmware (`amdgpu/isp_*`, which `firmware.list` leaves out), +and kryptikd's grant loading it beside `uvcvideo`. diff --git a/docs/design/laptop-audio.md b/docs/design/laptop-audio.md index 2ae8ed79b..7301049ad 100644 --- a/docs/design/laptop-audio.md +++ b/docs/design/laptop-audio.md @@ -31,11 +31,15 @@ platform's SOF driver is built, so with none built it finds no row and microphones are all silent, and as that card has no device 0 the mixer plays to none of it, a monitor's speakers included. - **AMD laptops:** on most the codec is on HD Audio, so the speakers and - the jack work. The built-in microphones are on the audio coprocessor (ACP) - and do not. Some, from the coprocessor's 6.3 generation (Ryzen 7040) on, - put their codecs on SoundWire behind the coprocessor instead, and there, - as on Intel's SoundWire laptops, the speakers, the jack and the - microphones are all silent. + the jack work. Where the built-in microphones are on the audio + coprocessor (ACP), as on many consumer models (HP's OMEN and Victus among + them), they do not. Some put them on the codec's digital-microphone input + instead, as the kernel logs of HP's EliteBook 8 G1a and 845 G9 show, and + HD Audio then drives them as it does a headset's microphone; no such + laptop has run Kryptik yet. Some, from the coprocessor's 6.3 generation + (Ryzen 7040) on, put their codecs on SoundWire behind the coprocessor + instead, and there, as on Intel's SoundWire laptops, the speakers, the + jack and the microphones are all silent. - **Smart amplifiers** in front of the speakers (Cirrus's CS35L41, CS35L54, CS35L56 and CS35L57, TI's TAS2781), on Intel and AMD laptops alike: linux-firmware has tuning files for about 200 models, most of them ASUS, @@ -50,7 +54,14 @@ USB audio works on all of them. A machine shows which kinds it is without any of these drivers: the audio controller's PCI class (0x040100 or 0x040380 means a DSP, 0x040300 none), an `NHLT` table under `/sys/firmware/acpi/tables`, and whether its ACPI tables describe SoundWire -links or amplifiers (`CSC3551` for Cirrus's CS35L41, `TIAS2781` for TI's). +links or amplifiers, which `ls /sys/bus/acpi/devices` lists: `CSC3551`, +`CLSA0100` and `CLSA0101` for Cirrus's CS35L41; `CSC3554`, `CSC3556` and +`CSC3557` for its CS35L54, CS35L56 and CS35L57; `TIAS2781` and `TXNW2781` +for TI's. On AMD, the codec +shows whether it has the microphones: the kernel's autoconfig line for a +Realtek codec lists `Internal Mic=0x12`, and pin 0x12 in +`/proc/asound/card*/codec#0` has an internal-microphone default rather than +0x411111f0, the value of a pin with nothing on it. Testing on physical hardware is planned for October 2026. The Intel and AMD laptops tested then will show which kinds they are. @@ -188,8 +199,9 @@ laptops tested then will show which kinds they are. ## Recommendation: a named gap in 1.0 1.0 ships without most of them, and the user guide's known limitations say -so: no built-in microphones on Intel laptops with a DSP or on AMD laptops, -no built-in sound on SoundWire laptops, and no speakers behind smart +so: no built-in microphones on Intel laptops with a DSP or on AMD laptops +whose microphones are on the coprocessor, no built-in sound on SoundWire +laptops, and no speakers behind smart amplifiers other than Cirrus's CS35L54, CS35L56 and CS35L57 on I2C. Those three are built ahead of the rule below, that each comes only once a diff --git a/docs/design/laptop.md b/docs/design/laptop.md index bda079e56..f268b3e64 100644 --- a/docs/design/laptop.md +++ b/docs/design/laptop.md @@ -45,7 +45,11 @@ other codec, and `snd-usb-audio`; none of them needs firmware. The kernel loads no module by itself (`STATIC_USERMODEHELPER`), and a codec binds only to a driver loaded when the controller probes it, so modprobe loads every codec driver ahead of `snd-hda-intel` (`build/config/modprobe.d/sound.conf`, -which stage 05 holds to the drivers built). +which stage 05 holds to the drivers built). `snd-ctl-led` loads with them: +a codec's parser asks for it by `request_module`, and a laptop's mute and +microphone-mute lights follow the card's switches only through it. The mixer +turns a card's outputs off while the master is muted, and its inputs off +while no zone holds the microphone, so the lights say both. Not yet: Intel's Sound Open Firmware drivers for laptops with digital microphones or SoundWire codecs, and AMD's audio coprocessor drivers. Of the @@ -502,6 +506,8 @@ and the power key, idle and inhibitors, suspend, and runtime directories rather than the battery's running down, so a machine that outdraws its charger under load does not swing between the two, on each processor policy that offers it (amd-pstate and intel_pstate both do). + A processor neither drives falls back to acpi-cpufreq, which runs + schedutil (`boot.fragment`), so its clock still follows the load. PCIe link power and NVMe power states keep the kernel's defaults, and no rule turns on USB autosuspend for input devices, which too often misbehave with it. diff --git a/docs/design/state-encryption.md b/docs/design/state-encryption.md index 0d1c9e01f..676dd554c 100644 --- a/docs/design/state-encryption.md +++ b/docs/design/state-encryption.md @@ -22,7 +22,10 @@ every machine, and verified. It uses the dm-crypt and XTS support the most on every console the kernel writes to, the screen and a serial port alike, and taking the first answer (`ask.sh`). It uses its own prompt (echo off with `stty`, the line passed to cryptsetup on a descriptor) because - cryptsetup's prompt discards input typed as it appears. `kryptik-console`, + cryptsetup's prompt discards input typed as it appears. A minute with + nothing typed brings one line on every console, and the prompt keeps + waiting: a keyboard whose driver is a module types nothing before eudev + runs, and a plain USB keyboard types it. `kryptik-console`, the early getty, leaves the serial console to `sysinit` and then `firstboot` until each finishes, waiting at most 30 s for each to start. - **Anything else is the degraded state**: three wrong passphrases, a damaged diff --git a/docs/hardening.md b/docs/hardening.md index 019f7ccbc..322e79e70 100644 --- a/docs/hardening.md +++ b/docs/hardening.md @@ -136,8 +136,9 @@ ADR-009) and `boot.fragment` (ADR-013). and cannot be set). - Also on: KFENCE, trapping UBSAN bounds checks, page table checking, `DEBUG_VIRTUAL`, a strict IOMMU by default, the EFI stub's early-DMA and - reset-attack protections, the TPM as an entropy source, `/proc/pid/mem` - write protection, userspace shadow stacks. + reset-attack protections, the TPM as an entropy source where it is a chip + of its own or Pluton (6.18 gives an AMD firmware TPM no hwrng, after AMD's + PA-410), `/proc/pid/mem` write protection, userspace shadow stacks. - Off: `bpf()`, SELinux (LSMs are `landlock,lockdown,yama`), `/dev/mem`, `/proc/kcore`, MSR and CPUID devices, legacy PTYs, `binfmt_misc`, kexec, hibernation, IA-32 emulation, debugfs, ftrace, kprobes, io_uring, sysrq, diff --git a/docs/releases.md b/docs/releases.md index 33942a72a..48378f399 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -14,7 +14,25 @@ minor for new features, the major for a change that needs a reinstall. While every release is a development one the major number is 0: `0.1.0`, then `0.1.1` and `0.2.0`. `1.0.0` is the first production release, signed with the release key made offline. The dated builds CI makes of every push to main -(`0.1..`) are not releases and never reach the page. +(`0.1..`, and the `.1` build over it that the run tests and +keeps) are not releases and never reach the page. + +## A build of main + +Each Distro run on main whose suites all passed keeps, for 14 days, the +directory a release is drafted from, as the run's `kryptik-release` +artifact. Its images are not compressed, and they carry the `.1` version +the update suite updated to: `kryptik-0.1.DATE.COMMIT.1-usb.img` and its +`.iso`. It is a development build with keys of its own, so the next build, +a release among them, is a reinstall. + +```sh +gh run list -R DevomB/KryptikOS -w Distro -b main -s success -L 1 +gh run download RUN -R DevomB/KryptikOS -n kryptik-release -D kryptik-RUN +``` + +The download is a zip of about 1.5 GB. Check the USB image and write it as +the README's "Get it" says, without `zstd -d`, to a stick of 4 GB or more. ## Two kinds @@ -45,7 +63,7 @@ the release key made offline. The dated builds CI makes of every push to main (`verify-signatures.sh --strict`, `verify-provenance.sh --strict`) and a commit whose CI did not pass, then builds that version from nothing, with no cached tree, so the release holds only what a clean build makes: about - three hours. It + six and a half hours, two and a half of them the browser's image. It builds it as the release under test, over a `0.0.0` build the update suite updates from, and runs every suite on the images. A production release (`v1.0.0` and up) is signed in a job of its own, once the diff --git a/docs/user-guide.md b/docs/user-guide.md index f8befcdf6..28cee8cbc 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -262,6 +262,12 @@ Remove the medium. The installed disk boots on its own, by its the firmware (a firmware that refused it is named in the install's output); it does not need the medium again unless it has to be recovered. +Over a disk that held another system, the firmware may still try that +system's entry, or a network boot, before Kryptik's, which the installer +puts last. If the disk does not start Kryptik, pick `Kryptik slot a` in the +firmware's boot menu (F9 on HP, F12 on Dell and Lenovo) and move it first in +the setup's boot order. + **Unattended install** (what the VM tests do): a small control disk labelled `kryptik-testctl`, made with `tools/image/mk-testctl.sh --out FILE --key KRYPTIK-TESTCTL KEY=VALUE...`, carrying `install_target=/dev/vda`, the state @@ -423,7 +429,8 @@ as well. A window in full screen covers those windows, so the bar above it names the zone that may use the microphone (`MIC`) and the zone that has the camera (`CAM`), whichever zones they are. Built-in and USB cameras that speak the USB Video Class work, as most do; the cameras of recent Intel laptops that need Intel's image -processing in userspace (MIPI cameras behind the IPU6) and infrared +processing in userspace (MIPI cameras behind the IPU6), those behind the +image processor of AMD's Ryzen AI Max (HP's ZBook Ultra G1a), and infrared face-login cameras do not. `vault` and the net zone never get the camera. Firefox in a zone is not told when the camera is given or taken back. @@ -670,6 +677,19 @@ previous slot, because the one-time boot entry is used up. `s6-svstat /run/service/watchdog` shows the feeder; `/sys/class/watchdog/` shows each timer, its timeout and whether it is running. +## When a machine does not work + +Photograph the screen. A kernel panic draws its last lines on the panel, +green on black, and restarts the machine 10 seconds later. Note the +machine's model and its firmware's version, which its setup screen shows. +If the medium reaches its shell, `kryptik-hwreport --save` writes what the +machine is made of, the drivers that took each part, the firmware the kernel +missed and the kernel's log onto the stick; a medium that shows nothing +writes one by itself when its first partition holds a `kryptik-report` +directory ([hardware](hardware.md)). An installed system gives the same at +the administration login, as root: `kryptik-hwreport > FILE`. The report +leaves out serial numbers, hardware addresses and UUIDs. + ## Known limitations of this release - The keys that sign a release from 1.0.0 on are held on GitHub, in the @@ -677,9 +697,15 @@ shows each timer, its timeout and whether it is running. them once the maintainer approves it, so a release is as trustworthy as the maintainer's GitHub account and the runners that build it ([release keys](release-keys.md)). A development build, which every `0.x` - release is, is signed with keys that build generated and then discarded, - so its certificate is enrolled on its own and no other build's release - updates it. + release and every build of main is, is signed with keys that build + generated and then discarded. Its certificate is enrolled on its own, and + no other build's release updates it. Moving to another build, 1.0.0 among + them, is a reinstall with `--replace-kryptik`, which destroys the state + partition with its users and zone volumes: copy off what you keep first, + from each zone given a FAT stick to write (`kryptik-stick put`). Keep the + build's USB image too: + `kryptik-recover` restores a build only from a medium of it, and a build of + main stays downloadable for 14 days. - No independent security review has been made. - A Kryptik guest whose display is virtio-gpu, as QEMU's virtio-vga is, does not sleep: the kernel's virtio-gpu driver has no suspend callbacks, so the diff --git a/sources.lock b/sources.lock index 4dae9b9ba..06e9f918c 100644 --- a/sources.lock +++ b/sources.lock @@ -1,7 +1,7 @@ 302564d54d8e28191fadfd734f2675ecb0c9e0615a58011b89ef15dfa4dbaa96 0.9.3.tar.gz 4cd95ff3b83c433ebc6269d0778d79eb3480b7d5bc873503e1cc3768546bdbec 14.tar.gz 352703ef5b72ebb22d4f250284a29b89fe64d4049c6bf64c693f9af486c8081e LVM2.2.03.42.tgz -c2c4321961fab0fb999d66e0cecf521c2ab3994c7992873ea99e306c1094fd5a Python-3.12.15.tar.xz +b5796915dc45ff745cfb4e990a7e7c93d6f546328a102ce31448d69ebc37575c Python-3.12.16.tar.xz e661131456d2708a01c614a0f400e11d7d1bfaeb6f3e74b75bb980b72f0161a3 acl-2.4.0.tar.xz f740db7f488255944ffd4428416ee3390a96742856916433df468c281436480e alsa-lib-1.2.16.1.tar.bz2 d42fa374513180bb48cb11a46696f488240e5124ff1e6ad88b0abff706985612 attr-2.6.0.tar.gz @@ -10,7 +10,7 @@ ae470fec429775653e042015edc928d07c8c3b2fc59765172a330d3d87785f86 bc-1.08.2.tar. 13f74202a3c4c51118b797a39ea4200d3f6cfbe224da6d1d95bb938480132dfd binutils-2.43.1.tar.xz 9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2 bison-3.8.2.tar.xz ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 bzip2-1.0.8.tar.gz -f66dff1bdf8f96060b8177976f8b7d9254bc89bc4db933d769f7384d28480bc9 cacert-2026-08-13.pem +796f1389bfea13c0ed78f663b765baaff54a508e5483786bd6ece73c5e3e3cbe cacert-2026-10-20.pem e5bb807f7728cb60cd8b27ebc97a2edb469b68655f21e844a600c3575b76f5bb cmake-4.4.4-linux-x86_64.tar.gz bd24c30d80a7744ae84b845ff080cc8453b06c622ef01066564108e9cefc44cf cmake-4.4.4.tar.gz a480198559733e9b3da999e90543ac6f888a2caa544d8d664c5a1f17e528e210 coreutils-9.12.tar.xz @@ -82,7 +82,7 @@ a6fbf060d8d4fff001517a2b94f356bb4366bfbf0ba366366f9d27cc38caa58f nftables-1.1.7 974d6b2f4eeefa25625d34da3cb36bdcebe7fbce40f4c16ac0835fd1c0cbae17 ninja-1.13.2.tar.gz a9dc9565dffe8640f64d863cd29a32bc4a3dbdec0566a7fc44c5d6ee767d5f39 openssh-10.6p1.tar.gz 603f5602e2eef00d77fbd429d34dcd5822bb301757a1bc9cdb24c670f1eb859a openssl-3.5.9.tar.gz -f87cee69eec2b4fcbf60a396b030ad6aa3415f192aa5f7ee84cad5e11f7f5ae3 patch-2.8.tar.xz +3240c7959c5347c8ed347e3c4201c0337bf4240d5cf09d68889e58eeaba30e17 patch-2.8.1.tar.xz 1fe6f825b487d26c35aa51a35f52fe494d4cfc77b8051f8b1ee3391bf0289bc6 perl-5.40.5.tar.xz d09c44ebc3bd5bee7021c79f922fe8fb2fb57f7320f55e97ff9914d2346a591c pixman-0.46.4.tar.gz 3a9080ac51d03615e7c1910a0a2a8df08424892b5f13b0628a204d3fcce0ea8b pkgconf-2.3.0.tar.xz diff --git a/tools/image/sound-test.sh b/tools/image/sound-test.sh index 849960ace..4b00a97a0 100755 --- a/tools/image/sound-test.sh +++ b/tools/image/sound-test.sh @@ -70,7 +70,7 @@ for name in sound-card codec-bound codec-drivers-ahead pcm-nodes zone-proc-asoun zone-socket-no-card zone-plays zones-play-together record-refused-ungranted status-shows-recording \ holder-recorded record-granted grant-ends-with-zone holder-cleared foreign-uid-refused chrome-grants-microphone \ chrome-takes-microphone-back chrome-sets-volume microphone-window microphone-window-taken-back \ - chrome-says-recording microphone-moves volume-steps levels-kept levels-kept-boot levels-kept-filtered levels-kept-unread usb-sound-card plug-moves-sound plays-on-usb usb-pull-moves-sound \ + chrome-says-recording microphone-moves volume-steps switches-follow levels-kept levels-kept-boot levels-kept-filtered levels-kept-unread usb-sound-card plug-moves-sound plays-on-usb usb-pull-moves-sound \ usb-pull-zone-plays-on; do grep -q "GT PASS ${name}" <<<"$T" && green "guest: ${name}" || red "guest: ${name} (not passed)" done diff --git a/tools/key-provenance.tsv b/tools/key-provenance.tsv index 19e846cc8..ba0ba983c 100644 --- a/tools/key-provenance.tsv +++ b/tools/key-provenance.tsv @@ -114,10 +114,10 @@ B3F2469D78D78BD09D366F37C94035C21B4F2AEB korg https://git.kernel.org/pub/scm 0CF4E8D871593224842832B888DD9E08C5DDACB9 savannah https://savannah.gnu.org/project/release-gpgkeys.php?group=findutils&download=1 2026-10-02 findutils James Youngman B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE savannah https://savannah.gnu.org/project/release-gpgkeys.php?group=inetutils&download=1 2026-10-02 inetutils Simon Josefsson ; signs with subkey A3CC9C870B9D310ABAD4CF2F51722B08FE4745A2; Savannah's copy expired 2022-10-23, the GNU keyring's runs later D33A3F0CA16B0ACC51A60738494C8A5FBF4DECEB wkd mak@debian.org 2026-10-13 hicolor-icon-theme Matthias Klumpp ; db.debian.org and nm.debian.org show the same fingerprint; signs the 0.18 tarball, the first signed release; expires 2028-07-18 -14F26682D0916CDD81E37B6D61B7B526D98F0353 origin https://archive.mozilla.org/pub/firefox/releases/153.5.0esr/KEY 2026-10-15 firefox Mozilla Software Releases ; the file carries the signing subkey 827E658608679618CD349F93678E455D76767AA3 (2026-08-06, to 2028-08-05) and the revocation of the leaked 09BEED63F3462A2DFFAB3B875ECB6497C1A20256, neither of which keyserver.ubuntu.com serves; V_FIREFOX's bump moves this URL +14F26682D0916CDD81E37B6D61B7B526D98F0353 origin https://archive.mozilla.org/pub/firefox/releases/153.6.0esr/KEY 2026-10-29 firefox Mozilla Software Releases ; the file carries the signing subkey 827E658608679618CD349F93678E455D76767AA3 (2026-08-06, to 2028-08-05) and the revocation of the leaked 09BEED63F3462A2DFFAB3B875ECB6497C1A20256, neither of which keyserver.ubuntu.com serves; V_FIREFOX's bump moves this URL 108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE origin https://static.rust-lang.org/rust-key.gpg.ascii 2026-10-13 rustc,cargo,rust-std Rust Language (Tag and Release Signing Key) ; served beside the releases it signs D574BD5D1D0E98895E3BF90044F2485E45D59042 origin https://releases.llvm.org/release-keys.asc 2026-10-13 llvm Tobias Hieta ; one of the release managers' keys LLVM's site lists, and the one that signs 23.1.3 -C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C origin https://raw.githubusercontent.com/nodejs/release-keys/HEAD/keys/C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C.asc 2026-10-15 node Richard Lau ; one of the releasers' keys in Node.js's release-keys repository, and the one that signs 24.22.0 +5BE8A3F6C8A5C01D106C0AD820B1A390B168D356 origin https://raw.githubusercontent.com/nodejs/release-keys/HEAD/keys/5BE8A3F6C8A5C01D106C0AD820B1A390B168D356.asc 2026-10-29 node Antoine du Hamel ; one of the releasers nodejs/node's README lists under Release keys, served by its release-keys repository, and the one that signs 24.22.1 and 24.22.2 (Richard Lau signed 24.22.0) D501A478440AE2FD130A1BE8B9112431E509039F origin https://sourceware.org/pub/lvm2/mcsontos.pubkey.asc 2026-10-16 lvm2 Marian Csontos ; the key file beside the releases, there since 2026-09-30 4EF4AC63455FC9F4545D9B7DEF8FE99528B52FFD origin https://facebook.github.io/zstd/signing-key.asc 2026-10-16 zstd Zstandard Release Signing Key ; on zstd's own site, where zstd.net/signing-key.asc redirects 5ED46A6721D365587791E2AA783FCD8E58BCAFBA origin https://madler.net/madler/pgp.html 2026-10-16 zlib Mark Adler ; the page zlib.net's "PGP key" link names, the key armoured in its HTML diff --git a/tools/pin-reviews.tsv b/tools/pin-reviews.tsv index b06f14948..de9b7ed9b 100644 --- a/tools/pin-reviews.tsv +++ b/tools/pin-reviews.tsv @@ -17,9 +17,6 @@ llvm 23.1.3 23.1.4 fine 2026-10-23 The 34 commits from llvmorg-23 mpc 1.3.1 1.4.1 fine 2026-09-19 NEWS 1.4.0 and 1.4.1: no security or wrong-result fix. 1.4.0 is to be skipped if this ever moves. # --- held: a fix exists upstream and the pin stays, for the reason given ----------- -ca-bundle 2026-08-13 2026-10-20 held 2026-10-23 The 2026-09-25 bundle holds the same 121 certificates as the pin, byte for byte; only its header's date and certdata.txt digest differ. 2026-10-20's is made from that same certdata.txt and leaves out three eMudhra roots, emSign Root CA - C1, emSign ECC Root CA - C3 and emSign ECC Root CA - G3: curl.se strips them (mk-ca-bundle.pl -x in its ca/update.sh) after Mozilla reported on 2026-10-20 that the private keys of eight eMudhra intermediate certificates were compromised, and NSS 3.131.1 removes the same three. OpenSSL and Python have nothing like Firefox's OneCRL, so with the pin the net zone's check of a release server, and lynx or python in a zone, accept a certificate those intermediates issue under the emSign roots; a release itself is still checked by its signature. The report also names Sectigo-issued cross-certificates sharing those keys, whose root was not identified here, so the new bundle closes the emSign path and is not known to close every path. The bump is queued. Not today: the owner tests on a laptop this weekend, and ca-bundle is built before wlroots, the base every image is built on, so its bump rebuilds every image, the 2.5-hour browser image among them. -firefox 153.5.0 153.5.1 held 2026-10-23 MFSA 2026-112 (2026-10-20) names one fix in 153.5.1: CVE-2026-113470 (high) builds in the OneCRL entries that block the compromised eMudhra intermediates, which Mozilla sent to running browsers through Remote Settings on 2026-10-17. 153.5.0 has them only once Remote Settings syncs, and a profile made afresh at each start, as untrusted's is, begins every session without them. The bump is queued. Not today: the owner tests on a laptop this weekend, and a browser bump rebuilds the 2.5-hour browser image. -node 24.22.0 24.22.1 held 2026-10-23 A security release (2026-10-21): CVE-2026-105481 (http agent data guard), -105482 (null bytes in dns resolve), -105483 and -106069 (TLS IP address checks), -106073 (realpathSync under the permission model), -106074 (random caches across snapshots) and -111497 (brotli decoder), with OpenSSL 3.5.9, NSS 3.131.1's roots (the three emSign roots gone), c-ares 1.34.9 and undici 7.30.1. None reaches a running Kryptik: node is a layer only the browser's build uses (build/images/node.sh), which runs it offline on Mozilla's verified source to build the devtools debugger's modules, and no zone gets it. Held as a security release all the same; the bump is queued with the browser's. Not today: the owner tests on a laptop this weekend, and a node bump rebuilds the 2.5-hour browser image. # --- fine: nothing in the gap is a security fix that reaches Kryptik --------------- gawk 5.3.0 5.4.1 fine 2026-09-26 build/patches/gawk-5.3.0 carries upstream's fixes for CVE-2026-40467 (do_getline_redir use-after-free, a2d18c74), -40468 (do_sub and parse_escape overflows, 062f2f25) and -40553 (readdir extension, cca03661 and bfa2e4b8), made against 5.3.0's text; make check passes. -40469 (aa7272a6) guards 32-bit builds only and is not carried. 5.4 makes MinRX the default regex engine under every build script that calls awk, glibc's and the kernel's included: move in a build of its own, not in a batch. @@ -42,11 +39,13 @@ skalibs 2.15.1.0 2.16.0.0 fine 2026-10-19 NEWS and the eight commits to execline 2.9.9.2 2.10.0.0 fine 2026-10-19 NEWS and the six commits to v2.10.0.0: cd and umask renamed, --enable-pedantic-posix, posix-cd and loopwhilex -n removed, wait rewritten to reap only the pids it lists; no security fix. Kryptik's services and scripts call none of these (no execline script in build/services). s6 2.15.1.0 2.15.1.1 fine 2026-10-19 The eight commits to v2.15.1.1: READY=1 accepted without a newline, s6-softlimit -h lowering the soft limit, s6-sudod's error reporting, doc typos; no security fix. Kryptik calls neither s6-softlimit nor s6-sudod. s6-rc 0.7.0.0 0.8.0.2 fine 2026-10-23 NEWS and the 25 commits to v0.8.0.1: compiled databases record their major version, s6-rc-compile -L, snapshots in s6-rc-set-install for upgrades across major versions, s6-rc-update's rollback deleting the right directory, and in 0.8.0.1 alone s6-rc-set-new's naming of a set's .real directory; no security fix. 0.8.0.2's one fix (e3e2e110) gives s6-rc-set-new's rx buffer the byte that 0.8.0.1's longer .real name needs, which it wrote past on the stack: a bug 0.8.0.1 brought in, as 0.7.0.0 sizes that buffer to what it writes (checked). Kryptik compiles its database at build time and runs neither s6-rc-update nor the s6-rc-set commands. -iana-etc 20261009 20261015 fine 2026-10-19 One commit: IANA's protocol-numbers.xml and service-names-port-numbers.xml refreshed. Data, no code. +iana-etc 20261009 20261022 fine 2026-10-29 One commit to 20261015: IANA's protocol-numbers.xml and service-names-port-numbers.xml refreshed. One more to 20261022 (b1ff7d76): service-names-port-numbers.xml, +24 -8. Data, no code. intel-microcode 20260812 20260925 fine 2026-09-27 Release notes 20260925: one functional update, Meteor Lake C0 (06-aa-04, 0x28 to 0x2b), and no security advisory. linux-firmware 20260916 20261019 fine 2026-10-23 The 206 commits between the tags, read against firmware.list and the AMD microcode stage 05 builds into the kernel. What changes in the image: AMD's family 1Ah microcode (new patches for models 02h and 11h, EPYC 9005: 0x0b00217b and 0x0b101068; models 08h and 24h unchanged); iwlwifi's core24.80-41 builds for cc, Qu and QuZ (-77), ty, So and Ma (-89, with their PNVM files), Bz with Hr or Gf and Sc with Gf (-100); amdgpu's DMCUB, GC, PSP TA and ASD, VCN and VPE updates; and new board entries in the ath11k WCN6855 hw2.0 and ath12k WCN7850 hw2.0 board-2.bin. No commit states a security fix, and no AMD or Intel advisory, Debian tracker entry or NVD record names one in these files; Intel's August Wi-Fi advisories (INTEL-SA-01422, -01468) came before the pin, which carries core24.70-49. Vendors disclose firmware fixes on their own dates: re-read this row when Intel or AMD next publish. groff 1.23.0 1.24.2 fine 2026-09-29 NEWS 1.24.0 to 1.24.2: 1.24.2 fixes command injection (CWE-78) in mmroff, pdfmom and pre-grohtml, which the image does not install (build/recipes/groff.sh); man renders for a terminal, never HTML. 1.24.0 has incompatible request-syntax changes; never that one. -lvm2 2.03.42 2.03.43 fine 2026-09-30 WHATS_NEW 2.03.43 and WHATS_NEW_DM 1.02.217: no security fix. Kryptik builds device-mapper alone (libdevmapper, dmsetup); its changes are raid reload suppression, vdostats and a nesting limit in the config parser, which reads nothing a zone supplies. +cmake 4.4.4 4.4.5 fine 2026-10-29 The 19 commits from v4.4.4 to v4.4.5: the cache documentation table, FindPython under cross-compiling with CMP0190 OLD, curl 8.21 or later built without TLS, and GNUInstallDirs' /opt paths. No security fix, and cmake runs only in the build; the image ships no cmake. +cmake-bin 4.4.4 4.4.5 fine 2026-10-29 The same release as cmake (Kitware's x86_64 binary of v4.4.5): the 19 commits above, no security fix, used only in the build and never installed. +lvm2 2.03.42 2.03.44 fine 2026-10-29 WHATS_NEW 2.03.43 and 2.03.44, WHATS_NEW_DM 1.02.217 and 1.02.218 (GitLab's mirror at v2_03_44): no security fix in what Kryptik builds, device-mapper alone (libdevmapper, dmsetup). 1.02.218 handles dm-raid 1.9's incomplete health status, fixes two dmstats leaks, validates dmsetup vdostats' device name and trims log prefixes; 2.03.44's out-of-bounds read in dmeventd's message parser and its new I/O engines are in parts not built. e2fsprogs 1.47.1 1.47.4 fine 2026-09-19 Release notes 1.47.2 to 1.47.4: no security fix. libpipeline 1.5.7 1.5.8 fine 2026-09-19 NEWS 1.5.8: no security fix. man-db 2.12.1 2.13.1 fine 2026-09-19 NEWS 2.13.0 and 2.13.1: no security fix. diff --git a/tools/sound/kryptik-sound.c b/tools/sound/kryptik-sound.c index 62efeb674..dea92c4e1 100644 --- a/tools/sound/kryptik-sound.c +++ b/tools/sound/kryptik-sound.c @@ -272,6 +272,12 @@ static int pick_card(snd_pcm_stream_t dir) return first; } +/* The card's own controls this mixer sets. USB audio names a headset's controls Headset and a + * microphone's Mic where the device gives them no name. On HD Audio a Mic control is the + * loopback into the output, a playback one, which the capture side here leaves alone. */ +static const char *const outputs[] = { "Master", "PCM", "Speaker", "Headphone", "Headset", "Front", "Line Out", NULL }; +static const char *const inputs[] = { "Capture", "Mic", "Headset", NULL }; + static int named(snd_mixer_elem_t *e, const char *const *names) { for (; *names; names++) @@ -280,40 +286,63 @@ static int named(snd_mixer_elem_t *e, const char *const *names) return 0; } -/* The card's own controls at unity and on, so the mixer's volumes are the only ones that act: - * a card can come up muted, and nothing else here sets it. USB audio names a headset's controls - * Headset and a microphone's Mic where the device gives them no name. On HD Audio a Mic control - * is the loopback into the output, a playback one, which the capture side here leaves alone. */ -static void levels(int card) +static snd_mixer_t *card_mixer(int card) { - static const char *const play[] = { "Master", "PCM", "Speaker", "Headphone", "Headset", "Front", "Line Out", NULL }; - static const char *const rec[] = { "Capture", "Mic", "Headset", NULL }; char hw[16]; snprintf(hw, sizeof hw, "hw:%d", card); snd_mixer_t *m; if (snd_mixer_open(&m, 0) < 0) - return; + return NULL; if (snd_mixer_attach(m, hw) < 0 || snd_mixer_selem_register(m, NULL, NULL) < 0 || snd_mixer_load(m) < 0) { snd_mixer_close(m); - return; + return NULL; } + return m; +} + +/* The card's switches say what the mixer does: its outputs off while the master is muted, its + * inputs off while no zone holds the microphone. A laptop's mute and microphone-mute lights + * follow them (snd-ctl-led), and a card nothing may record from records nothing. */ +static void switches(snd_mixer_t *m) +{ + for (snd_mixer_elem_t *e = snd_mixer_first_elem(m); e; e = snd_mixer_elem_next(e)) { + if (named(e, outputs) && snd_mixer_selem_has_playback_switch(e)) + snd_mixer_selem_set_playback_switch_all(e, !master_muted); + if (named(e, inputs) && snd_mixer_selem_has_capture_switch(e)) + snd_mixer_selem_set_capture_switch_all(e, granted >= 0); + } +} + +/* Every card's, for a mute or a grant that changed: a card nothing plays on keeps its lights. */ +static void switches_everywhere(void) +{ + int card = -1; + while (snd_card_next(&card) == 0 && card >= 0) { + snd_mixer_t *m = card_mixer(card); + if (!m) + continue; + switches(m); + snd_mixer_close(m); + } +} + +/* The card's own volumes at unity, so the mixer's volumes are the only ones that act, and its + * switches as switches() says: a card can come up muted, and nothing else here sets it. */ +static void levels(int card) +{ + snd_mixer_t *m = card_mixer(card); + if (!m) + return; for (snd_mixer_elem_t *e = snd_mixer_first_elem(m); e; e = snd_mixer_elem_next(e)) { long lo, hi; - if (named(e, play)) { - if (snd_mixer_selem_has_playback_switch(e)) - snd_mixer_selem_set_playback_switch_all(e, 1); - if (snd_mixer_selem_has_playback_volume(e) && snd_mixer_selem_set_playback_dB_all(e, 0, 1) < 0 - && snd_mixer_selem_get_playback_volume_range(e, &lo, &hi) == 0) - snd_mixer_selem_set_playback_volume_all(e, hi); - } - if (named(e, rec)) { - if (snd_mixer_selem_has_capture_switch(e)) - snd_mixer_selem_set_capture_switch_all(e, 1); - if (snd_mixer_selem_has_capture_volume(e) && snd_mixer_selem_set_capture_dB_all(e, 0, 1) < 0 - && snd_mixer_selem_get_capture_volume_range(e, &lo, &hi) == 0) - snd_mixer_selem_set_capture_volume_all(e, hi); - } + if (named(e, outputs) && snd_mixer_selem_has_playback_volume(e) && snd_mixer_selem_set_playback_dB_all(e, 0, 1) < 0 + && snd_mixer_selem_get_playback_volume_range(e, &lo, &hi) == 0) + snd_mixer_selem_set_playback_volume_all(e, hi); + if (named(e, inputs) && snd_mixer_selem_has_capture_volume(e) && snd_mixer_selem_set_capture_dB_all(e, 0, 1) < 0 + && snd_mixer_selem_get_capture_volume_range(e, &lo, &hi) == 0) + snd_mixer_selem_set_capture_volume_all(e, hi); } + switches(m); snd_mixer_close(m); } @@ -466,15 +495,17 @@ static void control_line(struct conn *c) master = v; else if (is_volume && n == 3 && (v = level(d, zones[z].volume)) >= 0) zones[z].volume = v; - else if (is_mute && n == 2 && (v = switched(b, master_muted)) >= 0) + else if (is_mute && n == 2 && (v = switched(b, master_muted)) >= 0) { master_muted = v; - else if (is_mute && n == 3 && (v = switched(d, zones[z].muted)) >= 0) + switches_everywhere(); + } else if (is_mute && n == 3 && (v = switched(d, zones[z].muted)) >= 0) zones[z].muted = v; else if (!strcmp(a, "grant") && n == 2) { /* One zone at a time: a grant moves, and what another zone recorded ends. */ end_records(z); granted = z; record_holder(); + switches_everywhere(); say("the microphone is granted to %s", zones[z].name); } else if (!strcmp(a, "revoke") && n <= 2) { if (granted >= 0 && (n == 1 || z == granted)) { @@ -482,6 +513,7 @@ static void control_line(struct conn *c) say("the microphone is taken back from %s", zones[granted].name); granted = -1; record_holder(); + switches_everywhere(); } } else answer = "error: status | volume [ZONE] N|+N|-N | mute [ZONE] on|off|toggle | grant ZONE | revoke [ZONE]\n"; @@ -795,9 +827,11 @@ int main(int argc, char **argv) int control = listen_at(CONTROL_PATH, 0660); /* A record a mixer that died left behind would name a zone that may not record. */ record_holder(); - /* The levels to start at, and at once the record of them a stop keeps. */ + /* The levels to start at, and at once the record of them a stop keeps; the cards' switches + * then say them, and that no zone holds the microphone. */ restore_levels(); record_levels(); + switches_everywhere(); if (control < 0) say("no control socket at %s: %s; volume and the microphone stay as they are", CONTROL_PATH, strerror(errno)); say("mixing for %d zone(s)", nzones); diff --git a/tools/sound/soundprobe.c b/tools/sound/soundprobe.c index daa4ac2ec..965e8c9f0 100644 --- a/tools/sound/soundprobe.c +++ b/tools/sound/soundprobe.c @@ -3,6 +3,8 @@ * * soundprobe tone HZ SECONDS play a sine of HZ at half scale, both channels * soundprobe record SECONDS record, then say "recorded N frames, peak P" + * soundprobe switches CARD in zone 0: each of card CARD's switches, "NAME playback on", + * "NAME capture off" and so on, a line each * * Exit: 0 done; 1 the device refused, with alsa-lib's words on stderr; 2 usage. */ @@ -91,6 +93,32 @@ static int record(int secs) return 0; } +static int switches(const char *card) +{ + char hw[24]; + snprintf(hw, sizeof hw, "hw:%s", card); + snd_mixer_t *m; + int err = snd_mixer_open(&m, 0); + if (err == 0 && ((err = snd_mixer_attach(m, hw)) < 0 || (err = snd_mixer_selem_register(m, NULL, NULL)) < 0 + || (err = snd_mixer_load(m)) < 0)) + snd_mixer_close(m); + if (err < 0) { + fprintf(stderr, "%s: %s\n", hw, snd_strerror(err)); + return 1; + } + for (snd_mixer_elem_t *e = snd_mixer_first_elem(m); e; e = snd_mixer_elem_next(e)) { + int v; + if (snd_mixer_selem_has_playback_switch(e) + && snd_mixer_selem_get_playback_switch(e, SND_MIXER_SCHN_FRONT_LEFT, &v) == 0) + printf("%s playback %s\n", snd_mixer_selem_get_name(e), v ? "on" : "off"); + if (snd_mixer_selem_has_capture_switch(e) + && snd_mixer_selem_get_capture_switch(e, SND_MIXER_SCHN_FRONT_LEFT, &v) == 0) + printf("%s capture %s\n", snd_mixer_selem_get_name(e), v ? "on" : "off"); + } + snd_mixer_close(m); + return 0; +} + int main(int argc, char **argv) { int secs; @@ -98,6 +126,9 @@ int main(int argc, char **argv) return tone(atof(argv[2]), secs); if (argc == 3 && !strcmp(argv[1], "record") && (secs = seconds_of(argv[2])) > 0) return record(secs); - fputs("usage: soundprobe tone HZ SECONDS | soundprobe record SECONDS\n", stderr); + if (argc == 3 && !strcmp(argv[1], "switches") && argv[2][0] && strlen(argv[2]) <= 2 + && strspn(argv[2], "0123456789") == strlen(argv[2])) + return switches(argv[2]); + fputs("usage: soundprobe tone HZ SECONDS | soundprobe record SECONDS | soundprobe switches CARD\n", stderr); return 2; } diff --git a/tools/tests/ask.py b/tools/tests/ask.py index b0f0c3d57..3b79e98ba 100755 --- a/tools/tests/ask.py +++ b/tools/tests/ask.py @@ -101,6 +101,28 @@ def finish(p, secs=10): check(time.monotonic() - t0 < 5, "and it does so when the time is up") check(all(echo_on(s) for _, s, _ in ttys), "echo is back on after a timeout") +print("-- a hint after its time, the answer still whole") +ttys = consoles() +p = start('-s -h 1 "HINT" 0 "Q: "', ttys, run) +for m, _, _ in ttys: + read_until(m, b"Q: ") +os.write(ttys[0][0], b"half") +check(all(b"HINT" in read_until(m, b"HINT", 4) for m, _, _ in ttys), "the hint comes on both consoles once its time is up") +os.write(ttys[0][0], b" typed\n") +rc, out = finish(p) +check(rc == 0 and out == b"half typed", "what was typed before the hint is kept in the answer (rc %s, %r)" % (rc, out)) +check(all(b"HINT" not in read_until(m, b"HINT", 2) for m, _, _ in ttys), "and it is told once") + +print("-- no hint for an answer in time") +ttys = consoles() +p = start('-s -h 2 "HINT" 0 "Q: "', ttys, run) +for m, _, _ in ttys: + read_until(m, b"Q: ") +os.write(ttys[1][0], b"quick\n") +rc, out = finish(p) +check(rc == 0 and out == b"quick", "the answer comes back (rc %s, %r)" % (rc, out)) +check(all(b"HINT" not in read_until(m, b"HINT", 3) for m, _, _ in ttys), "and no hint follows it") + print("-- every console gone") ttys = consoles() p = start('-s 0 "Q: "', ttys, run) diff --git a/tools/tests/console-dead-port.sh b/tools/tests/console-dead-port.sh index 300c3d1ad..76ebbbfea 100755 --- a/tools/tests/console-dead-port.sh +++ b/tools/tests/console-dead-port.sh @@ -3,7 +3,8 @@ # every write. The early console's wrapper must then sleep rather than start agetty there, and # rc.shutdown, under -e, must move its output to tty0 and still bring everything down. Both # scripts are taken out of their recipes and run with their paths under a scratch directory, -# stand-ins for stty, agetty and sleep, and /dev/full as the console that takes no write. Offline. +# stand-ins for stty, agetty and sleep, and /dev/full as the console that takes no write. And +# sysinit drops such a port's console, against a stand-in sysfs. Offline. set -uo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" @@ -85,6 +86,26 @@ else red "a console that answers: exit ${rc}, console got $(wc -l < "$T/live") lines, tty0 $(wc -l < "$T/tty0")" fi +echo "-- sysinit drops a console port with no UART" +# The loop as sysinit.sh has it, from its comment to its done, against a stand-in sysfs. +awk '/^# A console= port the machine lacks/ { f = 1 } f { print } f && /^done$/ { exit }' \ + "$ROOT/build/service-scripts/sysinit.sh" > "$T/drop.sh" +grep -q 'echo N >' "$T/drop.sh" && green "sysinit.sh has the loop" || red "no console-dropping loop in sysinit.sh" +port() { # port NAME TYPE CONSOLE + mkdir -p "$T/sys/class/tty/$1"; echo "$2" > "$T/sys/class/tty/$1/type"; echo "$3" > "$T/sys/class/tty/$1/console" +} +port ttyS0 0 Y; port ttyS1 4 Y; port ttyS2 0 N +KRYPTIK_SYSFS="$T/sys" sh -e "$T/drop.sh" < /dev/null > /dev/null 2>&1; rc=$? +[[ "$rc" -eq 0 && "$(cat "$T/sys/class/tty/ttyS0/console")" == N ]] \ + && green "a console port no UART answered (type 0) is dropped" || red "ttyS0, type 0: exit ${rc}, console $(cat "$T/sys/class/tty/ttyS0/console")" +[[ "$(cat "$T/sys/class/tty/ttyS1/console")" == Y ]] \ + && green "a console port with a UART behind it is kept" || red "ttyS1, a 16550A, was dropped" +[[ "$(cat "$T/sys/class/tty/ttyS2/console")" == N ]] \ + && green "a port that is no console is left alone" || red "ttyS2 changed" +rm -rf "$T/sys"; mkdir -p "$T/sys/class/tty" +KRYPTIK_SYSFS="$T/sys" sh -e "$T/drop.sh" < /dev/null > /dev/null 2>&1 \ + && green "no serial port at all is no error" || red "the loop failed with no ttyS port" + echo echo "${PASS} passed, ${FAIL} failed" [[ "$FAIL" -eq 0 ]] diff --git a/tools/verify-signatures.sh b/tools/verify-signatures.sh index 383082af8..1bc56d0c1 100755 --- a/tools/verify-signatures.sh +++ b/tools/verify-signatures.sh @@ -289,9 +289,9 @@ PINNED_FPRS=( "108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE" # Rust Language, rustc, cargo and rust-std # https://releases.llvm.org/release-keys.asc (retrieved 2026-10-13), the release managers' keys. "D574BD5D1D0E98895E3BF90044F2485E45D59042" # Tobias Hieta, LLVM's release builds - # https://github.com/nodejs/node#release-keys (retrieved 2026-10-15) lists the releasers' keys, which - # its release-keys repository serves. Each release is signed by one releaser; this one signs 24.22.0. - "C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C" # Richard Lau, Node.js + # https://github.com/nodejs/node#release-keys (retrieved 2026-10-29) lists the releasers' keys, which + # its release-keys repository serves. Each release is signed by one releaser; this one signs 24.22.2. + "5BE8A3F6C8A5C01D106C0AD820B1A390B168D356" # Antoine du Hamel, Node.js # https://sourceware.org/pub/lvm2/mcsontos.pubkey.asc (retrieved 2026-10-16), the key file beside # the releases, there since 2026-09-30: the key already signing them, 2.03.42 among them. "D501A478440AE2FD130A1BE8B9112431E509039F" # Marian Csontos, lvm2