Skip to content
Race condition Advisory Advanced CVE-2016-3258

Windows File System Security Feature Bypass Vulnerability (CVE-2016-3258)

The Windows kernel had a time-of-check to time-of-use flaw in its file path-based checks, so a low-integrity application could race those checks and modify files outside its integrity level. Exploiting it required a separate vulnerability to first compromise the sandboxed process.

James Forshaw Follow

Originally disclosed on Microsoft

High 6.3 View original

Description

A security feature bypass vulnerability exists in the Windows kernel that could allow an attacker to exploit time of check time of use (TOCTOU) issues in file path-based checks from a low-integrity application. An attacker who successfully exploited this vulnerability could potentially modify files outside of a low-integrity level application. To exploit the vulnerability, an attacker would need to take advantage of another vulnerability to compromise the sandbox process from a low-integrity application. The security update addresses the vulnerability by adding a validation check on how a low-integrity application can use certain object manager features.

FAQ

I am running Windows Server 2012. Do I need to install the 3170377 and 3172727 updates in a particular order? No. The 3170377 and 3172727 updates both contain the same components and can be installed in any order. Installing one and then the other without a system restart in between is allowed; however, if you install the 3172727 update first and then restart the system, subsequent attempts to install the 3170377 update will display the message, “The update is not applicable to your computer." This is because the 3172727 update supersedes the 3170377 update by design.

Windows Kernel

Windows Kernel

The original report as published on the Microsoft Security Response Center, by James Forshaw of Google Project Zero. Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the kernel validated a file path and then used it later without locking it down, so the path could be swapped between the check and the use.

Impact

An attacker who already had a way into a low-integrity sandboxed process could potentially modify files outside that application's integrity level.

What the attacker needed

Another vulnerability to compromise the sandbox; code running in a low-integrity application

The fix

The update was fixed by adding a validation check on how a low-integrity application can use certain object manager features.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Windows can run programs at different trust levels, and a low-trust program is meant to be kept away from important files. This bug meant that if the program changed a file path at just the right moment, the kernel's safety check could pass on one path but the action happened on another. An attacker still needed a second bug to get code running inside that low-trust program before this could be used.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More by James Forshaw

View all

105 more disclosed reports, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.