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

Microsoft Windows win32k!xxxSendMenuSelect Memory Disclosure

Microsoft Windows win32k!xxxSendMenuSelect Memory Disclosure
Posted Nov 21, 2017
Authored by Google Security Research, mjurczyk

There is a Microsoft Windows kernel stack memory disclosure vulnerability in win32k!xxxSendMenuSelect via fnHkINLPMSG user-mode callback.

tags | advisory, kernel
systems | windows
advisories | CVE-2017-11853
SHA-256 | 29ecb93fa8a796617a90f59536bcfb9ac394c28a5e7d91ca72284eb636894416

Microsoft Windows win32k!xxxSendMenuSelect Memory Disclosure

Change Mirror Download
Windows Kernel stack memory disclosure in win32k!xxxSendMenuSelect (via fnHkINLPMSG user-mode callback) 

CVE-2017-11853


We have discovered that the win32k!xxxSendMenuSelect function has a bug which leads to the disclosure of uninitialized stack memory to user-mode clients, due to unused fields in a structure which ends up copied to userland.

The act of copying uninitialized kernel memory was originally detected under the following stack trace:

--- cut ---
957836ec 82abe89d nt!memcpy+0x35
95783748 91161d46 nt!KeUserModeCallback+0xc6
957837ec 9111ffe8 win32k!fnHkINLPMSG+0x148
9578384c 911658b3 win32k!xxxHkCallHook+0x337
957838ec 9115ab70 win32k!xxxCallHook2+0x3ac
95783908 91227798 win32k!xxxCallHook+0x26
95783928 9121acd1 win32k!_CallMsgFilter+0x71
95783960 911f22aa win32k!xxxSendMenuSelect+0xce
957839c0 9120f5a9 win32k!xxxMNInvertItem+0x3ae
95783a2c 912452f9 win32k!xxxMNSelectItem+0x216
95783aa0 912141a4 win32k!xxxRealMenuWindowProc+0xba3
95783ad4 9118c593 win32k!xxxMenuWindowProc+0xfd
95783b14 9118c665 win32k!xxxSendMessageTimeout+0x1ac
95783b3c 9120f0d5 win32k!xxxSendMessage+0x28
95783b8c 9120ebcc win32k!xxxMNMouseMove+0x177
95783be8 9120e784 win32k!xxxHandleMenuMessages+0x310
95783c34 912147d3 win32k!xxxMNLoop+0x2fa
95783ca0 912148be win32k!xxxTrackPopupMenuEx+0x5fd
95783d14 8287ee06 win32k!NtUserTrackPopupMenuEx+0xc3
95783d14 77236c74 nt!KiSystemServicePostCall
000bf210 757a480e ntdll!KiFastSystemCallRet
000bf214 0055342c USER32!NtUserTrackPopupMenuEx+0xc
--- cut ---

At that point of execution, 0x30 bytes are copied from kernel to user-mode. The layout of the i/o structure passed down to the user-mode callback that we're seeing 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: ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 ................
--- cut ---

Where 00 denote bytes which are properly initialized, while ff indicate uninitialized values copied back to user-mode. As shown above, there are 12 bytes leaked at offsets 0x20-0x2b. We have determined that these bytes originally come from a smaller structure of size 0x1c, allocated in the stack frame of the win32k!xxxSendMenuSelect function. More specifically, we have found that the local structure is in fact of type MSG, and the uninitialized bytes correspond to the trailing "time" and "pt" fields:

--- cut ---
typedef struct tagMSG {
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
} MSG, *PMSG, *LPMSG;
--- cut ---

Such a partially initialized structure is then passed down to win32k!_CallMsgFilter, and further down the call stack, before being eventually leaked to ring-3 through the user-mode callback. 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:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close