Enable poison without sanity check
Requires the running kernel to be built with CONFIG_PAGE_POISONING_NO_SANITY=y so freed pages are still poisoned but the costly verify-on-alloc check is skipped.
Checked against the resolved running state (e.g. sshd -T, sysctl, systemctl show), catches drop-ins and Includes a file read would miss. Caveat: runtime ≠ persistence; a value correct now may not survive a reboot.
Pavois asserts the effective configuration, the live, resolved state, not a file. File-based scanners (OVAL/SCAP, Lynis) miss Includes, drop-ins and runtime defaults; this check sees what is actually applied.
A mapping is a cross-reference to where each standard places this requirement, anchored and cross-validated, not a claim of equivalence. A passing check is evidence toward these references, how to read it.
Why this rule matters
Page poisoning normally writes a pattern on free and verifies that pattern on the next allocation (the sanity check), to catch corruption. That verification read doubles the cost. CONFIG_PAGE_POISONING_NO_SANITY=y keeps the security benefit, freed memory is still overwritten so secrets are destroyed, while skipping the verification read, cutting the performance overhead so poisoning stays viable on production systems.
What Pavois checks
Pavois reads the build-time config of the running kernel via /boot/config-$(uname -r), falling back to /proc/config.gz, so the result reflects the booted kernel. Pavois expects CONFIG_PAGE_POISONING_NO_SANITY=y.
describe command("C=/boot/config-$(uname -r); if [ -r \"$C\" ]; then cat \"$C\"; elif zcat /proc/config.gz 2>/dev/null | head -1 | grep -q .; then zcat /proc/config.gz; else echo PAVOIS_NO_KERNEL_CONFIG; fi | grep -E '^(CONFIG_PAGE_POISONING_NO_SANITY=|PAVOIS_NO_KERNEL_CONFIG)'") do
its('stdout') { should_not match(/PAVOIS_NO_KERNEL_CONFIG/) }
its('stdout') { should match(/^CONFIG_PAGE_POISONING_NO_SANITY=y$/) }
endHow to verify it is applied
Run grep '^CONFIG_PAGE_POISONING_NO_SANITY=' /boot/config-$(uname -r) (or zcat /proc/config.gz | grep '^CONFIG_PAGE_POISONING_NO_SANITY='). Expected output: CONFIG_PAGE_POISONING_NO_SANITY=y.
Inspect & investigate
This is a tuning sub-option of page poisoning, so it has no dedicated log line. Confirm poisoning is active via dmesg | grep -i poison, journalctl -k and cat /proc/cmdline (look for page_poison=1).
Remediation
No automated remediation: CONFIG_PAGE_POISONING_NO_SANITY is a kernel build-time option and cannot be toggled at runtime. It depends on CONFIG_PAGE_POISONING also being enabled. Use a distribution kernel that sets it, or rebuild. Apply manually; pavois harden apply cannot change a compiled-in setting.
Pavois applies this with its own harden engine, the plan below, not a shell script:
| resource | kernel_build |
|---|
pavois harden plan localwhere the target is local, a user@host SSH alias, or a container , Docs
Impact & precautions
Disabling the sanity check trades a corruption-detection diagnostic for speed; the security benefit of overwriting freed memory is preserved. The only real downside is losing an early-warning signal for memory corruption, which matters more in debugging than in production. There is no runtime breakage risk and no lockout concern, it is a compile-time tuning flag. Note it only takes effect when CONFIG_PAGE_POISONING is also enabled.
Standards mapping
| Standard | Reference | Type | Version | Confidence |
|---|---|---|---|---|
| ANSSI BP-028 | R17 | direct | 2.0 | high |
Each reference is a cross-reference anchored in the upstream benchmark and cross-validated against the SCAP Security Guide and ansible-lockdown, not a claim of equivalence. Direct = a prescriptive, line-level requirement; supporting = an abstract control family (NIST) the check provides evidence toward. How to read a mapping.