Live data from Hacker News

Multiple OS Vendors Release Security Patches After Misinterpreting Intel Docs

bleepingcomputer.com

41–50 of 94 posts

Re: Multiple OS Vendors Release Security Patches After Misinterpreting Intel Docs

#41
post #26
post #3

Wow, the article shows that many vendors mis-read the docs: Apple, Microsoft, FreeBSD, Red Hat, Ubuntu, SUSE Linux, and other Linux distros...as well as VMware and Xen. This is going to be a busy day!

And in Germany it's national holiday. Really great.

Not just Germany, a very large chunk of Europe has a holiday today. Belgium, France, Netherlands, Portugal, the Nordics and Switzerland I'm sure about, there may be others.

Re: Multiple OS Vendors Release Security Patches After Misinterpreting Intel Docs

#42
post #34

Earlier quoted context omitted.

> To fix this, the CPU has a wild card: When you change SS, you get exactly 1 instruction that will not be interrupted. The idea is you use that instruction to change (e/r)SP and make the stack valid again. If there is a need for an interrupt, it will be delayed for 1 instruction. I wonder, why could not they make a single instruction to change both SS and SP?

They probably could, but it would have had a large silicon cost for 1980 without performance benefit. That and ISA incompatibility.

Adding an interrupt delay is also not free and requires changes on hardware level. But if it was done in 80s then of course it was a safe hack because there was no kernel and user mode isolation at that time.

Re: Multiple OS Vendors Release Security Patches After Misinterpreting Intel Docs

#43

The vulnerability notes[1] say Apple patched this on May 8, but my last security update was May 3 and I don't currently show any available updates... I wonder if the May 3 patch fixed this, or if my computer might not be affected. [1] https://www.kb.cert.org/vuls/byvendor?searchview&Query=FIELD...

The May 3 patch fixed it. The nature of the fix was such that Linux and Mac OS were able to patch it early without revealing much.

In fact, the Linux fix was a patch I wrote in 2015 (for unrelated reasons) and just never got around to upstreaming.

Re: Multiple OS Vendors Release Security Patches After Misinterpreting Intel Docs

#44
post #8

Interesting that some of the BSDs (Dragonfly, FreeBSD) are listed as Affected and others (NetBSD and OpenBSD) are listed as Not Affected.

Dragonfly descends from FreeBSD so it makes sense that it's affected. The other BSD's have different kernels and vastly different development histories as well.

Some BSDs never allowed debug register writes in the first place, so they were immune.

Re: Multiple OS Vendors Release Security Patches After Misinterpreting Intel Docs

#46
post #37

Earlier quoted context omitted.

Why can't there be automated test suites that catch unauthorized access issues before ship (if not before merge commit)? Usually the search space is too large.

Isn't that what fuzzing is for?

I’d be truly amazed if a fuzzer could have caught this one. You need to invoke debug syscalls with the right parameters and the do a magic two-to-three instruction sequence.

Re: Multiple OS Vendors Release Security Patches After Misinterpreting Intel Docs

#47
post #37

Earlier quoted context omitted.

Why can't there be automated test suites that catch unauthorized access issues before ship (if not before merge commit)? Usually the search space is too large.

Isn't that what fuzzing is for?

It's what formal verification is for!

Re: Multiple OS Vendors Release Security Patches After Misinterpreting Intel Docs

#49
post #34

Earlier quoted context omitted.

> To fix this, the CPU has a wild card: When you change SS, you get exactly 1 instruction that will not be interrupted. The idea is you use that instruction to change (e/r)SP and make the stack valid again. If there is a need for an interrupt, it will be delayed for 1 instruction. I wonder, why could not they make a single instruction to change both SS and SP?

They probably could, but it would have had a large silicon cost for 1980 without performance benefit. That and ISA incompatibility.

The cost would not have been very big. The 8086 had microcode, and there were the very similar LDS and LES instructions. There were plenty of unused slots in the opcode table so that wasnt it the reason either. There are weird instructions aplenty like XLAT or AAA/AAS/AAD/AAM, so it wasnt as if they had a pressing silicon shortage.

Maybe they dindt think about it, and fixed it with a quick hack once they got aware of the problem? The whole segment register story was very hacky from the start.

Intel might have dumped the segment registers in i386 32 bit protected mode, as they cleaned up a lot of other troublesome corners around that time. But, well, they didn't, so we have to deal with it today.

Re: Multiple OS Vendors Release Security Patches After Misinterpreting Intel Docs

#50
post #37

Earlier quoted context omitted.

Why can't there be automated test suites that catch unauthorized access issues before ship (if not before merge commit)? Usually the search space is too large.

Isn't that what fuzzing is for?

Concolic testing would probably catch it, but only if the person that implemented the hardware model for the theorem prover understood the Intel documentation, which seems unlikely.

Basic fuzzing probably wouldn’t catch this; as the other comments point out, the search space is probably too large, and the set of vulnerable executions is probably too small for an undirected random search.

Post reply on HN