CVE-2025-24985 — Windows Fast FAT File System Driver Remote Code Execution Vulnerability
Executive Summary
Integer overflow or wraparound in Windows Fast FAT Driver allows an unauthorized attacker to execute code locally.
Overview
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
EPSS Score
Affected Products
| Product | KB Article | Severity | Impact | Restart Required |
|---|---|---|---|---|
| Windows 10 for 32-bit Systems | 5053618 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 10 for x64-based Systems | 5053618 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 10 Version 1607 for 32-bit Systems | 5053594 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 10 Version 1607 for x64-based Systems | 5053594 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 10 Version 1809 for 32-bit Systems | 5053596 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 10 Version 1809 for x64-based Systems | 5053596 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 10 Version 21H2 for 32-bit Systems | 5053606 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 10 Version 21H2 for ARM64-based Systems | 5053606 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 10 Version 21H2 for x64-based Systems | 5053606 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 10 Version 22H2 for 32-bit Systems | 5053606 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 10 Version 22H2 for ARM64-based Systems | 5053606 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 10 Version 22H2 for x64-based Systems | 5053606 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 11 Version 22H2 for ARM64-based Systems | 5053602 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 11 Version 22H2 for x64-based Systems | 5053602 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 11 Version 23H2 for ARM64-based Systems | 5053602 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 11 Version 23H2 for x64-based Systems | 5053602 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows 11 Version 24H2 for ARM64-based Systems 5053598 (Security Update) 5053636 (SecurityHotpatchUpdate) Important Remote Code Execution 5051987 5052105 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 10.0.26100.3476 10.0.26100.3403 Yes None Windows 11 Version 24H2 for x64-based Systems 5053598 (Security Update) 5053636 (SecurityHotpatchUpdate) Important Remote Code Execution 5051987 5052105 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 10.0.26100.3476 10.0.26100.3403 Yes None Windows Server 2008 for 32-bit Systems Service Pack 2 5053888 (Monthly Rollup) 5053995 (Security Only) Important Remote Code Execution 5052038 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.0.6003.23168 Yes None Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation) 5053888 (Monthly Rollup) 5053995 (Security Only) Important Remote Code Execution 5052038 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.0.6003.23168 Yes None Windows Server 2008 for x64-based Systems Service Pack 2 5053888 (Monthly Rollup) 5053995 (Security Only) Important Remote Code Execution 5052038 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.0.6003.23168 Yes None Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation) 5053888 (Monthly Rollup) 5053995 (Security Only) Important Remote Code Execution 5052038 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.0.6003.23168 Yes None Windows Server 2008 R2 for x64-based Systems Service Pack 1 5053620 (Monthly Rollup) 5053627 (Security Only) Important Remote Code Execution 5052016 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.1.7601.27618 Yes None Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation) 5053620 (Monthly Rollup) 5053627 (Security Only) Important Remote Code Execution 5052016 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.1.7601.27618 Yes None Windows Server 2012 | 5053886 (Monthly Rollup) |
Important | Remote Code Execution | Yes |
| Windows Server 2012 (Server Core installation) | 5053886 (Monthly Rollup) |
Important | Remote Code Execution | Yes |
| Windows Server 2012 R2 | 5053887 (Monthly Rollup) |
Important | Remote Code Execution | Yes |
| Windows Server 2012 R2 (Server Core installation) | 5053887 (Monthly Rollup) |
Important | Remote Code Execution | Yes |
| Windows Server 2016 | 5053594 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows Server 2016 (Server Core installation) | 5053594 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows Server 2019 | 5053596 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows Server 2019 (Server Core installation) | 5053596 (Security Update) |
Important | Remote Code Execution | Yes |
| Windows Server 2022 5053603 (Security Update) 5053638 (SecurityHotpatchUpdate) Important Remote Code Execution 5051979 5052106 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 10.0.20348.3328 10.0.20348.3270 Yes None Windows Server 2022 (Server Core installation) 5053603 (Security Update) 5053638 (SecurityHotpatchUpdate) Important Remote Code Execution 5051979 5052106 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 10.0.20348.3328 10.0.20348.3270 Yes None Windows Server 2022, 23H2 Edition (Server Core installation) | 5053599 (Security Update) |
Important | Remote Code Execution | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5053618 |
Security Update | Yes |
5053594 |
Security Update | Yes |
5053596 |
Security Update | Yes |
5053606 |
Security Update | Yes |
5053602 |
Security Update | Yes |
5053886 |
Monthly Rollup | Yes |
5053887 |
Monthly Rollup | Yes |
5053599 |
Security Update | Yes |
Patch Diff
Patch diff 10.0.26100.1150 -> 10.0.26100.3470 (24H2 KB5053598; fastfat allocation integer-overflow checks)
| Function | Address | Change | Note |
|---|---|---|---|
__GSHandlerCheck |
1c000df18 -> 1c000ea08 |
refcount, address | similarity 1.0 |
DriverEntry |
1c0066078 -> 1c0067078 |
code, length, sig, address, called | similarity 0.15 |
NTOSKRNL.EXE::IoDeleteDevice |
EXTERNAL:0000008e -> EXTERNAL:00000097 |
refcount, address | similarity 1.0 |
FatExamineFatEntries |
1c0027538 -> 1c0028538 |
code, length, address, called | similarity 0.36 |
__security_check_cookie |
1c000e120 -> 1c000ec10 |
refcount, address, calling | similarity 1.0 |
NTOSKRNL.EXE::ExRaiseStatus |
EXTERNAL:00000102 -> EXTERNAL:0000010e |
refcount, address, calling | similarity 1.0 |
FatSetupAllocationSupport |
1c00291a0 -> 1c002a1f8 |
code, length, address, called | similarity 0.22 |
Root Cause Analysis
Root Cause Analysis — CVE-2025-24985
Summary
| Field | Value |
|---|---|
| CVE | CVE-2025-24985 |
| Binary | fastfat.sys (Windows Fast FAT File System Driver) |
| Component | FAT volume allocation support / cluster bitmap initialization |
| Bug Class | Integer Overflow (CWE-190) leading to Kernel Pool Overflow |
| Impact | Remote Code Execution / Elevation of Privilege |
| CVSS 3.1 | 7.8 (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) |
| Exploited ITW | Yes (CISA KEV) |
| Patch | March 2025 Patch Tuesday (KB5053606 Win10 22H2) |
Vulnerability Overview
An integer overflow vulnerability exists in the Windows Fast FAT file system driver
during cluster count computation when mounting a crafted FAT32 volume. The cluster
count is computed from boot sector fields that are entirely user-controlled in a
crafted VHD file. By setting specific values, the attacker produces a cluster count
of 0xFFFFFFFB, which causes a second integer overflow when computing the bitmap
allocation size: (0xFFFFFFFB + 7) >> 3 = 0. This results in a near-zero allocation
(kernel minimum = 0x20 bytes) but a bitmap configured for 0xFFFFFFFB bits, leading
to a massive kernel paged pool overflow with attacker-controlled bit patterns.
Root Cause — Integer Overflow Chain
Step 1: Crafted Boot Sector Values
The attacker modifies the FAT32 boot sector (BPB) in a VHD file:
| BPB Field | Normal Value | Crafted Value | Purpose |
|---|---|---|---|
| NumberOfSector32 | ~0x1F4000 | 0xFFFFFFFF | Maximize total sectors |
| NumberOfFatTables | 2 | 2 | Keep standard |
| SectorsPerFat32 | ~0xF80 | 0x80000000 | Maximize FAT size (causes subtraction overflow) |
| ReservedSectors | ~32 | 4 | Minimize reserved |
| SectorsPerCluster | ~8 | 1 | 1 sector = 1 cluster (no division reduction) |
Step 2: Cluster Count Computation Overflow
In FatSetupAllocationSupport():
// Pre-patch: no overflow validation
NumberOfClusters = (NumberOfSector32
- NumberOfFatTables * SectorsPerFat32
- ReservedSectors)
/ SectorsPerCluster;
// With crafted values:
// = (0xFFFFFFFF - 2 * 0x80000000 - 4) / 1
// = (0xFFFFFFFF - 0x100000000 - 4) / 1 ← 32-bit wrap!
// = (0xFFFFFFFF - 0x00000000 - 4) / 1 ← 0x100000000 truncates to 0
// = 0xFFFFFFFB
The result 0xFFFFFFFB is stored in the VCB (Volume Control Block) at offset
+0x15C (NumberOfClusters).
Step 3: FAT Type Check Bypass
The overflow also bypasses the FAT type determination logic:
v35 = (NumberOfClusters + 0xFFFF); // = 0xFFFFFFFB + 0xFFFF = 0x1_0000FFFA
// 32-bit truncation → 0x0000FFFA
v_type = v35 >> 16; // = 0x0000FFFA >> 16 = 0
// *(a2 + 0xC8) = 0 → passes the "if (*(a2+0xC8) <= 1u)" check later
Step 4: Bitmap Allocation Overflow
In FatExamineFatEntries():
// NumberOfClusters = 0xFFFFFFFB from *(a2 + 0x15C)
ULONG bitmapSize = (NumberOfClusters + 7) >> 3;
// = (0xFFFFFFFB + 7) >> 3
// = 0x100000002 >> 3 ← 32-bit wrap!
// = 0x00000002 >> 3
// = 0x00000000
PVOID bitmap = ExAllocatePoolWithTag(PagedPool, bitmapSize, 'tFaF');
// bitmapSize = 0 → kernel allocates minimum 0x20 bytes
RtlInitializeBitMap(&bitmapHeader, bitmap, NumberOfClusters);
// NumberOfBits = 0xFFFFFFFB but buffer is only 0x20 bytes!
Step 5: Kernel Pool Overflow
The while loop in FatExamineFatEntries() iterates over all FAT entries
(0xFFFFFFFB clusters) and calls RtlSetBits/RtlClearBits to track cluster
allocation state changes:
while (1) {
// ... read FAT entry for current cluster ...
if (!previousState && currentState) { // free → used
RtlClearBits(&bitmapHeader, startIndex, count); // WRITES BEYOND 0x20 bytes!
}
if (previousState && !currentState) { // used → free
RtlSetBits(&bitmapHeader, startIndex, count); // WRITES BEYOND 0x20 bytes!
}
// ...
}
Since each cluster maps to 1 bit, and the bitmap buffer is only 0x20 bytes (256 bits), any cluster index > 256 writes past the allocation into adjacent kernel pool objects.
Attacker-Controlled Write Primitive
The bit values written depend on the FAT entry values in the crafted VHD:
- FAT entry = 0x00000000 → cluster is FREE → bit = 0 (RtlClearBits)
- FAT entry != 0x00000000 → cluster is USED → bit = 1 (RtlSetBits)
By crafting the FAT table entries, the attacker controls which bits are set or cleared in the overflowed region, achieving arbitrary byte writes to adjacent paged pool memory.
Patch Analysis
The patch adds overflow validation in both functions:
FatSetupAllocationSupport (patched)
// Post-patch: validate cluster count computation won't overflow
if (overflow_detected_in_cluster_computation) {
return STATUS_DISK_CORRUPT_ERROR;
}
FatExamineFatEntries (patched)
// Post-patch: validate (NumberOfClusters + 7) doesn't overflow
ULONG v47 = *(a2 + 0x15C); // NumberOfClusters
if (v47 + 7 < v47) { // overflow check
return STATUS_DISK_CORRUPT_ERROR;
}
ULONG bitmapSize = (v47 + 7) >> 3;
Reachability
- Attack vector: Local — requires user to mount a crafted VHD/VHDX or insert a crafted USB drive with a FAT32 partition
- Privileges required: None — any user can mount a VHD by double-clicking
- User interaction: Required — user must mount the crafted volume
- Attack surface:
- Double-click a .vhd or .vhdx file
- Disk Management → Attach VHD
diskpart→attach vdisk- Insert USB drive with crafted FAT32 partition
- Network share containing crafted VHD (social engineering)
Detection
YARA — Crafted FAT32 VHD with Overflow Boot Sector
rule CVE_2025_24985_Crafted_FAT32_VHD
{
meta:
description = "Detects VHD files with FAT32 boot sector values designed to overflow cluster count"
cve = "CVE-2025-24985"
author = "OnlyFm252"
strings:
// FAT32 signature at boot sector offset 0x52
$fat32_sig = "FAT32 "
// SectorsPerFat32 = 0x80000000 (abnormally large)
$large_spf = { 00 00 00 80 }
// NumberOfSector32 = 0xFFFFFFFF
$max_sectors = { FF FF FF FF }
// VHD footer magic "conectix"
$vhd_magic = "conectix"
condition:
($fat32_sig and $large_spf and $max_sectors) or
($vhd_magic and $large_spf and $max_sectors)
}
Sigma — VHD Mount Followed by BSOD
title: CVE-2025-24985 Crafted FAT32 VHD Mount
id: e7f8a9b0-c1d2-3456-ef01-789012abcdef
status: experimental
description: >
Detects mounting of VHD files followed by kernel crash, indicating possible
exploitation of CVE-2025-24985 via crafted FAT32 volume.
author: OnlyFm252
date: 2026/07/26
references:
- https://hackyboiz.github.io/2025/07/17/ogu123/[Research]_CVE-2025-24985/EN/
- https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-24985
logsource:
product: windows
category: process_creation
detection:
selection_mount:
CommandLine|contains:
- 'attach vdisk'
- 'Mount-VHD'
- 'Mount-DiskImage'
selection_file:
CommandLine|contains:
- '.vhd'
- '.vhdx'
condition: selection_mount and selection_file
level: medium
tags:
- attack.execution
- attack.t1203
- cve.2025.24985
Sysmon Configuration
<Sysmon schemaversion="4.90">
<EventFiltering>
<!-- Event 11: Detect VHD file creation/download -->
<FileCreate onmatch="include">
<TargetFilename condition="end with">.vhd</TargetFilename>
<TargetFilename condition="end with">.vhdx</TargetFilename>
</FileCreate>
<!-- Event 1: Detect VHD mounting commands -->
<ProcessCreate onmatch="include">
<CommandLine condition="contains">Mount-DiskImage</CommandLine>
<CommandLine condition="contains">attach vdisk</CommandLine>
<CommandLine condition="contains">Mount-VHD</CommandLine>
</ProcessCreate>
</EventFiltering>
</Sysmon>
References
Attack Path
Integer overflow in FAT32 cluster accounting reached by mounting a crafted VHD
Derived from the patch delta: the checks added by the vendor identify which fields crossed a trust boundary unvalidated. Reachability and privilege are taken from the call chain in the RCA report.
Exploits & PoC
1 public PoCUnverified third-party code
Public proof-of-concept repositories aggregated from PoC-in-GitHub. They are not reviewed and may be incomplete, non-functional, or malicious — inspect the code before running anything.
| Repository | Stars | Published | Description |
|---|---|---|---|
| airbus-cert/cve-2025-24985 | 2 | 2025-04-02 | Detection of malicious VHD files for CVE-2025-24985 |
Detection Rules
Acknowledgments
Anonymous