← All rules
SOCLE-CLD-KRN-011// Kernel command lineloweffective runtime

Enable Kernel Page-Table Isolation (KPTI)

Requires the pti=on kernel boot parameter to force Kernel Page-Table Isolation, mitigating Meltdown and protecting KASLR.

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.

A pass proves✓ running now✓ on disk✓ survives rebootthe qualified verdict →
Debian 12CIS 1.1.0Debian 13CIS 1.0.0FedoraRHEL 10 / Rocky 10 / AlmaLinux 10RHEL 8 / Rocky 8 / AlmaLinux 8CIS 4.0.0RHEL 9 / Rocky 9 / AlmaLinux 9CIS 2.0.0Ubuntu 22.04CIS 3.0.0Ubuntu 24.04CIS 1.0.0Ubuntu 26.04
One check, maps to 2 standards

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

Kernel Page-Table Isolation (KPTI) keeps the kernel's page tables separate from user-space ones, so a user process can no longer read kernel memory through the Meltdown (CVE-2017-5754) side channel. It also strengthens the kernel against attempts to defeat KASLR by leaking kernel addresses. Forcing pti=on ensures the mitigation is active even on CPUs where the kernel might otherwise auto-disable it.

What Pavois checks

Pavois reads the live kernel command line from /proc/cmdline and checks for pti=on. This is the boot line the running kernel parsed, not /etc/default/grub, a GRUB edit never regenerated would pass a file scan while PTI is still off. You can confirm the actual mitigation status via /sys/devices/system/cpu/vulnerabilities/meltdown.

describe command('cat /proc/cmdline') do
  its('stdout') { should match(/(^| )pti=on( |$)/) }
end
describe command("grep -hwsF 'pti=on' /etc/default/grub /etc/kernel/cmdline /boot/grub/grub.cfg /boot/grub2/grub.cfg /boot/efi/EFI/*/grub.cfg 2>/dev/null") do
  its('stdout') { should match(/\S/) }
end

How to verify it is applied

Run cat /proc/cmdline and confirm it contains pti=on. Confirm the mitigation is active with:

cat /sys/devices/system/cpu/vulnerabilities/meltdown

Expected output reports Mitigation: PTI.

Inspect & investigate

Mitigation state is exposed under sysfs: cat /sys/devices/system/cpu/vulnerabilities/meltdown. The kernel also logs PTI at boot, dmesg | grep -iE 'page table isolation|pti' or journalctl -k | grep -i pti.

Remediation

pavois harden apply uses the kernel_cmdline resource to add pti=on to the bootloader configuration and regenerate it, so the option is present on next boot. A reboot is required to take effect.

Pavois applies this with its own harden engine, the plan below, not a shell script:

parampti=on
reboot_requiredtrue
resourcekernel_cmdline
pavois harden plan local

where the target is local, a user@host SSH alias, or a container , Docs

Impact & precautions

KPTI adds a measurable performance cost for syscall-heavy workloads (extra TLB flushes on kernel/user transitions), historically up to ~5-30% for I/O-bound or syscall-intensive applications. Precautions:

  • Benchmark databases, high-IOPS storage and proxies before enabling fleet-wide.
  • On CPUs not affected by Meltdown, forcing pti=on pays the cost without added security; weigh per platform.
  • Applies after reboot only, schedule a maintenance window.

Standards mapping

StandardReferenceTypeVersionConfidence
ANSSI BP-028R8direct2.0high
NISTSI-16supporting800-53 Rev 5 · 800-171 Rev 2 (pinned)medium

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.

Sources & references