11/27/2017
01:06 PM
Larry Loeb
Larry Loeb
Larry Loeb

Microsoft Misses Memory Mistake: The Security That Wasn't

An error in implementing a security routine means millions of users thought to be protected against a particular attack were actually more vulnerable than ever.



Sometimes, the journey ends up in a place totally different from where you thought you would be when you started it. Will Dormann, a security analyst for CERT, found that out last week. He started out looking into Microsoft's patch for Equation Editor (EQNEDT32.EXE), which was compiled 17 years ago, and ended up deep in the bowels of Windows.

What he found was that Address Space Layout Randomization (ASLR), a memory organization technique that is designed to foil a certain kind of attack, had been improperly implemented since the days of Vista. This meant that since the days of Windows 7 this prevention measure had been nonfunctional.

What ASLR does is to randomize where executable code starts inside memory. This is important so that attackers will have no idea of where that code begins and therefore not know the location where they can start to mess with it. But it turns out that the method Windows uses for this needs two steps to be performed, rather than the one step that their tools actually do perform.

The CERT advisory Dormann wrote puts it this way. "Both EMET and Windows Defender Exploit Guard enable system-wide ASLR without also enabling system-wide bottom-up ASLR. Although Windows Defender Exploit guard does have a system-wide option for system-wide bottom-up-ASLR, the default GUI value of 'On by default' does not reflect the underlying registry value (unset). This causes programs without /DYNAMICBASE to get relocated, but without any entropy."

Translating from Geek, that means that even though bottom-up-ASLR (start the ASLR from the bottom of available memory) is supposed to be set by the Windows tool's GUI, it's not. The GUI says it will, but the actual registry code to do this is not set. So, allowing a system-wide ASLR to occur (basically forcing it to happen for all programs) will do nothing. Having "no entropy" means the executable code relocates to the same place every time it gets loaded into memory.

Microsoft responded to the situation with a blog post that unctuously described the ASLR process, and admitted that "CERT/CC did identify an issue with the configuration interface of Windows Defender Exploit Guard (WDEG) that currently prevents system-wide enablement of bottom-up randomization…EMET does not support enabling bottom-up randomization system-wide and therefore cannot directly configure this setting." In other words, they confirmed that this was the situation.

So, how does it get fixed?

If you are a developer, you can use the /DYNAMICBASE flag provided by the Visual C++ linker to enable ASLR in your application and bypass the system-wide call to it.

If you are a user, the only way to deal with it is to manually set the registry key to the correct value. Most users can't do this without messing up their systems.

We are left with the question of how Microsoft could let this kind of critical vulnerability happen over such a long period. Didn't they check at all? And what else haven't they looked at?

This is a big hit to Redmond's credibility, that's for sure.

Related posts:

— Larry Loeb has written for many of the last century's major "dead tree" computer magazines, having been, among other things, a consulting editor for BYTE magazine and senior editor for the launch of WebWeek.

Comment  | 
Email This  | 
Print  | 
RSS
More Insights
Copyright © 2022 UBM Electronics, A UBM company, All rights reserved. Privacy Policy | Terms of Service