exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Microsoft Windows Kernel win32k!XDCOBJ::RestoreAttributes Memory Disclosure

Microsoft Windows Kernel win32k!XDCOBJ::RestoreAttributes Memory Disclosure
Posted Mar 21, 2018
Authored by Google Security Research, mjurczyk

The Microsoft Windows kernel suffers from a 64-bit pool memory disclosure vulnerability in win32k!XDCOBJ::RestoreAttributes.

tags | advisory, kernel
systems | windows
advisories | CVE-2018-0811
SHA-256 | 743612dfc5adb2afb95d3bb3ee40d4802c64e811db5c9c184e8b15f712978ebf

Microsoft Windows Kernel win32k!XDCOBJ::RestoreAttributes Memory Disclosure

Change Mirror Download
Windows Kernel 64-bit stack memory disclosure in win32k!XDCOBJ::RestoreAttributes 

CVE-2018-0811


We have discovered that the win32k!XDCOBJ::RestoreAttributes function leaks portions of uninitialized kernel stack memory to user-mode address space on Windows 7 to 10. It was confirmed on 64-bit platforms, 32-bit builds were not tested.

The overall copied memory area is 0x1a0 bytes long, 4 of which were uninitialized in our case. The layout of the area is as follows:

--- cut ---
00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000110: 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 ................
00000120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
--- cut ---

Where 00 denote bytes which are properly initialized, while ff indicate uninitialized values. As can be seen, there are 4 uninitialized bytes at offsets 0x118-0x11b. The values of those bytes originate from the local stack frame of the win32k!XDCOBJ::bModifyWorldTransform function.

More specifically, we have determined that the 4 bytes correspond to the 7-th field of an internal MATRIX structure (layout unknown), declared locally in win32k!XDCOBJ::bModifyWorldTransform. Initialization of the structure is achieved with a win32k!vConvertXformToMatrix call. While the first 6 fields of MATRIX are unconditionally written to in win32k!vConvertXformToMatrix, the 7-th and 8-th fields (offsets 0x18 and 0x1c) may or may not be set, depending on whether the win32k!bFToL succeeds to convert a given floating point number to a LONG. If it fails, one or both of these fields remain uninitialized, and are later copied in that form first to the larger structure of 0x1a0 bytes (at offset 0x100), and then to user-mode memory in win32k!XDCOBJ::RestoreAttributes.

The copying of the disclosed data from kernel to user-mode memory was detected under the following stack trace:

--- cut ---
kd> k
# Child-SP RetAddr Call Site
00 fffff880`04208b88 fffff960`00109033 win32k!memcpy+0x3
01 fffff880`04208b90 fffff960`0022e70f win32k!XDCOBJ::RestoreAttributes+0x3b
02 fffff880`04208bc0 fffff800`0268d093 win32k!NtGdiModifyWorldTransform+0x73
03 fffff880`04208c20 00000000`74ba2e09 nt!KiSystemServiceCopyEnd+0x13
--- cut ---

A proof-of-concept program is not provided for this issue, but it has been observed and confirmed at normal system runtime, and is quite evident in the code.

Repeatedly triggering the vulnerability could allow local authenticated attackers to defeat certain exploit mitigations (kernel ASLR) or read other secrets stored in the kernel address space.

This bug is subject to a 90 day disclosure deadline. After 90 days elapse or a patch has been made broadly available, the bug report will become visible to the public.



Found by: mjurczyk

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close