AM·OS HARDENING NOTES ===================== SUMMARY ------- Hardening in AM·OS is applied at six distinct layers, spanning build time, install time, boot time, and runtime: 1. Kernel build time. Security options (KSPP, lockdown LSM) are compiled directly into the kernel image, documented in /root/AUDIT.TXT. 2. Userspace build time. PIE, RELRO, stack canary, FORTIFY, and CET are applied across every shipped binary, documented in /root/AUDIT.TXT. 3. Install time (Kernel Modules). Twenty modules are disabled by default because they cannot be IBT-sealed. Documented in this file. 4. Install time (Sysctl). A single drop-in under /etc/sysctl.d/ hardens the running kernel's runtime surface. Documented in this file. 5. Boot time (IMA). The kernel enforces cryptographic signatures on all executed binaries and scripts. The policy is locked in the initramfs, and the architectural constraints of file signing are documented in this file. 6. Runtime (AppArmor). Mandatory Access Control confines system daemons and application runtimes (Java, PHP, MariaDB, Tor), mitigating script execution loopholes and restricting privilege escalation. Documented in this file. Layers 1 and 2 are static and covered by the audit trail. Layers 3 through 6 are the operational mechanisms an administrator may encounter when adjusting modules, tuning kernel parameters, or modifying system services. KERNEL MODULE BLACKLIST ----------------------- At install time, AM·OS disabled 20 kernel modules that cannot be loaded with an additional hardening step called IBT sealing. The modules still exist on disk and any of them can be re-enabled by a user who needs it; by default none are loaded. This section explains what was disabled, why, the effect on disk encryption, and how to reverse the change. MODULES DISABLED ---------------- Twenty modules, grouped by function. Virtualization kvm-intel, kvm-amd Hardware-accelerated virtual machines. Required by QEMU/KVM, libvirt, VirtualBox, and anything else that uses KVM. Alternative block ciphers sm4-aesni-avx-x86_64, sm4-aesni-avx2-x86_64, aria-gfni-avx512-x86_64, aria-aesni-avx-x86_64, aria-aesni-avx2-x86_64, twofish-x86_64-3way, twofish-avx-x86_64, camellia-aesni-avx-x86_64, camellia-aesni-avx2, serpent-avx-x86_64, serpent-avx2, cast5-avx-x86_64, cast6-avx-x86_64, blowfish-x86_64, aegis128-aesni CPU-accelerated implementations of ciphers other than AES. None are used by the default install; they exist so a service can opt into a specific cipher. Hash helpers libsm3, libnh Support libraries for the SM3 and NH hash functions. Not used by the default install. Network driver lan966x-pci Driver for the Microchip LAN966x PCI network chipset, which is uncommon on general-purpose hardware. A note on names: several cipher modules carry "aesni" in their name (sm4-aesni-avx-x86_64, aria-aesni-avx-x86_64, camellia-aesni-avx-x86_64, aegis128-aesni). That refers to the AES-NI CPU instruction set being used to accelerate the named cipher. It does not mean the module implements AES. The AES modules themselves are not on this list; see "Disk encryption" below. REASON FOR THE CHANGE --------------------- Modern x86 CPUs can enforce a defence called CET (Control-flow Enforcement Technology). One component of CET is IBT (Indirect Branch Tracking). With IBT active, the CPU verifies that every indirect jump lands on a specific marker instruction (endbr64) rather than at an arbitrary address. This blocks a class of exploits that hijack a program's control flow. For a kernel module to participate in IBT, its ELF file must declare in a metadata section that the module is "IBT-clean". The kernel reads that declaration and applies an additional hardening step called IBT sealing to the module's code. Each of the twenty modules above is compiled from a mix of C and assembly. The C part declares IBT correctly. The assembly part does not, because the toolchain used to build this kernel does not emit the metadata declaration for assembly input, and this kernel version provides no mechanism to add it after the fact. When the parts are linked together, the module as a whole loses the declaration, and the kernel does not apply the sealing step to it. The modules still load and run. The endbr64 instructions are present in their code, and the CPU continues to enforce IBT at runtime. What is missing is only the kernel's additional sealing step. That is a small, real hardening gap, which is why AM·OS chooses not to load these modules by default. Each module remains on disk so that a user who needs it can enable it at their own risk (see below). DISK ENCRYPTION --------------- None of the disabled modules are used for disk encryption. If the root filesystem is encrypted, it uses LUKS2 with the AES-XTS cipher (aes-xts-plain64), accelerated by AES-NI hardware on capable CPUs. The kernel modules that provide AES (aes-x86_64, aesni-intel) are not on the disabled list and are loaded normally. Disk throughput is bounded by the underlying storage hardware, not by the encryption. The disabled cipher modules cover ciphers the default install does not use: Serpent, Twofish, CAST5, CAST6, Camellia, ARIA, SM4, Blowfish, and AEGIS-128. A user who needs one (for example, to open an existing LUKS volume formatted with Serpent) can re-enable it using the procedure below. RE-ENABLING A MODULE -------------------- The disabled modules are controlled by a single file: /etc/modprobe.d/amos-hardening.conf Each module has a line of the form: blacklist To re-enable a module permanently: 1. As root, edit /etc/modprobe.d/amos-hardening.conf. 2. Find the line "blacklist " for the module. 3. Delete the line, or prefix it with "#" to comment it out. 4. If the module must be available at boot (rare), rebuild the initrd so it is included. For runtime-only modules, skip this step. 5. Load the module now, or reboot: modprobe To load a module for the current session only, without changing any configuration file: modprobe The "blacklist" directive prevents automatic loading by udev and the kernel's module autoloading. An explicit modprobe always works. This is intentional: it lets a user make a per-session decision without committing to a permanent config change. RISK OF RE-ENABLING ------------------- Re-enabling a module gives back its functionality at the cost of loading a module that is not IBT-sealed. The endbr64 instructions remain in the code and the CPU continues to enforce IBT at runtime; the module is otherwise identical to what the kernel would have loaded before it was disabled. The consequence depends on which module: - kvm-intel, kvm-amd. These modules provide hardware-assisted virtualization on the host that runs the hypervisor. They are needed only if this machine is going to run virtual machines itself (QEMU/KVM, libvirt, VirtualBox with KVM backend, and so on). They are not needed for AM·OS to run as a guest inside a virtual machine, which is by far the more common case. If you do intend to host VMs on this machine, without the module KVM is unavailable: /dev/kvm will not exist and QEMU will fall back to its software CPU emulator (TCG). VMs still run, but throughput is typically several times lower and CPU-bound workloads inside the guest are noticeably slower. There is no accelerated substitute in software. In that case, enable the module matching your CPU vendor: kvm-intel on Intel, kvm-amd on AMD. Otherwise leave both disabled. - Alternative cipher modules (Serpent, Twofish, CAST5, CAST6, Camellia, ARIA, SM4, Blowfish, AEGIS-128). If you configure a service or a LUKS volume to use one of these ciphers, the accelerated module is typically several times faster than the generic C fallback the kernel uses when the module is absent. The default install does not use any of them, so the default install sees no performance impact from this blacklist. If you do need one, enabling it recovers the full hardware speed. If you leave it disabled, expect the slower software path. - libsm3, libnh. Minor. These affect only specific hash usages that the default install does not rely on. - lan966x-pci. No performance aspect. The driver is either needed by your hardware or it is not. Disk encryption with AES-XTS is unaffected in every case. The AES modules are not disabled. For any normal threat model this is a small trade-off: enable what you need, leave the rest disabled. If your threat model is high, prefer to leave a module disabled and accept the functional or performance limitation it implies, rather than re-enabling code that cannot be IBT-sealed. RUNTIME SYSCTL HARDENING ------------------------ At install time AM·OS writes a single sysctl drop-in: /etc/sysctl.d/99-amos-hardening.conf AM·OS's rc.S loads it at boot via "sysctl --system", which reads /etc/sysctl.conf followed by every file under /etc/sysctl.d/ in lexical order. Files with a higher number take precedence, so the 99 prefix puts this file at the end and its values win over anything AM·OS itself ships. The settings are grouped into three tiers. Tier 1 is applied at the maximum value with no operational cost for this workload. Tier 2 is applied at the maximum value consistent with an operational server, and each entry carries a comment explaining the trade-off. Tier 3 lists settings that are deliberately left at their kernel default; enabling them would either flood the kernel log, turn a routine fault into a reboot, or break monitoring, and none of them represent a real security gain on this workload. TIER 1: MAXIMUM, NO OPERATIONAL COST ------------------------------------ Kernel information disclosure kernel.kptr_restrict = 2 Hides kernel pointer values from every reader, including root. Only perf, crash, and some BPF loaders need the values; none run on this node. kernel.dmesg_restrict = 1 Restricts the kernel ring buffer to processes with CAP_SYSLOG. kernel.perf_event_paranoid = 3 Blocks unprivileged performance profiling. kernel.kexec_load_disabled = 1 kexec is off in this kernel build; the sysctl makes it explicit. Kernel attack surface kernel.unprivileged_bpf_disabled = 2 Unprivileged BPF is permanently disabled until reboot. net.core.bpf_jit_harden = 2 Hardens the BPF JIT against spray attacks. dev.tty.ldisc_autoload = 0 Blocks the class of tty line discipline attacks exemplified by CVE-2017-2636. Filesystem integrity fs.suid_dumpable = 0 Core dumps from setuid processes are never written. fs.protected_fifos = 2 fs.protected_regular = 2 Restrict O_CREAT opens of FIFOs and regular files in world-writable sticky directories when the opener does not own the file. Prevents symlink and race attacks on /tmp. fs.protected_symlinks = 1 fs.protected_hardlinks = 1 Standard kernel defaults; pinned here for audit clarity. Address space layout vm.mmap_rnd_bits = 32 Maximum ASLR entropy on x86_64. Network hygiene net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_rfc1337 = 1 net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0 net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.icmp_ignore_bogus_error_responses = 1 net.ipv6.conf.all.accept_redirects = 0 net.ipv6.conf.default.accept_redirects = 0 net.ipv6.conf.all.accept_source_route = 0 net.ipv6.conf.default.accept_source_route = 0 net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0 net.ipv6.conf.all.router_solicitations = 0 net.ipv6.conf.default.router_solicitations = 0 net.ipv6.conf.all.autoconf = 0 net.ipv6.conf.default.autoconf = 0 net.ipv6.conf.all.use_tempaddr = 2 net.ipv6.conf.default.use_tempaddr = 2 TIER 2: MAXIMUM WITH A DOCUMENTED TRADE-OFF ------------------------------------------- kernel.yama.ptrace_scope = 3 Disables ptrace entirely, including for root and for launching a program under a debugger. This blocks strace, gdb, ltrace, and any monitoring agent that attaches to a live process. The debugging interfaces this node relies on are logs, /proc, and /sys, none of which use ptrace. If interactive debugging is ever needed, lower the value at runtime: sysctl -w kernel.yama.ptrace_scope=0 The change does not require a reboot. kernel.sysrq = 1 Enables only the sync, remount-read-only, and reboot sequences via the magic SysRq key. Value 0 would disable the feature entirely and remove the only clean way to recover a hung remote server without a power cycle. For a machine in a datacenter, SysRq S, U, B is worth keeping. user.max_user_namespaces = 0 Unprivileged user namespaces are disabled. This node runs no containers and no sandboxing that relies on them, so nothing in the workload is affected. Any process that calls clone() or unshare() with CLONE_NEWUSER will fail. This includes Podman, Docker with rootless mode, bwrap, and modern browser sandboxes. None of those run here. kernel.unprivileged_userns_clone = 0 Debian-specific patch that mirrors the setting above. Harmless on a kernel that does not carry the patch. TIER 3: DELIBERATELY NOT SET ---------------------------- These four settings are sometimes proposed as "max" hardening but are wrong for a production webhost. They are listed here so a future administrator knows they were considered and rejected. net.ipv4.conf.all.log_martians Logs every packet with an impossible source address to the kernel ring buffer. On a public interface, spoofed traffic is continuous; the log floods, the ring buffer wraps, and CPU time is spent on printk. Use a scheduled tcpdump capture for forensics instead. kernel.panic_on_oops Turns any kernel oops into an immediate panic and reboot. Sounds like fail-closed, but a single non-critical oops (filesystem quirk, driver bug) then reboots the server. On a machine with a slow BMC this can become a boot loop. You want to know about an oops and read the trace, not lose the trace to a reboot. net.ipv4.icmp_echo_ignore_all Disabling ICMP echo does not stop any attack. It only makes the host invisible to trivial discovery. It breaks every monitoring system and uptime check you will ever point at the node. If you want to rate-limit ping, do it in iptables with --limit. kernel.modules_disabled Locks module loading after boot. There is no sysctl for this; it is a kernel command-line parameter. If you want the effect, add it to /etc/lilo.conf or /etc/elilo.conf, not here. MODIFYING THE POLICY -------------------- The drop-in sets the intended values for this system. An administrator may need to adjust one to accommodate a specific workload, or to restore a value that a service has changed at runtime. The procedure: 1. As root, edit /etc/sysctl.d/99-amos-hardening.conf. 2. Apply immediately: sysctl -p /etc/sysctl.d/99-amos-hardening.conf 3. Verify: sysctl To override for a single session only: sysctl -w = The file is authoritative; the runtime value is lost at reboot. To see the difference between the file and the running kernel: sysctl -a 2>/dev/null | grep -f <(grep -oE '^[a-z0-9_.]+' \ /etc/sysctl.d/99-amos-hardening.conf) VERIFYING THE ACTIVE POLICY --------------------------- To see exactly what the kernel is using for the values this file touches: sysctl -p /etc/sysctl.d/99-amos-hardening.conf The command prints each setting as it is applied. Any line that reports an error means the kernel rejected the value, which in practice only happens if the kernel build does not carry the underlying option. To confirm that the boot path loaded the file rather than a stale copy of /etc/sysctl.conf, check the timestamps: ls -la /etc/sysctl.d/99-amos-hardening.conf sysctl kernel.kptr_restrict BOOT PARAMETERS --------------- Separate from the sysctl policy, AM·OS installs a small set of kernel boot parameters. They live in the initrd's cmdline on the installer ISO and, on the target, in /etc/lilo.conf (BIOS) or /etc/elilo.conf (EFI). The installer writes them automatically. The values: cgroup_no_v1=all Disables the cgroup v1 hierarchy and forces pure cgroup v2. Required by netmode, which uses the cgroup match in iptables to enforce per-process network policy. zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=20 Enables zswap, a compressed cache in RAM for pages that would otherwise be written to swap. lz4 is the fastest compressor available; the 20 percent cap bounds the memory the cache can consume. Performance setting, not a security one. video=1280x720-32 Console framebuffer resolution. Cosmetic. ro Root is mounted read-only at first, then remounted read-write by rc.S after the necessary checks. Standard AM·OS boot sequence. To change any of these, edit the "append" line in /etc/lilo.conf or /etc/elilo.conf and re-run lilo (BIOS) or reboot (EFI). Python and pip -------------- The AM·OS webhost ISO does not install pip by default. If you install it from the mirror (amos install python-pip), be aware that /etc/pip.conf enforces hash-checking. Every requirement must carry a --hash=sha256:... entry. Use pip-tools to generate a locked requirements file. pip install without hashes will fail by design. IMA AND INITRAMFS ARCHITECTURAL CONSTRAINTS ------------------------------------------- AM·OS enforces IMA (Integrity Measurement Architecture) appraisal (ima_appraise=enforce) to ensure that only cryptographically signed binaries are permitted to execute. However, the mainline Linux kernel's CPIO unpacker does not preserve extended attributes (including security.ima) when extracting the initial ramdisk into ramfs. Consequently, if the IMA policy attempts to appraise the ramfs, the kernel will block the execution of PID 1 (switch_root), resulting in an immediate kernel panic (exit code 127). To accommodate this kernel limitation, the AM·OS IMA policy (/etc/ima/ima-policy) must incorporate the following explicit exclusion: dont_appraise fsmagic=0x858458f6 # ramfs (initramfs) Operators regenerating the initial ramdisk must ensure this directive remains embedded within the policy file prior to packaging. Once switch_root transitions to the real root filesystem, the ramfs is discarded, and strict appraisal resumes for all subsequent execution. IMA AND SCRIPT SIGNATURES: OPERATIONAL CONSTRAINTS -------------------------------------------------- AM·OS's forked makepkg applies cryptographic signatures to ELF binaries and shell scripts..critical boot scripts, such as /etc/rc.d/rc.S, are protected by IMA. Standard Slackware doinst.sh helper functions (e.g., cat >, sed -i, or rm) will truncate the inode or replace the signed file, thereby stripping the security.ima xattr. Modifying any IMA-protected script (e.g., an /etc/rc.d file) invalidates its cryptographic signature. Because the kernel enforces appraisal at BPRM_CHECK, the modified script will be denied execution can will result in a failure to boot under strict enforcement. The AM·OS architecture provides all necessary web hosting functionality without requiring modifications to core system scripts. In the event that an administrative change to a signed file is required, two functional paths exist: 1. Global Appraisal Adjustment. Appending ima_appraise=off or ima_appraise=log to the bootloader configuration (LILO/ELILO) allows modified scripts to execute. This applies globally, disabling or downgrading the integrity guarantee for the entire system, and is typically reserved for emergency recovery. 2. Full System Rebuild. The trust chain relies on the public certificate (x509_ima.der) embedded in the initrd matching the private key used to sign the binaries. The original private key is not distributed with pre-built releases. If a custom build environment is used to generate a new private key, that new key must be accompanied by a newly generated initrd and kernel to establish the new root of trust. Consequently, modifying a signed file in a custom build environment requires rebuilding the package tree and the initrd to ensure cryptographic consistency. Note: Mainline IMA does not support excluding individual files by path in the appraisal policy. Modifications to signed files will always break the signature unless globally excluded. APPARMOR: THE SCRIPT EXECUTION MITIGATION ----------------------------------------- Mainline IMA enforces integrity on ELF binaries and shared libraries. However, it does not appraise interpreted scripts when they are invoked via an explicit interpreter path (e.g., bash script.sh, php script.php). In these scenarios, the kernel appraises the interpreter and treats the script itself as untrusted data. AppArmor serves as the mandatory compensating control for this architectural limitation. The AM·OS AppArmor profiles for application runtimes (annode-java, php-fpm, mariadbd, tor, haproxy, socat) contain strict `deny /** x` rules. Even if an attacker achieves script injection and invokes a shell via an interpreter, AppArmor prevents the interpreter from spawning subsequent shells, executing network utilities (curl, wget), or accessing sensitive filesystem paths. Note on Namespaces: AppArmor profiles for services confined within network namespaces (edge-relay, annode-ns) or chroots require the `flags=(attach_disconnected)` parameter. Without this flag, AppArmor cannot resolve filesystem paths from within the isolated namespace, and the service will fail to initialize. AppArmor file_inherit denials on /dev/pts/* from haproxy, tor, dnsmasq are expected on AM·OS. They are caused by bash's fd-255 redirection scratch fd surviving exec. The daemons do not have write access to the terminal; the denial is the kernel blocking the inherited fd. Filter with: dmesg | grep apparmor | grep -v '/dev/pts/' GUEST HARDENING ON NON-CONFIDENTIAL VPS ENVIRONMENTS ---------------------------------------------------- When AM·OS is deployed within a standard, non-confidential VPS, the provider's hypervisor retains architectural control over the hardware, including the theoretical ability to inspect guest memory. AM·OS mitigates the most viable guest-side observation vectors through strict kernel configuration: - CONFIG_DEVMEM is not set. The /dev/mem interface is entirely absent from the kernel, preventing the mapping of raw physical memory. - lockdown=confidentiality is enforced at boot. This LSM prevents even privileged guest processes from reading kernel memory via interfaces such as /proc/kcore or BPF. - transparent_hugepage=madvise is active. Edge daemons do not request huge pages (minimizing side-channel surface). Ghostnet databases (MariaDB, MongoDB) explicitly request them to optimize TLB efficiency, representing a calculated trade-off between performance and side-channel mitigation. For memory confidentiality against an untrusted hypervisor, hardware-based confidential computing (AMD SEV-SNP or Intel TDX) is required. No guest-side operating system configuration can substitute for this hardware-level guarantee. DAEMON LAUNCH HARDENING (clean-exec) ------------------------------------ When a daemon is launched directly from a shell script (for example, an rc.d script invoked from an interactive SSH session), the process inherits the shell's file descriptors, environment, and signal dispositions. This inheritance model presents several security and operational liabilities: 1. Terminal FD Leakage (AppArmor Conflicts). Interactive Bash sessions utilize file descriptor 255 internally as a scratch descriptor to save original stream states during redirection. When a daemon is exec'd from an interactive shell, fd 255 is inherited, pointing directly to the pseudo-terminal (/dev/pts/*). AppArmor, correctly identifying this as unauthorized daemon access to a TTY, logs a file_inherit denial. 2. Environment Poisoning. If the invoking environment contains variables such as LD_PRELOAD, LD_LIBRARY_PATH, or BASH_ENV, the dynamic linker will honor them during daemon initialization. In a privileged context, this represents a direct local privilege escalation vector. 3. Session Lifetime Coupling. Processes launched in the background without a new session ID remain attached to the controlling terminal's process group. If the SSH connection drops, the kernel emits SIGHUP to the session, potentially terminating the daemon. 4. Signal Disposition Inheritance. If the parent shell or script has ignored specific signals (for example, via a trap '' TERM directive), the daemon inherits that mask. Subsequent administrative attempts to stop the service via standard signals will fail silently. AM·OS mitigates these architectural gaps through the deployment of /usr/sbin/clean-exec. This hardened wrapper is utilized by all privileged rc.d scripts to launch network-facing services (HAProxy, Tor, dnsmasq, socat). The wrapper enforces the following sequence prior to execve(): - Double-fork and setsid(). This severs the process from the parent session and process group, rendering the daemon immune to terminal SIGHUP signals and ensuring it is reparented to PID 1. - File Descriptor Sanitization. Utilizing the close_range(2) syscall (or a sysconf fallback), the wrapper unconditionally closes all file descriptors from 3 to the system maximum. This guarantees that fd 255 is destroyed, eliminating AppArmor file_inherit denials without requiring /dev/pts/* exemptions in the MAC policy. - Environment Sanitization. The wrapper explicitly unsets LD_PRELOAD, LD_LIBRARY_PATH, LD_AUDIT, BASH_ENV, ENV, and IFS. The daemon is guaranteed to initialize with a pristine linker environment, neutralizing injection vectors. - Signal Mask Reset. All signal dispositions are reset to SIG_DFL (default). This guarantees that administrative stop commands function as intended. - Stream Sterilization. Standard input, output, and error (fds 0, 1, and 2) are duplicated to /dev/null. This prevents EPIPE crashes when daemons attempt to write to a disconnected terminal, and ensures no unintended data leaks to the console. Operational Usage: Scripts must invoke daemons by prepending the wrapper: /usr/sbin/clean-exec /usr/bin/tor /usr/sbin/clean-exec ip netns exec edge-relay haproxy -f ... This architectural approach allows the AppArmor profiles for Tor, HAProxy, and dnsmasq to remain strictly locked down, prohibiting any read or write access to pseudo-terminals, while simultaneously ensuring the daemons operate reliably, securely, and without logging superfluous audit noise. FURTHER READING --------------- The complete audit trail is at: /root/AUDIT.TXT It has two parts, covering two different kinds of exception. The first part is the FORTIFY exception table. This records packages where a binary was compiled with FORTIFY active, but no __*_chk wrapper appears for one or more libc calls. FORTIFY replaces calls like strcpy() with checked variants (__strcpy_chk) that refuse to overflow the destination at runtime. The absence of a wrapper normally means FORTIFY was not active at compile time, and that is what the audit flags as a gap. The entries in this table are the opposite case: FORTIFY was active, and the compiler still produced no wrapper, for one of two reasons. The first reason is that the compiler proved the call was safe and folded it to the plain function. strcpy(dst, src) where dst is a local array the compiler can size: __strcpy_chk would always pass, so it is removed. Nothing is at risk. The second reason is that the destination size is not visible at the call site. read(fd, buf, n) where buf and n are function parameters, or fgets(buf, n, f) where buf is a char * loaded from a struct: there is no compile-time object size to check against, so the compiler cannot emit a check even in principle. The check, if one were needed, would have to live in the caller's translation unit. For a shared library that means the caller's code, not the library's. In both cases the absence of the wrapper is the correct outcome, not a shortfall. These binaries are not missing a mitigation wholesale. They still have PIE, RELRO, stack canary, non-executable stack, and CET in full. Each entry in the table records the source line or disassembly that the reasoning was verified against, so the claim can be re-checked. The second part is the KO CET exception table, and it is where the decision to disable the twenty kernel modules is recorded in full. This is the more consequential of the two. The gap here is real: the module genuinely cannot be IBT-sealed, and that is why it is disabled by default. Each entry opens with a decision record listing the seven verified findings behind the decision: how the .S property gap was established (with the two-line replica that proved gcc does not emit the property for assembly input), why the module loader does not reject these modules, the per-module endbr64 counts, and how the one non-.S-shaped module (lan966x-pci) was traced to a generated .S input. Below that, one entry per module with its own reason and measured endbr64 count. The two tables are complementary, not interchangeable: - A FORTIFY exception says: the compiler produced safe code from this source, and here is the proof for each call. It is a statement about individual compilation decisions. - A KO CET exception says: the toolchain produced metadata the kernel cannot use, and here is the mechanism and the per-module evidence. It is a statement about an upstream limitation affecting an entire class of modules. Both are documented to the same standard. An entry that cannot be traced to a specific verified fact does not belong in the file. The audit tool that produced the file (audit-hardening.sh) ships on the installation ISO under /audit/ and can be run on the build host against a mounted ISO ROOT/amos64 to re-verify any entry in either table. The tool is not installed on the target system because it audits the .txz packages in the ISO tree, and those packages are not copied on the running system.