Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

Microsoft Appears to Have Lost the Source Code of an Office Component (Patched a Binary)
Bleeping Computer ^ | Nov 18, 2017 | Catalin Cimpanu

Posted on 11/20/2017 9:43:38 PM PST by dayglored

The way Microsoft patched a recent security bug has made several security and software experts believe the company might have lost the source code to one of its Office components.

Experts reached this conclusion this week after Microsoft patched a security vulnerability tracked as CVE-2017-11882 that affected EQNEDT32.EXE — the equation editor that was included with the Microsoft Office suite until 2007.

While Microsoft has replaced the old EQNEDT32.EXE component with a new one in 2007, the older file is still included with all Office installations to allow users to load and edit equations created with the old component.

The way Microsoft patched a recent bug raised some eyebrows

Researchers at cyber-security firm Embedi discovered a flaw in this component over the summer. The bug got a lot of media attention because it allowed silent attacks on all Microsoft Office and Windows versions released in the past 17 years with no user interaction.

While most security experts looked at the Embedi 20-page report for details on the bug, one particular company looked at the way Microsoft patched the bug in Office.

Experts from 0patch — who run a platform for instantly distributing, applying, and removing microscopic binary patches — noticed that the patched EQNEDT32.EXE file was almost identical to the old one.

Microsoft manually edited a binary

"Have you ever met a C/C++ compiler that would put all functions in a 500+ KB executable on exactly the same address in the module after rebuilding a modified source code, especially when these modifications changed the amount of code in several functions?," 0patch experts asked rhetorically.

When programmers modify source code and compile a new binary, the compiler modifies the memory addresses of functions when the binary is compiled. This creates a slightly distinct binary every time.

The only way the new EQNEDT32.EXE stayed so similar to its previous version was if Microsoft engineers manually edited the binary itself.

A company like Microsoft that has solid and complex software development and security practices in place would never deem manually binary editing as acceptable.

The only way this happened is if Microsoft somehow lost the source code of a long forgotten Office component.

Embedi researchers pointed out that the component's age is what attracted them to hunt for bugs inside it in the first place.

"The component was compiled on 11/9/2000," the Embedi team pointed out. "Without any further recompilation, it was used in the following version of Microsoft Office. It seems that the component was developed by Design Science Inc. However, later the respective rights were purchased by Microsoft."

Somewhat weird that a component that shipped with Office in the last 17 years did not receive one single update.

Praises to whoever manually patched EQNEDT32.EXE

Manually editing executables to alter a binary's behavior is considered a low-level hack, one that usually causes more problems than it solves. Developers that engage in such tactics usually risk corrupting the entire binary. According to 0patch, the EQNEDT32.EXE patching was a work of art.

The CVE-2017-11882 vulnerability happened because the EQNEDT32.EXE would allocate a fixed size of memory and load a font name inside. If the font name was too long, it would trigger a buffer overflow and allow attackers to execute malicious code.

0patch says it found fixes for this problem —checks to verify and truncate the font's name— but also other modifications in unrelated parts of the binary.

"There are six such length checks in two modified functions, and since they don't seem to be related to fixing CVE-2017-11882, we believe that Microsoft noticed some additional attack vectors that could also cause a buffer overflow and decided to proactively patch them," 0patch said.

In addition, Microsoft optimized other functions, and when the code modifications resulted in smaller functions, Microsoft added padding bits to avoid not messing the arrangement of other nearby functions.

Such efforts to avoid not ruining the EQNEDT32.EXE binary are time-consuming, and no sane developer would have taken this route if he still had access to the source code. Furthermore, Microsoft also modified the binary's version number also by manually editing the binary.

All the clues point to the conclusion that Microsoft lost access to the EQNEDT32.EXE source code, which if you think about the amount of software the company has managed in the last 42 years, it's a wonder it did not happen a few more times before.

"Maintaining a software product in its binary form instead of rebuilding it from modified source code is hard. We can only speculate as to why Microsoft used the binary patching approach, but being binary patchers ourselves we think they did a stellar job," the 0patch team said.


TOPICS: Business/Economy; Computers/Internet; Hobbies
KEYWORDS: microsoft; office; programming; windowspinglist
Navigation: use the links below to view more comments.
first 1-2021-31 next last
Having patched a lot of binaries myself over the years (mostly many years ago), I have sympathy for the programmers who were tasked with doing the fixes.
1 posted on 11/20/2017 9:43:39 PM PST by dayglored
[ Post Reply | Private Reply | View Replies]

To: Abby4116; afraidfortherepublic; aft_lizard; AF_Blue; amigatec; AppyPappy; arnoldc1; ATOMIC_PUNK; ...
Binary editing -- not for the faint of heart! ... PING!

You can find all the Windows Ping list threads with FR search: just search on keyword "windowspinglist".

2 posted on 11/20/2017 9:44:43 PM PST by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 1 | View Replies]

To: dayglored

There are 10 kinds of people in the world. Those who understand binary, and those who do not.


3 posted on 11/20/2017 9:50:59 PM PST by fhayek
[ Post Reply | Private Reply | To 1 | View Replies]

To: dayglored

But now M$ will end up with crap code...oh wait...


4 posted on 11/20/2017 9:51:15 PM PST by bigbob (People say believe half of what you see son and none of what you hear - M. Gaye)
[ Post Reply | Private Reply | To 1 | View Replies]

To: fhayek
> ...10 kinds of people in the world...

I knew my daughter would end up doing programming the day she asked to get a t-shirt with that motto on it. She was 8. And she earned her BS in CompSci this past year. Chip off the old block, she is. :-)

5 posted on 11/20/2017 9:59:48 PM PST by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 3 | View Replies]

To: bigbob
> But now M$ will end up with crap code...oh wait...

Patching a binary doesn't necessarily give you bad code.

The legendary spacecraft programmers at JPL patched binary code in interplanetary spacecraft, literally "on the fly", decades ago and for all I know they still do. And not just fixing bugs found after launch -- sometimes they add or modify a flight function to take advantage of something they learned earlier in the flight.

The awesome aspect is that they had to send the changes by radio, taking minutes or even hours to get there, and then they would pray that the changes worked. Because if they didn't, they might crash or silence a bird worth hundreds of millions of dollars.

6 posted on 11/20/2017 10:04:43 PM PST by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 4 | View Replies]

To: dayglored

They probably have the source code, just no one who can follow all the tricks and gimmicks the original programmers used then tweaked over time as newer versions of the OS and newer hardware eliminated the need for such things.


7 posted on 11/20/2017 10:09:45 PM PST by Rashputin (Jesus Christ doesn't evacuate His troops, He leads them to victory !!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Rashputin

I would say that is highly unlikely, because in order to do a binary patch they would have to deconstruct all of those tricks and gimmicks at assembler level—without decent labels in the code segment or data names in the dseg—and that would be a great deal more difficult than figuring it out from the source, however badly written (even if the original source was x86 assembler itself...)


8 posted on 11/20/2017 10:22:08 PM PST by FredZarguna (And what Rough Beast, its hour come 'round at last, slouches toward Fifth Avenue to be born?)
[ Post Reply | Private Reply | To 7 | View Replies]

To: FredZarguna

Taking it down to assembly level would make it easier to read than a lot of legacy code.


9 posted on 11/20/2017 10:45:43 PM PST by Rashputin (Jesus Christ doesn't evacuate His troops, He leads them to victory !!)
[ Post Reply | Private Reply | To 8 | View Replies]

To: dayglored

What the Hell are you people talking about? All I want is for my putter to start up so I can get to FR!


10 posted on 11/20/2017 10:47:14 PM PST by TaMoDee (Go Pack Go! The Pack will be back in 2018!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Rashputin
"They probably have the source code, just no one who can follow all the tricks and gimmicks the original programmers used then tweaked over time - -"

Happened to me a couple of times on Excel macros that I myself had built or modified to create custom reports from a database. It is embarrassing not to have created a log showing steps or rationale. Relying on memory as one gets older and closer to retirement was just sloppy and complicated the needed continuity training of my successor.

11 posted on 11/20/2017 10:47:29 PM PST by buckalfa (Slip sliding away towards senility.)
[ Post Reply | Private Reply | To 7 | View Replies]

To: dayglored

used to do this for NCR back in the day. it is indeed an art.


12 posted on 11/20/2017 10:55:18 PM PST by dadfly
[ Post Reply | Private Reply | To 1 | View Replies]

To: TaMoDee
> All I want is for my putter to start up...

Many of us older guys are in that same state...

Oh wait, you meant computer...

:-)

13 posted on 11/20/2017 10:58:23 PM PST by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 10 | View Replies]

To: buckalfa
I've been in the "ummmm, I wrote this?" camp a time or two myself.
14 posted on 11/20/2017 11:08:03 PM PST by Rashputin (Jesus Christ doesn't evacuate His troops, He leads them to victory !!)
[ Post Reply | Private Reply | To 11 | View Replies]

To: buckalfa
It is embarrassing not to have created a log showing steps or rationale. Relying on memory as one gets older and closer to retirement was just sloppy and complicated the needed continuity training of my successor.

I seem to remember using "REM" to denote 'Remarks/comments' explaining the purpose of the previous line of code. I was going to say that "REM is not only kindness to those who will later work on your code, it is also your friend!", however, I can't find anything online to confirm that.

(it has been SO LONG since I worked on even a pitifully small bit of code.... REM is all I remember on this subject!)

[my mind is a 10mb hard drive in my 8088 computer which has not been defragged in 70 years...)

15 posted on 11/21/2017 12:01:18 AM PST by BwanaNdege ("The church ... is not the master or the servant of the state, but the conscience" - Luther)
[ Post Reply | Private Reply | To 11 | View Replies]

To: dayglored

Hopefully they lost source code to PowerPoint.


16 posted on 11/21/2017 2:10:40 AM PST by steve8714 (Primary ALL Republican senators. Yeah, all.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: dayglored

There should be a few thousand teenagers in basements in Romania who would be willing to dis-assemble the code for them.


17 posted on 11/21/2017 3:28:37 AM PST by I want the USA back (Cynicism may just keep you from going insane in a world that has chosen its own demise.)
[ Post Reply | Private Reply | To 2 | View Replies]

To: steve8714
> Hopefully they lost source code to PowerPoint.

One can only dream...

18 posted on 11/21/2017 5:15:41 AM PST by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 16 | View Replies]

To: I want the USA back
> There should be a few thousand teenagers in basements in Romania who would be willing to dis-assemble the code for them.

There are, no doubt about it.

19 posted on 11/21/2017 5:16:19 AM PST by dayglored ("Listen. Strange women lying in ponds distributing swords is no basis for a system of government.")
[ Post Reply | Private Reply | To 17 | View Replies]

To: dayglored

“Can you run that report that someone ran for me in 2004?”
“Do you have a report name for it?”
“No, it was 13 years ago!”


20 posted on 11/21/2017 5:20:48 AM PST by AppyPappy (Don't mistake your dorm political discussions with the desires of the nation)
[ Post Reply | Private Reply | To 2 | View Replies]


Navigation: use the links below to view more comments.
first 1-2021-31 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson