Live data from Hacker News

XSA-108 Advisory

xenbits.xen.org

81–90 of 97 posts

Re: XSA-108 Advisory

#81
post #74
post #69

Earlier quoted context omitted.

This has nothing to do with threat models and everything to do with usecases that make no sense on OpenBSD. With OpenBSD on bare metal, you are not vulnerable to other users of the same bare metal, because there aren't any. With Linux on bare metal, you are not vulnerable to other users of the same bare metal, because there aren't any. With Linux on Xen, you are reasonably resistant to other users of the same bare me…

Usecases with multiple users on one piece of hardware make no sense? Is there a reason (besides the previous question) you are ignoring the ability to use containers as an alternative to virtualization for all of the perks they provide?

I'm not ignoring containers at all. Linux, FreeBSD, and OpenBSD all have some form of user mode containers. All POSIX systems also have user ids. Linux containers are probably the most functional (no citation here -- I know lots about Linux containers and very little about FreeBSD jails) and are also probably the least secure, because of the aforementioned functionality and because they're rather new. (On the other hand, a really well designed Linux seccomp sandbox is probably the most secure option of all.)

Linux on Xen also allows you to have multiple Linuxes on the same Xen machine. This is the most functional of all and probably also the most secure of all, XSA-108 notwithstanding.

(Also, I find this all rather odd. If you want to compare Linux+Xen to OpenBSD, XSA-105 and XSA-106 much bigger deals. They allow code in a Linux container or other sandbox to break out by exploiting a Xen bug to take control of their Linux host.)

Re: XSA-108 Advisory

#83
post #18

Earlier quoted context omitted.

This is just FUD and in the usual insulting De Raadt style of communicating. 'barely has correct page protection' is just a way of saying 'has correct page protection, but I want to be really snotty about it'. So, highlighting a non-problem. No-one is claiming that virtualization makes a system magically completely secure, but do people actually believe that it makes it less secure? (Compared to, running the same sof…

(Compared to, running the same software on the same hardware using a single OS). I don't think so. If you had been running an OpenBSD instance on hardware as a single OS, you would not be vulnerable to having your system's memory read by this hypervisor bug. So... yes.

I'll take the world where we have the odd hypervisor vulnerability over the world where we have to increase power output by multiple orders of magnitudes and pave the planet with datacentres to run every service as a single-instance, non-virtualised server.

I guess Theo prefers runaway global warming to the odd data breach. Which makes him the idiot, to use his own language.

Re: XSA-108 Advisory

#84
post #74
post #69

Earlier quoted context omitted.

This has nothing to do with threat models and everything to do with usecases that make no sense on OpenBSD. With OpenBSD on bare metal, you are not vulnerable to other users of the same bare metal, because there aren't any. With Linux on bare metal, you are not vulnerable to other users of the same bare metal, because there aren't any. With Linux on Xen, you are reasonably resistant to other users of the same bare me…

Usecases with multiple users on one piece of hardware make no sense? Is there a reason (besides the previous question) you are ignoring the ability to use containers as an alternative to virtualization for all of the perks they provide?

You mean containers where you all share the same kernel? Oh yes, no attack surface there.

Re: XSA-108 Advisory

#85
The advisory says PV is safe and HVM is dangerous. What about PV-HVM?

Got a reasonably long list of VPS providers to submit tickets to.

Re: XSA-108 Advisory

#86
Desktop risk analysis from Qubes, http://qubes-os.org via https://groups.google.com/forum/m/#!topic/qubes-devel/HgQ_aW...

---

This seemingly looks like a serious problem, but if we think a little bit about the practical impact the conclusion might be quite different.

First, there are really no secrets or keys in the hypervisor memory that might make a good target for an exploit here. Xen hypervisor does not do encryption, neither it deals with any storage subsystems. Also there is no explicit guest memory content intermixed with the hypervisor code and data.

But one place to see pieces of potentially sensitive data are the Xen internal structures where the guest _registers_ are stored whenever the guest execution is interrupted (e.g. because of a trap). These registers might contain e.g. (parts of) keys or other secrets, if the guest was executing some sensitive crypto operation just before it got interrupted.

The vulnerability allows to read only a few kB of the hypervisor memory, with only relative addressing from the emulated APIC registers page, whose address is not known to the attacker. Still, for the exactly same systems (same binaries running, same ACPI tables, etc) it's likely that the attacker would be able to guess the address of the APIC page. However, it is much less probable she would be able to predict what Xen structures are located in the adjacent memory. Much less the attacker would be able to control what structure are located there, as there doesn't seem to be many ways of how a malicious HVM might be significantly affecting the layout of the hypervisor heap (e.g. force arch_vcpu structures of interesting domains to appear nearby).

Nevertheless, it might happen, by pure coincidence, that an arch_vcpu structure with a content of an interesting VM will just happen to be located adjacently to the emulated APIC page.

In that case, the next problem for the attacker would be lack of control and knowledge over the target VM execution: even if the attacker were somehow lucky to find the other VM's register-holding-structure adjacent to the APIC page, it would still be unclear what the target VM was executing at the time it was suspended and so, whether the registers stored in the structure are worthwhile or not.

It is thinkable that the attacker might attempt to use some form of a heuristic, such as e.g. "if RIP == X, then RAX likely contains (parts of) the important key", hoping that this specific RIP would signify a specific interesting instruction (e.g. part of some crypto library) being executed while the VM was interrupted, and so the key is to be found in one of the registers.

But the attacker's memory reading exploit doesn't offer a comfort of synchronization, so even though the attacker might be so extremely lucky as to find out that

  *(apic_page + guessed_offset_to_rip) == X 
(the attacker here assumes the 'guessed_offset_to_rip' is the distance between the APIC page and the address where RIP is stored in the presumable arch_vcpu structure, that presumably is located adjacently), still there is no guarantees that the next read to

  *(apic_page + guest_offset_to_rax) 
will return the content of RAX from the same moment that RIP was snapshot (and which the attacker considered interesting).

Arguably the attacker might try to fire up the attack continuously, thus increasing chances of success. Assuming this won't cause system to crash due to accessing non-mapped memory, this might sound like a somehow good strategy.

However, in case of a desktop system like Qubes OS, the attacker has very limited control over other domains. Unlike as in case of attacking a VM playing a role of a Web server for instance, the attacker probably won't be able to force the target VMs to do lots of repeated crypto operations, neither choose moments when the target VM traps.

It seems like exploiting this bug in an IaaS scenario might be more practical, though, as the attacker also has some control of domain creation/termination, so can affect Xen heap to some extent. But on a system like Qubes OS, it seems unlikely.

So, are we doomed? We likely are, but probably not because of this bug.

---

Re: XSA-108 Advisory

#87
post #55

Earlier quoted context omitted.

He's just very dramatically pointing out that, oh, there are some changes we now need to account for, and Intel didn't tell us poor open source developers about them, and that's (supposedly) totally unreasonable. Besides the fact that Intel does not owe De Raadt anything (other software makers pay a hefty sum to be partners, while OpenBSD developers insult anyone who doesn't give them free shit), these bugs are a giv…

No, you're moving the goalposts. DeRaadt pointed out that x86 "barely" has a working paging system. A commenter on HN said there was no basis for that statement, that he was picking on something that wasn't broken, that it was just FUD. It was not FUD. That claim has been refuted.

I wasn't addressing the paging system issue, but that was definitely FUD too. FUD does not have to be disinformation per se. Its main property is the spread of a generally negative viewpoint that is intended to persuade the recipient to side with the negative actor.

Even if the paging system is broken, that's no reason to simply stop using VMs on it, or to say it's impossible to have a secure VM on a system with broken paging. It's perfectly possible to have a VM on a broken-paging machine that's more secure than a working-paging machine's OS, with or without a VM.

De Raadt was not trying to make a rational argument about the validity of VMs on faulty hardware. He was literally saying you are stupid if you put a VM on x86 and expect it to be secure. Which is a stupid thing to say without knowing anything about the OSes, or what the alternative might be, either platform or OS-wise, to say nothing of hardening.

De Raadt has a bone to pick with Intel and specifically x86-based machines, and is simply interested in convincing people not to use it by insinuating you're innately not capable of doing secure computing on it. Which is basically untrue. That's why it's FUD.

Re: XSA-108 Advisory

#88

Earlier quoted context omitted.

It might well be fugly but it works . That's the key point. I'm sure Intel (or anyone else), if they could develop x86 again from scratch, and with the benefit of hindsight, would create a much nicer mechanism. But that's just speculation and wishful thinking.

In the age of high level languages and compilers, that's exactly what they should have done, possible twice by now.

Haven't they? I thought x86 was now basically just a legacy compatibility layer on top of significantly more streamlined and optimized RISC-like operations.

Re: XSA-108 Advisory

#89
I wonder if Amazon or someone will take the time to make a ksplice-like system for Xen so that future security upgrades probably won't have to go through such disruptive reboot events.

(Or, for that matter, whether they considered making an ad-hoc machine code patch - based on the source patch, it looks like it would probably be doable just by changing a few bytes. I guess it's a bit risky...)

Re: XSA-108 Advisory

#90
post #89

I wonder if Amazon or someone will take the time to make a ksplice-like system for Xen so that future security upgrades probably won't have to go through such disruptive reboot events. (Or, for that matter, whether they considered making an ad-hoc machine code patch - based on the source patch, it looks like it would probably be doable just by changing a few bytes. I guess it's a bit risky...)

Seems a little unlikely, given Ksplice's patents (now Oracle's patents) covering the area.

From an older post @ https://news.ycombinator.com/item?id=2791756

The first is "Method of finding a safe time to modify code of a running computer program": http://bit.ly/ksplice-1

The second is "Method of determining which computer program functions are changed by an arbitrary source code modification": http://bit.ly/ksplice-2

Post reply on HN