-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop telling VMs the exact physical CPU model in the computer #1142
Comments
This is indeed an identifier that should be hidden from compromised VMs. At least in the anonymity use case. |
exactly, and it is a huge disadvantage that qubes-os still passes the CPUID even with the latest release... please priorities this issue. |
Can't CPU features be enumerated by the VM regardless of what CPUID is reported? |
Does that critical issue still exist in 3.2-rc1 ? |
I wouldn't call it critical, but yes. |
Partial libvirt support is posted: https://www.redhat.com/archives/libvir-list/2017-July/msg00050.html |
This is not as simple a decision as it may appear. Yes, having a larger anonymity set would be nice, however:
|
Although, (perhaps unfortunately) we are already setting CPUID in R4 to stop advertising nested hw virt and SMAP as result of #2881. Disabling SMAP for VMs is an unfortunate workaround and I hope temporary? |
FWIW we don't set vendor string there, only select feature bit (SMAP to 0, VMX/SVM are translated to And given the list of XSAs affecting systems with custom CPUID vendor string, I think we shouldn't do this. If libvirt will support custom vendor string (it doesn't right now), we already have a mechanism to set that. But such change will not be here by default. |
@andrewdavidwong Hi I believe giving empty or random hardware informaiton is very important to anonymity, by preventing rogue software from reading the hardware info in debian and fedora. It can be most effective if it's done at hypervisor level. |
AppVM has no access to most hardware info (especially - no info about your GPU, RAM, MB, disk, network, etc). What it can see, is the CPU model with various details (the CPUID instruction) that is essential for the system within the VM to function correctly (to know what instructions it can use, to know what mitigations against speculative execution should be applied etc). Masking some of of it is potentially possible (like pretending you are running on a CPU from 10 years ago), with all the disadvantages of it. |
Qubes OS does not claim to provide special privacy (as opposed to security) properties in non-Whonix qubes:
Since this would be "spoofing" rather than merely "hiding" the CPU info, it sounds like that would be a separate issue from this one. (It also sounds like it would come with enough disadvantages that it probably shouldn't be the default.) |
Preventing a program inside a VM from finding the out CPU type is unfortunately very difficult due to the unprivileged (no root required) CPU instruction CPUID:
Good points on the complexity were also made earlier already. Even if CPUID was somehow controlled, CPUs can be fingerprinted in other ways to deduce the model.
That is an accurate description of the current situation. May I ask to clarify the interpretation of that FAQ entry? Possible interpretations:
I am only kindly asking for a clarification. Not making any value judgement. Either position is of course very much reasonable given the limited project resources, difficulty to implement such features and so forth. |
Ultimately, it's @marmarek's call, but I'd say (A) and (B) are both partially accurate. We're always open to good contributions, but we recognize how hard it is to get privacy right and how misguided it usually is when people think that they can attain strong privacy with one simple patch to a system that wasn't designed with privacy in mind. Often, it's because they just learned about a certain type of leak, and they assume that patching that one leak is all that's needed to achieve privacy, when in fact there are thousands of other leaks they haven't even learned about yet. This is why we generally defer to a holistic approach like Whonix in the spirit of (A). Nonetheless, there may be cases in which Whonix requires something to be patched in Xen or Qubes in order to do its job, we are, of course, happy to consider and discuss what changes might be needed to support Whonix. In this sense, (B) might be stated too strongly. Of course, we always have to consider the trade-offs. Changes that improve privacy sometimes come at the cost of security and/or usability, so it would be up to the experts (e.g., you, Marek, and other devs) to work out what should be done. |
Currently Qubes lets VMs execute CPUID and get the exact model and microcode revision of the physical CPU installed in the system. This is bad for anonymity and unexpected.
Already discussed in https://groups.google.com/forum/#!msg/qubes-devel/Q8h-RGH5YoA/fzWbi7c-kfoJ but there seems to be no open issue, and it's a critical issue at least for anonymous VMs.
Possible solutions:
The CPUID chosen should be the default libvirt one for the physical CPU microarchitecture (i.e. one for Skylake, one for Haswell, one for Sandy Bridge, etc.) which allows using all CPU instruction set extensions while not giving any more information and should be changeable to a less featureful one (Core 2 or Athlon 64) for increased anonymity if desired.
Ideally Qubes should wait until a few months have passed from the release of a new CPU architecture before it starts advertising it by default, to ensure that the anonymity set is big enough, and it should also wait a random amount of time before changing it on upgrades, to avoid leaking the exact time the user installed the new CPU or changed computers.
It would also be nice to look at whether it's possible to prevent applications indirectly detecting the size of the cache, size of TLBs, the speed of the CPU and other characteristics, although it may not be practical to avoid those.
The text was updated successfully, but these errors were encountered: