Many hosting teams treat file integrity monitoring (FIM) as a catch-all tripwire for compromise. The logic sounds solid: if an attacker modifies a binary, config file, or library, FIM detects the hash change and fires an alert. But kernel-level memory exploits like Copy Fail (CVE-2026-31431) do not play by those rules. They manipulate data through the page cache — the layer of memory where Linux keeps recently-read file contents — without ever writing a changed byte back to the physical disk. FIM never sees a thing.
This is not a theoretical gap. It is a fundamental mismatch between what FIM watches and where these exploits operate.
What FIM actually monitors
FIM tools — AIDE, OSSEC, Tripwire, and similar — work by computing cryptographic hashes (typically SHA-256) of files on disk, then comparing those hashes against a stored baseline. Some also track metadata: permissions, ownership, timestamps, file size. When a hash or attribute changes, the tool raises an alert.
The key phrase is "on disk." FIM reads the file from the filesystem, hashes it, and compares. It does not inspect what is happening in memory. It does not watch the page cache. It does not monitor how a running process perceives a file's contents. FIM answers one question: "Has the on-disk copy of this file changed since the last check?"
For traditional attacks — someone replacing /usr/sbin/sshd with a backdoored binary, injecting a malicious line into /etc/passwd, or dropping a webshell into a document root — that question is exactly right. The attacker modifies a file, FIM catches it.
Page-cache exploits ask a different question entirely.
How page-cache exploits bypass disk entirely
Linux does not read files from disk every time a process needs them. Instead, it keeps frequently-accessed file data in the page cache, a region of kernel-managed memory. When a process reads /etc/passwd, the kernel checks whether those pages are already cached in RAM. If they are, the disk is never touched.
Exploits in this category — Dirty Pipe (CVE-2022-0847) was the well-known predecessor, and Copy Fail (CVE-2026-31431) targets a similar surface — abuse flaws in how the kernel handles page-cache entries. The attack flow, simplified:
- Attacker opens a file they can read (say, a SUID binary or a sensitive config file).
- Through a kernel bug (in Copy Fail's case, related to memory management page-cache handling), the attacker overwrites the cached pages of that file in memory.
- Any process that subsequently reads that file gets the attacker's modified version — from the page cache.
- The on-disk file remains untouched.
Because FIM hashes the on-disk file, it sees no change. The baseline matches. No alert fires. Meanwhile, a SUID binary might now contain injected code that grants root, or a config file might have an extra user entry — but only in memory.
This is why the research context around Copy Fail and similar LPE (local privilege escalation) vulnerabilities specifically notes that they "leave minimal traces on disk, making traditional integrity monitoring difficult."
Why polling frequency does not fix this
A common reaction: "What if I run FIM checks more frequently? Every minute instead of every hour?" It does not help. The on-disk file never changes. You could hash it a thousand times per second and get the same result every time. The corruption exists only in the page cache, which FIM does not read from (and even if it did, it would get the cached — corrupted — version, which would then not match the baseline, but that is not how FIM tools are designed to operate).
Another reaction: "What about real-time FIM using inotify or fanotify?" These kernel interfaces notify userspace when filesystem events occur — file opens, writes, attribute changes. But page-cache exploits do not trigger filesystem write events. The write happens inside kernel memory management, not through the VFS (virtual filesystem) write path. No IN_MODIFY event fires. No fanotify notification. The filesystem layer genuinely does not know anything changed.
What to monitor instead: process behavior
Since disk-based detection fails here, detection shifts to observing what happens after exploitation. A successful page-cache LPE typically produces observable process-level anomalies:
- Unexpected privilege transitions. A process running as an unprivileged user suddenly spawns a child process running as root. Or
/usr/bin/sugets invoked by a process that has no business calling it. - Unusual parent-child process trees. A web server worker spawning
/bin/bashas root. A PHP process forking a process that writes to/etc/shadow. - Suspicious syscall patterns. Heavy use of
splice(),sendfile(), or specificioctl()calls against file descriptors in patterns that match known exploit chains. - New network listeners or outbound connections from processes that should not have them.
The Linux audit subsystem (auditd) can catch several of these. For example, to log every time a process changes its effective user ID to root (UID 0):
# Log execve calls where the effective UID becomes 0 (root)
auditctl -a always,exit -F arch=b64 -S execve -F euid=0 -F auid!=0 -k priv_escalation
This rule says: log every execve (program execution) syscall on 64-bit systems where the effective UID is 0 but the audit UID (the original login UID) is not 0. That catches the moment an unprivileged user's process starts executing something as root — exactly what a successful LPE produces.
To make this persistent across reboots, add it to /etc/audit/rules.d/ (the exact file and path depend on your distribution and auditd version).
For broader runtime detection, tools like Falco (an open-source runtime security project) watch syscalls in real time and match them against rules. A rule detecting unexpected shell spawns from system binaries might look like:
# Illustrative Falco rule - syntax may vary by version
- rule: Unexpected shell from system binary
desc: Detect shell spawned by a system binary that should not spawn shells
condition: spawned_process and shell_procs and proc.pname in (sshd, httpd, nginx, php-fpm)
output: "Shell spawned by system binary (user=%user.name parent=%proc.pname command=%proc.cmdline)"
priority: WARNING
This is illustrative — actual Falco macros like spawned_process and shell_procs need to be defined or come from default rulesets. The point is that detection moves from "did a file change on disk" to "is a process doing something it should not."
Patching is still the primary defense
Process-behavior monitoring is a detection layer, not a prevention layer. For kernel LPE vulnerabilities like Copy Fail, the primary defense remains patching the kernel. Monitor security advisories from your Linux distribution (Red Hat, Ubuntu, Debian, SUSE, Amazon Linux, or whichever you run) and apply patched kernel packages as soon as they are available.
After patching, verify the running kernel actually includes the fix. Running uname -r alone is not sufficient — the version string does not always tell you which specific CVE patches are included. For a deeper look at why, and how to check the changelog instead, see Thinking uname -r Proves You're Patched Against a Kernel LPE? Check the Changelog.
If you need to understand how Copy Fail's mechanics compare to earlier page-cache exploits like Dirty COW or Dirty Pipe, and whether that difference affects your patch urgency, Dirty COW vs Copy Fail: Which Kernel LPE Mechanics Matter for Your Patch Decision? covers that comparison.
Layering detection correctly
FIM is not useless. It remains valuable for catching traditional file-based compromises: backdoored binaries, modified configs, planted webshells, unauthorized SSH key additions. Keep it running. But stop treating it as a kernel-exploit detector.
A practical layered approach for a hosting environment:
- FIM for disk-based changes to critical files (
/etc/passwd,/etc/shadow,/usr/sbin/sshd, web document roots, cron directories). - auditd rules for privilege escalation events — the
execverule above is a starting point. Also consider watching writes to sensitive files like/etc/ld.so.preload(a common persistence mechanism after kernel exploits). - Process-tree monitoring through Falco, Sysdig, or similar runtime tools, watching for anomalous parent-child relationships.
- Kernel patching as the actual fix, with changelog verification rather than version-string assumptions.
Each layer covers a different attack surface. FIM covers disk. Auditd and process monitors cover runtime behavior. Patching removes the vulnerability. No single layer covers everything, and assuming FIM handles kernel exploits leaves a gap exactly where these attacks operate.
The takeaway is straightforward: FIM watches files. Page-cache exploits do not touch files. If your detection strategy for kernel LPE starts and ends with file hashing, you have a blind spot in the exact place these vulnerabilities exploit. Add process-behavior monitoring, keep your kernels patched, and verify those patches are actually running.