For those unaware, Spectre and Meltdown were security flaws disclosed by researchers earlier this year in processors from Intel, ARM, and AMD, leaving nearly every PC, server, and mobile phone on the planet vulnerable to data theft.
Shortly after the researchers disclosed the Spectre and Meltdown exploits, software vendors, including Microsoft, started releasing patches for their systems running a vulnerable version of processors.
Frisk is the same researcher who previously discovered a way to steal the password from virtually any Maclaptop in just 30 sec by exploiting flaws in Apple’s FileVault disk encryption system, allowing attackers to unlock any Mac system and even decrypt files on its hard drive.
The discovery is the latest issue surrounding Meltdown and Spectre patches that were sometimes found incomplete and sometimes broken, making problems such as spontaneous reboots and other ‘unpredictable’ system behavior on affected PCs.
According to Frisk, the problem with MS’ early Meltdown fixes occurs due to a single bit (that controls the permission to access kernel memory) accidentally being flipped from supervisor-only to any-user in a virtual-to-physical-memory translator called PLM4, allowing any user-mode application to access the kernel page tables.
The PML4 is the base of the 4-level in-memory page table hierarchy that Intel’s CPU Memory Management Unit (MMU) uses to translate the virtual memory addresses of a process into physical memory addresses in RAM.
“The User/Supervisor permission bit was set to User in the PML4 self-referencing entry.
This made the page tables available to user mode code in every process.
The page tables should normally only be accessible by the kernel itself,” Frisk explains in his blog post.
To prove his claim, Frisk also provided a detailed breakdown and a proof-of-concept exploit.
Buggy Patch Allows to Read Gigabytes of Data In a Second
Also since the PML4 page table has been located at a fixed memory address in Windows 7, “no fancy exploits” are needed to exploit the Meltdown vulnerability.
“Windows 7 already did the hard work of mapping in the required memory into every running process,” Frisk said.
“Exploitation was just a matter of read and write to already mapped in-process virtual memory.
No fancy APIs or syscalls required – just standard read and write!”
Once read/write access has been gained to the page tables, it would be “trivially easy” to gain access to the entire physical memory, “unless it is additionally protected by Extended Page Tables (EPTs) used for Virtualization,” Frisk said.
All attackers have to do is to write their own Page Table Entries (PTEs) into the page tables in order to access arbitrary physical memory.
Frisk said he has not been able to link the new vulnerability to anything on the public list of Common Vulnerabilities and Exposures. He also invited researchers to test the flaw using an exploit kit he released on GitHub.
The issue with the Microsoft’s Meltdown patch has been fixed by the company in its March Patch Tuesday, so all admins and users of Windows 7 and Windows 2008R2 are strongly recommended to update their systems as soon as possible.