Introduction
In the complex landscape of cybersecurity, the integrity of kernel-mode drivers remains the final line of defense between a restricted user-mode process and the total compromise of a Windows operating system. A recent deep-dive investigation into Avast’s kernel driver architecture has unveiled a critical vulnerability, cataloged as CVE-2025-13032. This security flaw, a double-fetch vulnerability, provided researchers with a gateway to execute arbitrary code within the Windows kernel.
This report, the culmination of a two-part research initiative, explores the sophisticated mechanics required to turn a memory-corruption bug into a full Local Privilege Escalation (LPE) on a fully patched Windows 11 system. By navigating the intricacies of the Windows Paged Pool and the modern I/O Ring object, the researchers successfully demonstrated how to bypass system protections to achieve SYSTEM-level access.
The Vulnerability: A Double-Fetch in the Kernel
At the heart of the exploit lies a classic "double-fetch" bug. The vulnerability resides within the Avast kernel driver, which failed to properly synchronize the processing of user-supplied data.
The Mechanism of Failure
The driver was designed to handle _UNICODE_STRING structures provided by userland. The vulnerability occurs because the driver fetches the Length field of the user input twice. During the first fetch, the driver reads the Length to allocate a kernel buffer via ExAllocatePoolWithTag. However, a subsequent fetch—performed immediately before a memmove operation—re-reads the Length field.
By running a secondary, malicious thread in a tight loop, an attacker can toggle the Length value between a legitimate small size and a large, malicious value. If the timing is perfect, the kernel allocates a small buffer based on the first, "safe" read, but then attempts to copy a massive amount of data based on the second, "malicious" read. This results in a heap-based pool overflow, allowing the attacker to overwrite adjacent data structures in the Windows PAGED_POOL.
Chronology of the Exploit
Exploitation of such a flaw is not instantaneous; it requires a precise, multi-stage choreography to ensure stability and success.
Phase 1: Heap Spraying and Corruption
The Windows Paged Pool is a volatile region where kernel objects are grouped by size. To ensure the overflow successfully targets a sensitive object, the researchers employed a "heap spray" technique. By allocating a vast number of RegBuffers structures—part of the I/O Ring object—the researchers created a predictable memory landscape. By selectively deallocating some of these objects, they created "holes" in the memory. The goal was to ensure the vulnerable _UNICODE_STRING buffer landed precisely adjacent to a critical RegBuffers pointer.
Phase 2: Redirecting the I/O Ring
The I/O Ring object, introduced in modern Windows, serves as an efficient way to manage asynchronous I/O. Its RegBuffers field is an array of pointers to _IOP_MC_BUFFER_ENTRY structures. By using the pool overflow to corrupt one of these pointers, the researchers redirected the kernel to a fake buffer entry controlled by the user. Because Windows lacks Supervisor Mode Access Prevention (SMAP), the kernel can blindly dereference user-mode pointers, turning this redirection into a powerful arbitrary read/write primitive.
Phase 3: Leaking and Privilege Escalation
With the primitive in place, the team needed a kernel address to target. By triggering an I/O operation, the kernel automatically generated a Memory Descriptor List (MDL) for the fake buffer. By reading the Mdl field of the corrupted entry, the researchers were able to locate the _EPROCESS structure of their own process. Once the _EPROCESS pointer was identified, the final step was simple: swap the process’s current security token with the SYSTEM token, effectively elevating the process to the highest level of privilege on the system.
Supporting Technical Data
The efficacy of this exploit is heavily reliant on how the Windows kernel manages memory and object metadata.

The Role of the Paged Pool
The Paged Pool is ideal for exploitation because it is susceptible to heap spraying. Unlike the Non-Paged Pool, which is reserved for high-priority, non-swappable tasks, the Paged Pool is designed for objects that can be moved to disk. This makes it an ideal playground for attackers who need to manipulate memory layouts.
The I/O Ring Advantage
The I/O Ring object is particularly attractive for exploitation for three reasons:
- Controllable Allocation: The size of the
RegBuffersarray is user-controlled, allowing for precise alignment within the heap. - Simplified Primitive: Corrupting a single pointer in the array grants full read/write access.
- Established Precedent: Previous research has validated the I/O Ring as a reliable target for kernel exploitation, providing a roadmap for overcoming complex memory structures.
Repairing the Damage
A successful exploit is worthless if the system crashes immediately afterward. Because the heap corruption altered the ProcessBilled field (a value used by the kernel to track which process owns a chunk of memory), the researchers had to calculate and write back the correct, obfuscated ProcessBilled value using their newly acquired read/write primitive. Failure to do so would result in a "Blue Screen of Death" (BSOD) during the cleanup phase.
Official Responses and Remediation
Upon discovery, the vulnerability was reported through standard disclosure channels. Avast has since issued a patch to address the underlying driver flaw.
Mitigation
Modern versions of the Windows kernel have introduced "user-mode accessors," which act as a verification layer. These accessors ensure that every attempt by the kernel to access user-mode memory is validated, effectively nullifying the double-fetch technique described here. Users are strongly urged to update their Avast antivirus software to the latest version to ensure they are protected against this and other potential kernel-level threats.
Implications for System Security
The exploitation of CVE-2025-13032 serves as a stark reminder of the risks associated with third-party kernel drivers.
The "Trusted" Vulnerability
Antivirus drivers run at the highest privilege levels, often with more access than the operating system kernel itself. When such a driver contains a vulnerability, it effectively bypasses every security control the operating system has in place. The transition from a sandbox escape to a kernel-level exploit demonstrates that security is only as strong as its weakest link.
The Evolution of Defense
The requirement for sophisticated techniques like heap spraying and MDL manipulation highlights the growing difficulty of writing successful kernel exploits. Windows 11 continues to harden its memory management, and the introduction of mitigations like user-mode accessors demonstrates a concerted effort to close the window on these types of "double-fetch" and "time-of-check to time-of-use" (TOCTOU) vulnerabilities.
Final Thoughts
This research does more than just disclose a bug; it provides a comprehensive look at the modern exploitation lifecycle. It illustrates the transition from a simple logic error in a driver to the manipulation of complex kernel objects like I/O Rings. For security researchers, it provides a blueprint for how to approach kernel-mode targets. For users and system administrators, it reinforces the necessity of maintaining a rigorous patching schedule, especially for security-critical software that resides at the kernel level.
The full details regarding the discovery of the vulnerability and the initial sandbox escape can be found in the first part of this research series on the official SafaTeam intelligence hub. As security researchers continue to push the boundaries of what is possible within the Windows architecture, the ongoing dialogue between vulnerability discovery and system hardening remains the most vital component of the cybersecurity ecosystem.

