← Back to Attack Research

The Windows CLFS use-after-free: the quiet kernel driver that hands ransomware SYSTEM

CVE-2025-29824 turns a normal user account into SYSTEM through a use-after-free in clfs.sys, the logging driver almost no one thinks about and almost every Windows system loads. It was the privilege-escalation stage of a real Play ransomware intrusion. Here is the object-lifetime defect, how a dangling kernel pointer becomes a controlled write, and how to close the exposure without reproducing an exploit.

The Windows kernel driver that keeps a transaction log on behalf of other software became, in April 2025, the pry bar that turned a normal user account into SYSTEM on nearly every supported version of Windows. CVE-2025-29824 is a use-after-free in the Common Log File System driver, clfs.sys, a component almost no one thinks about and almost every Windows system loads. A low-privileged process shapes a log file so the driver frees a kernel object while still holding a pointer to it, reclaims that freed memory with attacker-influenced contents, and turns the stale reference into a controlled write into kernel memory. The payoff is the oldest one in the local-privilege-escalation playbook: overwrite the privileges on a process token and become SYSTEM. It was used in the wild as the escalation stage of a Play ransomware intrusion before Microsoft shipped the fix.

This is not a remote-entry bug, and being precise about that is the point. CVE-2025-29824 does not get an attacker onto the machine. It assumes they are already there, running code as an ordinary user, and it hands them the last thing they need: the jump from that unprivileged foothold to full SYSTEM control. That is exactly the shape of the modern ransomware kill chain, where initial access, a loader, a privilege escalation, and an encryptor are separate, swappable parts. The Common Log File System driver has become a favorite supplier of that third part. This piece explains the mechanism, why this specific driver keeps producing these bugs, and how to recognize and close the exposure without reproducing an exploit. Verifiable security.

What CLFS is, and why a logging driver runs in the kernel

The Common Log File System is a general-purpose logging engine that Microsoft ships inside Windows for other software to build on. Rather than have every application invent its own write-ahead log, CLFS offers a shared, high-performance transaction log used by databases, the kernel transaction manager, and various system services. The data lives in base log files, on-disk structures carrying the .blf extension, which describe the layout of the log: its regions, its record blocks, and the metadata that ties them together.

The architectural fact that matters is that clfs.sys, the driver that parses and manages these structures, runs in kernel mode. It has to. A logging service that other kernel components depend on cannot live entirely in user space. That means the code that reads a base log file's layout, allocates the in-memory objects that mirror it, and frees them when they are no longer needed executes with kernel privilege. Any memory-safety mistake in that code is therefore not an application crash, it is a flaw at the most privileged layer of the operating system. And because a base log file is, in the end, a file, its structure is data that an attacker with local access can influence.

The defect: a reference that outlives its object

CVE-2025-29824 is a use-after-free, catalogued as CWE-416. The mechanism of every use-after-free is the same: a piece of memory is freed and returned to the allocator, but a pointer to that memory keeps existing and is used again later. Between the free and the reuse, the allocator is free to hand the same memory out to satisfy a different request. If an attacker can arrange for their own data to land in that reclaimed memory, then the moment the stale pointer is dereferenced, the code operates on attacker-controlled bytes while believing it is operating on the original, trusted object.

In this case the object lives inside clfs.sys and is created while the driver processes a base log file. Microsoft describes the root cause as improper handling of memory objects during the processing of CLFS base log file structures: the driver frees an allocation tied to the log's layout while a reference to it survives elsewhere in the driver's state. By manipulating the layout of the log file, an attacker influences the sequence of allocations and frees so that the freed region is reused with contents they control. When the driver later follows the dangling reference, it reads or writes through a pointer that now points at attacker-shaped data. That is the corruption primitive. Everything after it is a matter of turning a controlled corruption inside kernel memory into a controlled outcome.

CVE-2025-29824 · CLFS USE-AFTER-FREE · CWE-416 low-priv process --> crafted .blf base log file --> clfs.sys parses layout | driver frees a log-structure object | (dangling but a reference to it survives <-----------------+ pointer lives) | heap grooming reclaims the freed slot --> reused memory holds attacker data | driver dereferences the stale pointer --> controlled write into KERNEL memory | overwrite the privileges on a process token --> normal user becomes SYSTEM precondition: attacker already runs code as a normal local user this is a post-compromise ESCALATION step, not a remote entry point

One data file influences a kernel object's lifetime, the lifetime bug becomes a write, and the write becomes SYSTEM. Illustrative, not from any specific host.

From dangling pointer to SYSTEM

A memory-corruption primitive in the kernel is powerful but not automatically a win. The attacker has to convert it into something durable, and the well-worn route on Windows is a token privilege overwrite. Every process on Windows carries an access token that records its security context: the user it runs as and the privileges it holds. SYSTEM-level processes carry tokens with the full set. A local privilege escalation succeeds when an unprivileged process can make its own token look like a privileged one.

The generalized path that public analyses describe for CVE-2025-29824 has three stages. First, trigger the free while keeping the dangling reference alive, by driving CLFS through the operations that manipulate a crafted base log file. Second, groom the kernel heap so the freed allocation is immediately reclaimed by an object the attacker controls, so the reused memory holds bytes of their choosing rather than whatever the allocator would otherwise place there. Third, let the driver use the stale pointer, so the controlled contents steer a write to a chosen kernel address. With a controlled write, the attacker overwrites the privilege fields, or the token pointer, associated with a process they own, and that process is now SYSTEM. From there the loader that delivered the exploit can spawn payloads with full control of the machine.

We describe these stages at the level of mechanism, not as a recipe. The heap-grooming and token-overwrite specifics here are generalized from public write-ups, not lifted from a released proof of concept, and the point of stating them is to make the severity legible, not to hand anyone a build. What matters for a defender is the shape: a data file influences a kernel object's lifetime, the lifetime bug becomes a write, and the write becomes SYSTEM.

A logging driver almost no one thinks about, loaded by almost every Windows system, became the reliable last step from ordinary user to SYSTEM.

Where this was actually used: PipeMagic and Play ransomware

CVE-2025-29824 is not a theoretical finding. Microsoft reported it as a zero-day exploited in the wild before the April 8, 2025 patch, and CISA added it to the Known Exploited Vulnerabilities catalog the same day. Microsoft attributes the activity to the actor it tracks as Storm-2460, which used a loader and backdoor known as PipeMagic to run the CLFS exploit. In the observed intrusions the loader was staged through legitimate Windows binaries, with dllhost.exe hosting injected code and the built-in certutil utility used to fetch a payload, a living-off-the-land pattern that keeps the early stages quiet. Once the exploit granted SYSTEM, the operators deployed Play ransomware.

Read that chain back and the role of this bug is clear. Initial access got the actor onto the host as some ordinary user. PipeMagic gave them a controllable presence. CVE-2025-29824 supplied the privilege jump. Play ransomware was the monetization. The CLFS use-after-free is the load-bearing middle: without a reliable local escalation, an unprivileged foothold cannot reach the domain-wide, high-privilege actions that make a ransomware event catastrophic rather than contained. That is why this class of bug is so valuable to these crews, and why an escalation-only vulnerability with no remote component still earned an emergency spot on the exploited list.

Scope, and one correction worth making

Be precise about reach. The CVSS 3.1 base score is 7.8, with the vector AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H: local attack vector, low complexity, low privileges required, no user interaction, and high impact to confidentiality, integrity, and availability. The affected set is broad, spanning Windows 10 across its servicing baselines, Windows 11 in the 22H2 and 23H2 families, and Windows Server from 2008 R2 SP1 through 2025. Microsoft reported that Windows 11, version 24H2 was not exploitable via the observed technique, though it is still serviced by the update. Low privileges required and a local vector are the load-bearing qualifiers: this is a machine that you, or an intruder, already have a normal account on, not an internet-facing service.

One correction is worth stating plainly, because it circulated in early summaries. Some aggregator write-ups attributed the flaw to a race condition in W32PROCESS handling reached through WaitForInputIdle. That description is unverified and does not match the vendor and independent analysis. The defect Microsoft and independent researchers describe is an object-lifetime bug in the handling of CLFS base log file structures, a use-after-free in clfs.sys, not a graphics-subsystem race. Getting the root cause right matters, because it decides what to look for and which write-ups to trust. We do not repeat aggregator claims we cannot ground in primary analysis.

How to recognize and close the exposure

You do not need to reproduce the exploit to manage this risk, because the exposure is decided by a few readable facts, none of which require running a malicious base log file.

Find and close CVE-2025-29824 on your Windows fleet

How Celvex catches this

Find. Prove. Fix. Verify.

Find

A read-only inventory of your Windows hosts and servers fingerprints each build and patch level and cross-references it against the public known-exploited catalog, surfacing any system still exposed to CVE-2025-29824 without sending an exploit.

Prove

An exposed, KEV-listed build becomes an Ed25519-signed Proof Capsule carrying the host, the version and patch evidence, and the matching catalog entry, reproducible offline by you or your auditor.

Fix

The capsule's remediation block names the step: apply the April 8, 2025 Patch Tuesday update, and tighten EDR and attack-surface-reduction coverage on the host.

Verify

A fresh sweep confirms the patch is present and the exposure is closed. The finding closes and the verified-fix event is recorded for the audit trail.

The lesson of CVE-2025-29824 is not that clfs.sys is uniquely broken, though it has a long history of these bugs. It is that the kernel attack surface includes components no one lists as security-critical, quiet infrastructure like a logging driver that nonetheless runs with full privilege and parses attacker-influenceable data. Ransomware operators have already internalized this. The defense is unglamorous and effective: patch on the catalog's clock, watch the staging patterns, and treat local privilege escalation as the load-bearing link it is, not an afterthought behind the perimeter.

Verifiable security. Find it. Prove it. Fix it. Verify the fix held. That is what we ship.

Sources

Is CVE-2025-29824 still open anywhere on your Windows fleet?

Free Exposure Check, no signup required. We fingerprint your Windows hosts and servers against the April 2025 patch level and the known-exploited catalog, then ship a signed Proof Capsule for the highest-confidence finding.

Run a Free Scan →