Streaming vulnerabilities from Windows Kernel - Proxying to Kernel - Part II
A double-fetch flaw in the Windows kernel streaming thunk allows a user to register a kernel event with a kernel-mode request, leading to an arbitrary kernel increment primitive. The authors exploited this to modify a global privilege identifier and gain elevated process access.
devco.re
Published on devco.re
Tech Editorials #CVE #Vulnerability #Windows #Kernel #Advisory
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a double-fetch race condition where the thunk checks a user-controlled flag, then copies the structure and passes it to a kernel-mode IOCTL, allowing the flag to be changed between the check and use.
Impact
The arbitrary increment primitive could be used to modify a global privilege identifier, allowing a normal user to open high-privilege processes and achieve elevation of privilege on Windows 11 23H2.
What the attacker needed
Local access to Windows; ability to call DeviceIoControl; race condition timing
The fix
The text does not state a specific fix, but implies that developers should carefully check Irp->RequestorMode and avoid using user input after setting it to KernelMode.
How it was found
- Set the event flag to KSEVENT_TYPE_QUERYBUFFER before calling the IOCTL.
- Trigger the thunk conversion that copies the request and calls KsSynchronousIoControlDevice.
- Change the flag to KSEVENT_TYPE_ENABLE before the second call.
- Provide a crafted KSEVENTDATA pointing to a kernel address to register the event.
- Trigger the event so ks increments the value at the provided kernel address.
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 write-up has not been written yet. The Original tab links to the source.
This is about a bug in a Windows driver component that handles media streaming. A user program can trick the driver into treating a request as if it came from the kernel itself, which lets the attacker change a value in kernel memory. By changing a specific kernel variable, they can open high-privilege processes and escalate their permissions.
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.