CVE-2025-21315 — Microsoft Brokering File System Elevation of Privilege Vulnerability
Executive Summary
None
Overview
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H/E:U/RL:O/RC:C
EPSS Score
Affected Products
| Product | KB Article | Severity | Impact | Restart Required |
|---|---|---|---|---|
| Windows 11 Version 24H2 for ARM64-based Systems | 5050009 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 11 Version 24H2 for x64-based Systems | 5050009 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2022, 23H2 Edition (Server Core installation) | 5049984 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2025 | 5050009 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2025 (Server Core installation) | 5050009 (Security Update) |
Important | Elevation of Privilege | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5050009 |
Security Update | Yes |
5049984 |
Security Update | Yes |
Patch Diff
Patch diff 10.0.26100.2454 -> 10.0.26100.2894
| Function | Address | Change | Note |
|---|---|---|---|
wil_details_IsEnabledFallback |
1c0003fe8 -> 1c000405c |
refcount, address, calling | similarity 1.0 |
NTOSKRNL.EXE::ExReleasePushLockExclusiveEx |
EXTERNAL:00000018 |
refcount, calling | similarity 1.0 |
BfsCheckAndReleaseIdlePolicy |
1c0004e00 -> 1c0004ea4 |
code, length, address, called | similarity 0.61 |
BfsProcessSetPolicyRequest |
1c0007984 -> 1c0007c08 |
code, length, address, called | similarity 0.97 |
NTOSKRNL.EXE::ExAcquirePushLockExclusiveEx |
EXTERNAL:00000017 |
refcount, calling | similarity 1.0 |
BfsGetPolicyEntry |
1c0005d58 -> 1c0005f88 |
code, length, sig, address, called | similarity 0.89 |
BfsProcessQueryPolicySizeRequest |
1c0007748 -> 1c00079bc |
code, length, address, called | similarity 0.65 |
BfsReleaseNamedPipeMapping |
1c000993c -> 1c0009c2c |
code, length, address, called | similarity 0.71 |
BfsProcessQueryPolicyRequest |
1c0007328 -> 1c0007588 |
code, length, address, called | similarity 0.5 |
NTOSKRNL.EXE::KeEnterCriticalRegion |
EXTERNAL:00000080 |
refcount, calling | similarity 1.0 |
BfsUninitializePolicyTable |
1c00085a0 -> 1c0008878 |
code, length, address, called | similarity 0.8 |
BfsDeleteFileFromGlobalFileTable |
1c000a284 -> 1c000a628 |
code, length, sig, address, called | similarity 0.68 |
BfsInsertNotPresentPolicyEntry |
1c0006314 -> 1c0006564 |
code, length, address, called | similarity 0.94 |
_tlgWriteTransfer_EtwWriteTransfer |
1c0001008 |
refcount | similarity 1.0 |
BfsInsertPolicyEntry |
1c0006604 -> 1c0006868 |
code, length, sig, address, called | similarity 0.54 |
BfsPostCreateOperation |
1c0001c60 |
code, length, called | similarity 0.65 |
BfsCloseStorage |
1c000e0fc -> 1c000e4cc |
refcount, address, calling | similarity 0.94 |
NTOSKRNL.EXE::ExFreePoolWithTag |
EXTERNAL:0000007a |
refcount, calling | similarity 1.0 |
NTOSKRNL.EXE::KeLeaveCriticalRegion |
EXTERNAL:00000082 |
refcount, calling | similarity 1.0 |
BfsCheckAndApplyPolicy |
1c00048f0 -> 1c0004970 |
code, length, sig, address, called | similarity 0.93 |
BfsRemoveEntryHashTable |
1c000ff54 -> 1c0010324 |
refcount, address, calling | similarity 1.0 |
BfsPerformPrompt |
1c000b970 -> 1c000bd20 |
code, length, address, called | similarity 0.98 |
BfsRemovePolicyEntry |
1c0008270 -> 1c0008510 |
code, length, address, called | similarity 0.85 |
BfsGetRegistryPrefix |
1c000c9cc -> 1c000cd8c |
code, length, address, called | similarity 0.86 |
BfsDereferencePolicyEntryEx |
1c0004fa0 -> 1c0005160 |
code, name, fullname, length, sig, address, called | similarity 0.92 |
Root Cause Analysis
RCA — CVE-2025-21315 (bfs.sys PolicyTable missing-lock UAF race)
- Binary:
bfs.sys(Brokering File System minifilter) - Patch: KB5050009 (Jan 2025),
10.0.26100.2454→10.0.26100.2894 - Class: CWE-416 use-after-free (race) | Impact: EoP | ITW: no
- Diff:
ghidriff/CVE-2025-21315/output/bfs-10.0.26100.2454.sys-bfs-10.0.26100.2894.sys.ghidriff.md(shared with CVE-2025-21372)
Root cause
Several policy-management code paths accessed the global PolicyTable
({ PushLock, RTL_DYNAMIC_HASH_TABLE, LIST_ENTRY, Timer }) and PolicyEntry
objects without holding the table lock, so concurrent policy add / remove /
query / idle-cleanup could free or re-link a PolicyEntry while another thread
was still using it → UAF.
Patch
Gated by Feature_2880249144, the update adds the missing lock placements across
the policy paths and introduces BfsDereferencePolicyEntryEx to centralize safe
entry release. ~15 functions touched; key ones:
- Added:
BfsDereferencePolicyEntryEx,Feature_2880249144__private_IsEnabled* - Modified:
BfsRemovePolicyEntry,BfsInsertPolicyEntry,BfsGetPolicyEntry,BfsCheckAndReleaseIdlePolicy,BfsUninitializePolicyTable,BfsProcessSetPolicyRequest,BfsProcessQueryPolicyRequest,BfsCheckAndApplyPolicy,BfsPostCreateOperation,BfsPerformPrompt, others
Confirmed in the ghidriff diff (BfsDereferencePolicyEntry old ↔
BfsDereferencePolicyEntryEx new, 81% match).
Attribution vs CVE-2025-21372 (same binary, same month)
| CVE | Gate | Path | Anchor function |
|---|---|---|---|
| CVE-2025-21372 | Feature_752421176 |
named pipes | BfsReleaseNamedPipeMapping (only xref of the gate) |
| CVE-2025-21315 | Feature_2880249144 |
policy table | BfsDereferencePolicyEntryEx + ~15 policy-path funcs |
Reaching the bug
Concurrent BFS policy operations from an AppContainer/AppSilo process — e.g.
policy add/remove requests racing the idle-entry cleanup timer
(BfsCheckAndReleaseIdlePolicy) or query requests. See the CVE-2025-29970 RCA
for the BFS IOCTL surface (\\?\GLOBALROOT\Device\Bfs, AppSilo token).
Detection notes
- Crash signature: access violation in bfs policy paths
(
BfsRemovePolicyEntry/BfsGetPolicyEntry/ idle cleanup). - Same named-pipe/AppContainer telemetry as CVE-2025-21372 applies.
Attack Path
Unlocked access to the BFS policy table - entries can be freed or re-linked while another thread is using them
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
Detection Rules
Acknowledgments
hazard