Skip to content

v0.9.30

Latest

Choose a tag to compare

@HPPeterSteve HPPeterSteve released this 13 Sep 22:00
· 16 commits to main since this release

Nuk4sd 0.9.30 Release Notes

Release Date: September 13, 2026
Release Type: Minor (Stability, Security & Packaging)
Maintainer: Pedro

Note: The --run command requires a SquashFS or OCI rootfs image to initialize the container sandbox. All vault operations (--ls, --new, --mount, --encrypt, etc.) work fully without it. Installation via the official .deb or Arch Linux package bundles the Ubuntu 24.04 LTS rootfs automatically.


Release Highlights

Version 0.9.30 introduces official packaging support for Debian/Ubuntu and Arch Linux, eliminates a critical escape vector in interactive mode (REPL), synchronizes memory alignment between the C and Rust subsystems, unlocks a significant number of previously inert CLI flags, and provides native system telemetry and terminal documentation utilities.


Security & Confinement

  • Removed REPL Shell Escape (rust/repl.rs): The !<command> prefix that dispatched arbitrary commands through sh -c on the host has been completely removed from the interactive loop. No command can now escape the sandbox's namespaces, Seccomp filters, or Landlock rules through the REPL. The feature was removed entirely; there is no safe way to implement it without defeating the isolation model.

  • Seccomp Short Aliases Registered (-q and -k): Both --seccomp-strict and --allow-clone3 are now available as single-character short options. -q activates the strictest BPF syscall allowlist, and -k explicitly permits the clone3 syscall. The -k flag is particularly relevant on Arch Linux and Ubuntu 24.04+, where newer glibc versions require clone3 for thread creation. Both flags default to off, preserving the existing strict-by-default isolation policy.


Packaging & Distribution

  • Official Debian Package (.deb): Native support for generating .deb packages through cargo-deb, installing the binary at /usr/bin/nuk4sd with 755 permissions and automatically resolving system dependencies (libc6, libfuse3-3, libseccomp2, libssl3, squashfs-tools).

  • Native Arch Linux Support (PKGBUILD and nuk4sd.install): Added build and packaging recipes compatible with makepkg -si, integrating the software directly with the pacman package manager. The resulting .pkg.tar.zst follows Arch packaging guidelines and places all files under the standard FHS paths.

  • Desktop Integration: Added an XDG desktop entry (assets/nuk4sd.desktop) and post-installation routines (debian/postinst, debian/postrm) that register the application in the system menu and automatically deploy desktop shortcuts to ~/Desktop and ~/Área de trabalho for all user accounts on the system.


Container Engine & OCI Images

  • Embedded SquashFS RootFS (runtime/ubuntu24_04.squashfs): The Ubuntu 24.04 LTS base system (35 MB compressed) is now distributed with the package under /usr/share/nuk4sd/runtime/. The rust/oci.rs engine detects and extracts the local image via unsquashfs before attempting any remote HTTP pull, allowing containers to start instantly in offline environments.

Core & FFI (C / Rust)

  • CliConfig Memory Layout Synchronization: The configuration struct in preset.h (C) and preset.rs (Rust) were misaligned: the Rust side was missing entire field blocks for integrity checks, WORM state, backup, lock, and key lifecycle between snapshot_diff_tag2 and the bind mounts array. Reading any of those fields from Rust was dereferencing garbage. All fields are now aligned one-to-one, fixing silent data corruption and segmentation faults on --verify, --integrity, WORM operations, and backup routines invoked from the Rust layer. New fields op_manual, op_sysinfo, sysinfo_target, and op_gui were added to both sides.

Command-Line Interface (CLI) & Usability

Several flags existed in the codebase but were either undocumented, missing from long_options, or never wired to an actual handler. This release connects them end to end.

Newly Wired Flags

  • --manual / -m: Opens the integrated 5-chapter operational and security manual directly in the terminal. The implementation existed in rust/manual.rs but had no CLI entry point.

  • --sysinfo [filter]: Real-time system telemetry: CPU, RAM, disk, network and sandboxed process monitoring. Supports granular filters (cpu, mem, disk, net, proc, all). The implementation in rust/sys_info.rs was similarly unreachable before this release.

  • --gui: Convenience shortcut that maps directly to the nuk4sd-gui preset, launching the graphical environment without manual flag assembly. The flag appeared in --help examples but was absent from long_options.

Unlocked in Isolation Profiles (--profile)

The .conf file parser (load_profile()) previously ignored a large set of valid flags. The following are now fully recognized in profile files, allowing complex sandbox configurations to be declared once and versioned as plain text:

Flag Effect
--audio Expose PipeWire / PulseAudio socket to the sandbox.
--gpu Mount /dev/dri for hardware graphics acceleration.
--xdg-runtime Map $XDG_RUNTIME_DIR/<uid> for desktop socket access.
--dev <level> Set /dev node isolation level (minimal or standard).
--preset <name> Load a named built-in isolation profile.
--seccomp-strict / -q Activate the strict Seccomp BPF allowlist.
--allow-clone3 / -k Permit the clone3 syscall in the BPF policy.
--friendly-sandbox Allow housekeeping syscalls (fsync, renameat2) for browsers and Electron apps.
--permissive Relax the default Seccomp policy for diagnostics.
--chroot Use chroot() instead of pivot_root() for root isolation.
--no-fuse Run the sandbox without mounting the FUSE layer.
--no-preflight Skip the ldd dependency auto-scan at startup.
--display <opt> Override the $DISPLAY variable exported to the sandbox.
--wayland-display <s> Override the Wayland socket name (default: wayland-0).
--hostname <name> Set the sandbox hostname (requires --unshare-uts).
--max-procs <n> RLIMIT_NPROC process limit.
--max-mem <gb> RLIMIT_AS virtual memory limit.
--max-filesize <mb> RLIMIT_FSIZE per-file size limit.
--max-fds <n> RLIMIT_NOFILE open file descriptor limit.
--tmp-size <mb> Size of the tmpfs used by --tmp-home.

Container Whitelist

  • --white-list -e / --white-list exclude: Switches the container to deny-by-default mode, blocking all operations not explicitly permitted.
  • --white-list -r / --white-list restore: Restores normal operation, lifting the sealed deny mode.

Documentation

  • FLAGS_CHEATSHEET.md: Added a complete flag reference covering all 140+ options, organized into categories (WORM, AppArmor, namespaces, Seccomp-BPF, cgroups, display, network, presets). Includes a dedicated section on the WORM + AppArmor defense-in-depth strategy with usage examples.