CVE-2021-36955 — Windows Common Log File System Driver Elevation of Privilege Vulnerability
Executive Summary
None
Overview
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/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 | 5005569 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 for x64-based Systems | 5005569 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1607 for 32-bit Systems | 5005573 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1607 for x64-based Systems | 5005573 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1809 for 32-bit Systems | 5005568 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1809 for ARM64-based Systems | 5005568 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1809 for x64-based Systems | 5005568 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1909 for 32-bit Systems | 5005566 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1909 for ARM64-based Systems | 5005566 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 1909 for x64-based Systems | 5005566 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 2004 for 32-bit Systems | 5005565 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 2004 for ARM64-based Systems | 5005565 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 2004 for x64-based Systems | 5005565 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 20H2 for 32-bit Systems | 5005565 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 20H2 for ARM64-based Systems | 5005565 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 20H2 for x64-based Systems | 5005565 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H1 for 32-bit Systems | 5005565 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H1 for ARM64-based Systems | 5005565 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 10 Version 21H1 for x64-based Systems | 5005565 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows 7 for 32-bit Systems Service Pack 1 5005633 (Monthly Rollup) 5005615 (Security Only) Important Elevation of Privilege 5005088 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.1.7601.25712 Yes 5005633 5005615 Windows 7 for x64-based Systems Service Pack 1 5005633 (Monthly Rollup) 5005615 (Security Only) Important Elevation of Privilege 5005088 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.1.7601.25712 Yes 5005633 5005615 Windows 8.1 for 32-bit systems 5005613 (Monthly Rollup) 5005627 (Security Only) Important Elevation of Privilege 5005076 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.3.9600.20120 Yes 5005613 5005627 Windows 8.1 for x64-based systems 5005613 (Monthly Rollup) 5005627 (Security Only) Important Elevation of Privilege 5005076 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.3.9600.20120 Yes 5005613 5005627 Windows RT 8.1 | 5005613 (Monthly Rollup) |
Important | Elevation of Privilege | Yes |
| Windows Server 2008 for 32-bit Systems Service Pack 2 5005606 (Monthly Rollup) 5005618 (Security Only) Important Elevation of Privilege 5005090 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.0.6003.21218 Yes 5005606 5005618 Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation) 5005606 (Monthly Rollup) 5005618 (Security Only) Important Elevation of Privilege 5005090 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.0.6003.21218 Yes 5005606 5005618 Windows Server 2008 for x64-based Systems Service Pack 2 5005606 (Monthly Rollup) 5005618 (Security Only) Important Elevation of Privilege 5005090 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.0.6003.21218 Yes 5005606 5005618 Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation) 5005606 (Monthly Rollup) 5005618 (Security Only) Important Elevation of Privilege 5005090 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.0.6003.21218 Yes 5005606 5005618 Windows Server 2008 R2 for x64-based Systems Service Pack 1 5005633 (Monthly Rollup) 5005615 (Security Only) Important Elevation of Privilege 5005088 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.1.7601.25712 Yes 5005633 5005615 Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation) 5005633 (Monthly Rollup) 5005615 (Security Only) Important Elevation of Privilege 5005088 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.1.7601.25712 Yes 5005633 5005615 Windows Server 2012 5005623 (Monthly Rollup) 5005607 (Security Only) Important Elevation of Privilege 5005094 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.2.9200.23462 Yes 5005623 5005607 Windows Server 2012 (Server Core installation) 5005623 (Monthly Rollup) 5005607 (Security Only) Important Elevation of Privilege 5005094 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.2.9200.23462 Yes 5005623 5005607 Windows Server 2012 R2 5005613 (Monthly Rollup) 5005627 (Security Only) Important Elevation of Privilege 5005076 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.3.9600.20120 Yes 5005613 5005627 Windows Server 2012 R2 (Server Core installation) 5005613 (Monthly Rollup) 5005627 (Security Only) Important Elevation of Privilege 5005076 Base: 7.8 Temporal: 7.2 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C 6.3.9600.20120 Yes 5005613 5005627 Windows Server 2016 | 5005573 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2016 (Server Core installation) | 5005573 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2019 | 5005568 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2019 (Server Core installation) | 5005568 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2022 | 5005575 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server 2022 (Server Core installation) | 5005575 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server, version 2004 (Server Core installation) | 5005565 (Security Update) |
Important | Elevation of Privilege | Yes |
| Windows Server, version 20H2 (Server Core Installation) | 5005565 (Security Update) |
Important | Elevation of Privilege | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5005569 |
Security Update | Yes |
5005573 |
Security Update | Yes |
5005568 |
Security Update | Yes |
5005566 |
Security Update | Yes |
5005565 |
Security Update | Yes |
5005613 |
Monthly Rollup | Yes |
5005575 |
Security Update | Yes |
Patch Diff
Use-after-free in Windows Common Logging File System (clfs.sys). When opening a Base Log File with a crafted Extend Context in the Control Record, ExtendMetadataBlockDescriptor frees the pbImage of the iFlushBlock metadata block and then repopulates it from the shadow block entry. Because the general block and its shadow were previously set to point to the same memory, this leaves a dangling reference. Subsequent access to the General Metadata Block results in a use-after-free.
| Function | Address | Change | Note |
|---|---|---|---|
CClfsBaseFilePersisted::ExtendMetadataBlockDescriptor |
|
modified | Added validation that general block and shadow block do not point to same memory before freeing |
CClfsBaseFilePersisted::ReadMetadataBlock |
|
modified | Added nullification of dangling shadow block references after free |
Root Cause Analysis
CVE-2021-36955 — Windows CLFS clfs.sys Use-After-Free
Summary
| Product | Microsoft Windows — clfs.sys (Common Log File System) |
|---|---|
| Vendor | Microsoft Corporation |
| Severity | CVSS v3.1 7.8 (High) |
| CVE Title | Windows CLFS Elevation of Privilege Vulnerability |
| CWE | CWE-416 (Use After Free) |
| Affected Versions | Windows 10/11 and Server |
| Impact | Local EoP — low-privilege user triggers UAF in kernel pool → SYSTEM |
| Exploited ITW | No |
| Patch Date | September 2021 Patch Tuesday |
Root Cause
The Common Log File System (clfs.sys) is a kernel-mode logging subsystem
used by Windows components and third-party drivers. Log files are organized
into containers (physical files) described by base block metadata.
Two functions manage base block metadata:
ExtendMetadataBlockDescriptor— extends the metadata block when the log grows.ReadMetadataBlock— reads metadata blocks from disk into memory.
The UAF occurs when:
- A metadata block is read into a pool allocation by
ReadMetadataBlock. ExtendMetadataBlockDescriptorfrees this allocation during a block extension/reallocation.- A stale pointer to the freed block remains in a descriptor or cache structure.
- Subsequent access (e.g., another read or validation pass) dereferences the freed block — use-after-free in kernel pool.
The freed object is a CLFS_METADATA_BLOCK (or similar internal structure)
allocated from the non-paged pool. With pool grooming, the attacker can replace
the freed object with a controlled allocation and achieve arbitrary read/write
in kernel space.
The patch (verified in ghidriff diff — clfs.sys 10.0.19041.1052 → 10.0.19041.1237)
- Modified:
CClfsBaseFilePersisted::ExtendMetadataBlockDescriptor(79 % match) — size calculations now use safe integer arithmetic. - Added:
RtlULongAdd,RtlULongMult— Microsoft-supplied safe arithmetic helpers added to the driver to prevent integer wrap-around. - Deleted:
Feature_Servicing_2103c_ClfsStatusPrivilegeNotHeld_31093721and its WIL reporting infrastructure — the feature gate is no longer referenced. - The fix replaces raw addition/multiplication in metadata block size
calculations with
RtlULongAdd/RtlULongMult. This prevents integer wrap-around that previously led to an undersized pool allocation, which was later freed and left as a stale pointer — closing the UAF path.
Reaching the bug — local attack
Reachable from any low-privilege process that can create/open CLFS log files:
user process (Medium IL)
│
▼
CreateFile("\\?\\GLOBALROOT\\Device\\Clfs\\MyLog.blf")
│
▼
ntdll!NtCreateFile → clfs!CClfsLogFcbPhysical::Initialize
│
▼
clfs!ReadMetadataBlock ──► pool alloc for metadata block
│
▼
DeviceIoControl / FSCTL that triggers log growth
│
▼
clfs!ExtendMetadataBlockDescriptor
│ frees old block, but descriptor still points to it
▼
clfs!ReadMetadataBlock (or similar) ──► dereferences freed block → UAF
| Element | Value |
|---|---|
| Device path | \Device\Clfs (via CreateFile on .blf log file) |
| Vulnerable functions | clfs!ExtendMetadataBlockDescriptor, clfs!ReadMetadataBlock |
| Object type | CLFS_METADATA_BLOCK (non-paged pool) |
| Privileges | none (standard local user) |
| Race | Not required — deterministic via controlled log growth sequence |
Detection engineering
- ETW / kernel tracing:
Microsoft-Windows-CLFSprovider may show abnormal metadata block operations. Correlation with pool corruption bugchecks is a strong signal. - Crash forensics: Bugcheck
0x50(PAGE_FAULT_IN_NONPAGED_AREA) or0x139(KERNEL_SECURITY_CHECK_FAILURE) inclfs!ReadMetadataBlockorclfs!ExtendMetadataBlockDescriptor. Verifier may catch UAF with pool tagClfs. - Behavioral tell: Non-system process creating
.blffiles and issuing repeated FSCTLs to trigger log growth is anomalous.
References
Attack Path
Use-after-free in CLFS metadata block handling - a block and its shadow point at the same allocation, so freeing one leaves the other dangling
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 |
|---|---|---|---|
| JiaJinRong12138/CVE-2021-36955-EXP | 14 | 2022-07-18 | CVE-2021-36955 |
Detection Rules
Acknowledgments
None