ninit is an experimental init system (PID 1) designed for research and custom Linux distribution builds, shipped as part of the S.A.N.E Linux distribution (spm, installer, account tools, networking and reliability tooling included). Because these components execute with full root privileges, defects at this layer can have severe system-wide impacts. This document outlines vulnerability reporting procedures, supported versions, and scope boundaries.
| Version | Supported |
|---|---|
main (latest release: v1.2.0) |
✅ |
| Older commits/tags | ❌ (please verify against main first) |
Security fixes are committed exclusively to the main branch.
Do not open public GitHub issues for security vulnerabilities. Please report through private channels:
- GitHub Private Vulnerability Reporting (recommended): Navigate to the Security → Report a vulnerability tab at: https://github.com/Iky969/sane-linux/security/advisories/new.
- Email: Contact
ryuzarza@gmail.comwith the subject line[SECURITY] ninit: <summary>.
Please include the following information where available:
- Tested commit/version (
git rev-parse HEAD) and build invocation (make+ gcc version), - Environment: host Linux distribution, kernel version (
uname -a), execution context (real bare-metal/VM PID 1 vs.unshare/chroot/container), - Minimal reproduction files:
/etc/init.confand/or/etc/fstabtriggering the issue, - Reproduction steps and diagnostic evidence (logs,
readelf,strace, core dumps), - Potential impact: boot denial of service, privilege escalation, memory disclosure, mount leaks, etc.
This is an independent open-source project without a formal SLA. Reports are typically acknowledged within a few days, and reporter credit will be attributed in release advisories upon request.
In-Scope (vulnerabilities that should be reported):
- Parsing of
/etc/init.conf(modes,:requires=, buffer boundaries) and/etc/fstab(flags, data options forwarded tomount()): parser bugs, buffer overflows, out-of-bounds reads, or unexpected option elevation into mount flags. - Signal handling & event loop: race conditions, signal drop, deadlocks, uncontrolled respawn storms, or unkillable processes preventing shutdown.
- Process management: PID leaks, zombie accumulation, unintended
execl()argument passing, or missing child process isolation. - Control channels (
/run/initctland/run/log.fifo): blocking I/O stalling init, non-root access, memory leaks, or FIFO denial of service. - Cgroup operations (
/sys/fs/cgroup/ninit/<name>): path traversal through service names, target cgroup corruption, or failure to cleanup leaf hierarchies. spmpackage manager: archive/symlink/hardlink path containment, checksum validation, journal recovery, rollback retention, and reverse-dependency enforcement.- Offline installer (
sane-install.sh): block-device target validation, mount/partition safety, signal cleanup during destructive steps, and initramfs/bootloader payload integrity. - Accounts:
sane-accounts,sane-firstboot,sane-account-recoveryanddoas.confparsing, password-lock preservation, duplicate-identity checks, and privilege-grant policy. - Networking (
sane-net, DHCP, Wi-Fi, outbound TLS via curl): configuration parsing, certificate/hostname validation, and credential handling. - Reliability: snapshot/rollback journal parsing, staged-upgrade recovery, backup retention, and fail-closed behavior after a failed restore.
Cryptographic signatures for SPM archives are frozen, pending a key-custody and trust-distribution decision. Current archives carry a SHA-256 checksum inside the same archive: that detects corruption, not authenticity. Do not describe package installation as authenticated. Until a scheme (for example minisign/ed25519) is chosen and documented, signature-related reports are design discussions rather than vulnerabilities in a shipped control.
Out-of-Scope:
- Upstream defects in the Linux kernel, BusyBox, glibc, or musl libc.
- Host sandbox escape, physical hardware access, or cold-boot attacks.
- Malicious configurations authored by root: users with write access to
/etc/init.confor/etc/fstabalready have root authority. - Operational security issues, such as insecure rootfs file permissions, untrusted
/bin/shbinaries, or weak root passwords. - Features not yet implemented (e.g. seccomp filtering, Mandatory Access Control / SELinux labels, user namespaces, cryptographic service signature verification). These represent known architectural limitations rather than security vulnerabilities.
- Denial of service caused by root-authored services (e.g. intentional respawn flood loops).
ninititself runs as PID 1 with UID 0. Service commands in/etc/init.confrun as root by default;:user=(plus an optional, paired:group=) drops a service to an unprivileged user, and group-only configurations are rejected fail-closed. Supplementary groups are dropped viasetgroups()./etc/init.confremains trusted, root-authored input — privilege drop is an opt-in hardening measure, not a sandbox./runis mounted astmpfsand the control FIFO is created with0600permissions owned by root; only root processes may dispatch commands to/run/initctl.- Service output is read from
/run/log.fifonon-blockingly; runaway services cannot stall init by filling the FIFO buffer. - Cgroup v2 provides resource containment, not a process isolation sandbox.
The
memory,cpu, andpidscontrollers enforce quotas, with the following caveats:- Resource limits do not isolate PID, mount, network, or filesystem namespaces; services share namespaces with PID 1 unless isolated by custom wrappers.
- If cgroup v2 controllers are unavailable (e.g. kernels lacking
CONFIG_CGROUPS, or unprivileged containers),ninitfalls back to fail-open mode: services run without limits and warnings are logged. Fail-closed resource gating is not enforced at boot. - Services that drop privileges (
setuid/setgid) remain within the same leaf cgroup; cgroup v2 does not enforce privilege boundaries.
- Control file descriptors (
/run/initctl,/run/log.fifo,/var/log/ninit.log) are marked withO_CLOEXECand closed explicitly in the child branch beforeexecl()inspawn_service()and inenter_rescue_mode(), preventing privilege-dropped child processes from inheriting control handles (SANE-06-01). /dev/kmsgis written directly byninit, routing early boot logs into the kernel ring buffer (dmesg).- Before deploying on hardware: validate configurations within virtual machines or containers, ensure serial console access is available, and verify clean poweroff/reboot behavior.