Back to list
CORE-2011-1123 - Windows Kernel ReadLayoutFile Heap Overflow
Jul 17 2012 01:41PM
CORE Security Technologies Advisories (advisories coresecurity com)
Core Security - Corelabs Advisory
Windows Kernel ReadLayoutFile Heap Overflow
1. *Advisory Information*
Title: Windows Kernel ReadLayoutFile Heap Overflow
Advisory ID: CORE-2011-1123
Date published: 2012-05-08
Date of last update: 2012-07-11
Vendors contacted: Microsoft
Release mode: Coordinated release
2. *Vulnerability Information*
Class: Heap-based Buffer Overflow [CWE-122]
Impact: Code execution
Remotely Exploitable: No
Locally Exploitable: Yes
CVE Name: CVE-2012-1890
3. *Vulnerability Description*
There is a bug in the ReadLayoutFile Windows Kernel function that can be
leveraged into a local privilege escalation exploit, potentially usable
in a client-side attack scenario or after a remote intrusion by other
This bug is similar to another bug used by a client-side exploit in
4. *Vulnerable packages*
. Windows XP SP3.
. Windows Vista SP2.
. Windows 7
. Windows 7 SP1.
. Windows Server 2003 SP2.
. Windows Server 2008 SP2.
. Other Windows versions might be vulnerable but were not tested.
5. *Vendor Information, Solutions and Workarounds*
Apply security patch MS12-047 
This vulnerability was discovered and researched by Nicolás Economou
from Core Security Technologies. The publication of this advisory was
coordinated by Fernando Russ.
7. *Technical Description / Proof of Concept Code*
There is a bug in the 'ReadLayoutFile' Windows Kernel ('win32k.sys')
function that can be leveraged into a local privilege escalation
exploit, potentially usable in a client-side attack scenario, or after a
remote intrusion by other means.
Custom keyboard layouts are implemented using a .dll file exporting the
'KbdLayerDescriptor' function which, in theory, returns a pointer to a
structure of type 'KBDTABLES' that is stored in the '.DATA' sections of
the PE file. The 'NtUserLoadKeyboardLayoutEx' is a private function used
by 'LoadKeyboardLayout' to load a custom keyboard layout, as
arguments 'NtUserLoadKeyboardLayoutEx' uses an open file handle pointing
to a keyboard layout library. When the function
'NtUserLoadKeyboardLayoutEx' is correctly called the PE file referenced
by its arguments is mapped in kernel space.
The bug is due to a memory corruption: a double word can be overwritten
in a position relative to the base of the allocated memory in kernel
space. We have to distinguish the following constraints for exploiting
. There is no bound check for the value used to index the '.DATA'
section of the keyboard layout .dll where the actual where the actual
layout descriptor table is stored. (So, we can reference spurious memory
. The file handle used to load the keyboard layout must refer to a
file located in \Windows\System32.
. The value used to index the '.DATA' section of the keyboard layout
is incorrectly bound checked.
We can confirm reliable exploitation for the following Microsoft Windows
. Windows XP SP3,
. Windows Vista,
. Windows Server 2003 SP2,
. Windows Server 2008 SP2.
8. *Report Timeline*
Core Security Technologies notifies MSRC of the vulnerability, including
technical details and a PoC that crashes Windows XP SP3.
Vendor acknowledges the receipt of the information. Vendor warns Core
Security Technologies that it may take longer than normal for a
technical review of the bug because of the Thanksgiving holiday.
Core acknowledges the aforementioned possible delay and wishes MSRC a
MSRC opens case number "MSRC 12000gd" for report tracking.
MSRC mentions over an unencrypted communication channel that they are
currently investigating the issue, and that they'll let Core Security
Technologies know of their findings when the investigation is complete.
Core Security Technologies acknowledges the previous e-mail.
MSRC contacts Core Security Technologies for a quick update, informing
that they were able to reproduce the crash and that it is indeed very
similar to bug publicly exploited at . MSRC informs that they are
currently discussing the next steps they will take with Windows Product
Ivan Arce, current CTO and founder of the Core Advisories Team, leaves
Core after 15 years. Thanks Wari!
MSRC notifies that the release of a fix was scheduled for March 2012.
Core acknowledges the previous update and notifies that Nicolas Economou
has further analyzed the crash (publicly available in exploit-db) and
concluded it is indeed a different issue. Core offers to compile
Nicolas' findings into a private technical report.
MSRC validates Nicolas' findings stating the two issues are separate,
even though they share a same code area.
Core asks if the March publication date still stands.
MSRC notifies that, due to some late findings about app-compat concerns,
they will need more time to issue the patch. MSRC asks to re-schedule
the advisory publication to May 8th.
Core re-schedules the advisory publication to May 8th.
Pedro Varangot leaves the Core Advisories Team. Thanks Peter and good
luck with your new challenges.
Core asks for additional information regarding the actual vulnerable
Windows' versions and specific workarounds for this vulnerability.
MSRC notifies that the actual vulnerable systems are Windows XP/2003 as
Elevation of Privileges and Windows Vista/2008 as Denial of Service.
MSRC also notifies that no workaround has been identified for this
The advisory CORE-2011-1123 is published.
MSRC publishes the Security Bulletin MS12-034  for addressing this
Core notifies MSRC that the vulnerability was not correctly patched in
 and re-sends a PoC to reproduce the issue.
Based on the blog post , MSRC asks for a PoC which triggers the issue
in a Vista/Windows 7 platform.
Core clarifies that this issue seems to be not exploitable in Windows 7
(as it was noted in the blog post ), but it is still exploitable in
Windows Vista and 2008. Core also notifies that the exploit for this
vulnerability was sent to the Core Impact clients on May 8th, 2012.
MSRC notifies that a new patch will be released and a new CVE number
will be assigned to it.
Core acknowledges the update and asks a publication date for this update.
MSRC asks for a conference call to discuss this issue and asks Core to
make no change on the advisory or the blog post until the publication day.
Core requests to keep all the communication process via email in order
to track all interactions and involve all people interested in it. Core
also notifies that the advisory update will be released after the new
patch is published.
Core asks MSRC for additional information regarding this issue.
MSRC notifies that they are targeting July as publication timeframe for
Core acknowledges the publication date and asks for the new CVE number
and any additional information that can be added in the advisory amendment.
MSRC informs that the new bulletin will be published on July 10th, and
the new CVE number is CVE-2012-1890.
MSRC publishes the Security Bulletin Summary for July 2012 .
The advisory CORE-2011-1123 is updated.
10. *About CoreLabs*
CoreLabs, the research center of Core Security Technologies, is charged
with anticipating the future needs and requirements for information
security technologies. We conduct our research in several important
areas of computer security including system vulnerabilities, cyber
attack planning and simulation, source code auditing, and cryptography.
Our results include problem formalization, identification of
vulnerabilities, novel solutions and prototypes for new technologies.
CoreLabs regularly publishes security advisories, technical papers,
project information and shared software tools for public use at:
11. *About Core Security Technologies*
Core Security Technologies enables organizations to get ahead of threats
with security test and measurement solutions that continuously identify
and demonstrate real-world exposures to their most critical assets. Our
customers can gain real visibility into their security standing, real
validation of their security controls, and real metrics to more
effectively secure their organizations.
Core Security's software solutions build on over a decade of trusted
research and leading-edge threat expertise from the company's Security
Consulting Services, CoreLabs and Engineering groups. Core Security
Technologies can be reached at +1 (617) 399-6980 or on the Web at:
The contents of this advisory are copyright (c) 2012 Core Security
Technologies and (c) 2012 CoreLabs, and are licensed under a Creative
Commons Attribution Non-Commercial Share-Alike 3.0 (United States)
13. *PGP/GPG Keys*
This advisory has been signed with the GPG key of Core Security
Technologies advisories team, which is available for download at
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
[ reply ]
Copyright 2010, SecurityFocus