vendor:
Windows 7
by:
Project Zero
7,2
CVSS
HIGH
Kernel Stack Memory Disclosure
119
CWE
Product Name: Windows 7
Affected Version From: Windows 7
Affected Version To: Windows 7
Patch Exists: YES
Related CWE: N/A
CPE: o:microsoft:windows_7
Metasploit:
N/A
Other Scripts:
N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References:
N/A
Nuclei Metadata: N/A
Platforms Tested: Windows
2017
Kernel Stack Memory Disclosure in Windows 7
We have discovered that it is possible to disclose portions of uninitialized kernel stack memory to user-mode applications in Windows 7 (other systems untested) through the win32k!NtGdiGetTextMetricsW system call. The output structure used by the syscall, according to various sources, is TMW_INTERNAL, which wraps the TEXTMETRICW and TMDIFF structures (see e.g. the PoC for issue #480). The disclosure occurs when the service is called against a Device Context with one of the stock fonts selected (we're using DEVICE_DEFAULT_FONT). Then, we can find 7 uninitialized kernel stack bytes at offsets 0x39-0x3f of the output buffer.
Mitigation:
Ensure that all kernel stack memory is initialized before being used.