Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Kernel Hardening

Direct answer

Linux Kernel Hardening reduces kernel exploitation and persistence through supported mitigations, memory protections, module and debug restrictions, lockdown/verified boot relationships, secure sysctl policy, attack-surface reduction and timely kernel/firmware updates.

When to use this

Use it when configuring, checking or troubleshooting Kernel Hardening in Linux Security.

First 30 seconds

1. Kernel hardening: sysctls, lockdown, module signing, disable unused modules.

2. Restrict ptrace, BPF, dmesg, kptrs.

3. Keep kernel patched (livepatch).

4. Blacklist rare filesystems/protocols.

5. Use distro hardening guides.

Operational verification

kernel settings → reduced attack surface

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

An enabled mitigation reduces a defined technique or interface under assumptions; it does not remove vulnerabilities or show kernel/runtime integrity.

Suspicious evidence: unsupported sysctl, mitigation disabled by boot flag, unsigned module path, debug interface exposed, unprivileged namespace risk, patch pending reboot, livepatch assumption or performance workaround weakens control.

Platform / version applicability
Platform and workload security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformPlatform and workload security
Scope / prerequisiteUse it when configuring, checking or troubleshooting Kernel Hardening in Linux Security.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

hardware/firmware boot → kernel build/config/signature → boot parameters/LSMs/lockdown → runtime mitigations and exposed interfaces → process/device activity → logs/workload → patch/reboot verification

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Kernel hardening parameter set ≠ compiled feature supported or effective.
  • Mitigation enabled ≠ kernel vulnerability patched or exploitation impossible.
  • Configuration file present ≠ parsed, loaded and effective runtime state.
  • One allow/deny result ≠ complete DAC, privilege, LSM, firewall and application outcome.
Key checks
  • sysctl kernel.kptr_restrict kernel.dmesg_restrict kernel.unprivileged_bpf_disabled kernel.yama.ptrace_scope — hardening sysctls
  • cat /sys/kernel/security/lockdown — lockdown mode
  • grep -E 'CONFIG_(STACKPROTECTOR|FORTIFY)' /boot/config-$(uname -r) — build options
ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

An enabled mitigation reduces a defined technique or interface under assumptions; it does not remove vulnerabilities or show kernel/runtime integrity.

In depth

Kernel hardening restricts kernel features and settings that attackers abuse for privilege escalation, information leaks or network attacks. Most is done with sysctl parameters, boot options and module restrictions.

# /etc/sysctl.d/90-hardening.conf
kernel.kptr_restrict = 2
kernel.dmesg_restrict = 1
kernel.unprivileged_bpf_disabled = 1
kernel.yama.ptrace_scope = 1
fs.protected_symlinks = 1
fs.protected_hardlinks = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.tcp_syncookies = 1
sysctl --system

Also keep the kernel patched (live patching services reduce reboot pressure), disable unused kernel modules (install usb-storage /bin/false), and enable Secure Boot with module signing where possible. Test settings with the applications you run.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docPlatform and workload security current

Authoritative/upstream documentation reviewed for bounded claims in Linux Security → Kernel Hardening. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.kernel.org/security/ · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
Linux kernel securitykernel self-protectionLinux kernel hardening
Embedded reference data

Quick lookup tables

Linux Security → Kernel Hardening proof map

Fast scope, effective-state, runtime-evidence and closure boundaries for Linux Security → Kernel Hardening.

BoundaryEstablishDoes not establish
ScopeExact host, role, build/kernel, identity, workload and expected controlDoes not prove policy receipt or effective runtime state
Effective stateResultant/loaded policy, precedence, mode, labels/rules/keys and active services/kernel controlsConfiguration presence does not prove enforcement
Runtime evidenceCorrelated events/audit, process/token/credential, packet/syscall and workload resultOne event, clean status or allow/deny does not prove complete security
ClosureOriginal allowed/denied workload works, unsafe state is removed and recovery/regression passCommit, restart, block or compliance result alone is not closure
Confirmation

Confirm action

Continue?