This is a critical security advisory from VMware (VMSA)
During the 2017 Pwn2Own competition at CanSecWest, two teams succeeded in demonstrating arbitrary host code execution on VMware Workstation. Today, VMware is releasing updated versions of VMware vSphere ESXi, VMware Fusion, and VMware Workstation to address these vulnerabilities.
No active exploitation
VMware is not aware of any active exploitation of the vulnerabilities revealed in this competition. Though the vulnerabilities seem to apply to all VMware virtual platforms (ESXi, Fusion, and Workstation), demonstration exploit code appears to exist only for VMware Workstation for Windows.
The rules of the Pwn2Own competition stipulate that contestants provide their vulnerabilities exclusively to ZDI (the contest organizer), who in turn provides the vulnerability only to the affected company. We appreciate ZDI and the contestant’s commitment to responsible disclosure practices, enabling VMware to release updates before details of the vulnerabilities become known.
The following vulnerabilities were identified and analyzed:
- SVGA I: CVE-2017-4902 critical
Heap overflow leading to arbitrary code execution
- SVGA II: CVE-2017-4903 critical
Uninitialized stack value leading to arbitrary code execution
- XHCI: CVE-2017-4904 critical
Uninitialized stack value leading to arbitrary code execution
- CVE-2017-4905 moderate
Uninitialized memory read leading to information disclosure
VMware also recommends examining the vSphere Hardening Guide and
vSphere Security Guide. Among the recommendations in the guides is to remove unnecessary virtual hardware. Removing unnecessary virtual hardware increases the complexity of exploitation and can partially mitigate the issues, but cannot be a full mitigation due to the nature of modern graphics functionality. Exercise caution: removing virtual hardware can have adverse effects on functionality or performance, and often requires the virtual machine be powered off for reconfiguration.
The best response is to apply the patches which correct these defects. VMware employs technologies like vMotion and VUM to reduce the disruption of deploying security patches. Further, VMware recognizes that deploying patches does carry operational complexities, and understands that further improving this situation is among our customer’s greatest needs.
One common aspect of all these vulnerabilities is the need to run arbitrary code in the guest to begin the exploit chain. (VMware categorizes guest escapes as “remotely exploitable” only for CVSS scoring purposes, as our security model assumes untrustworthy guests). Normal defensive mechanisms like antivirus and firewalls installed in the guest can prevent an attacker from having the degree of access necessary to attack the hypervisor. Locked-down environments like a production database should already disallow running arbitrary code, and thus mitigate this sort of attack.
Customers should consider the need to update for a full mitigation, the absence of active exploitation, the pace at which updates can safely be deployed, and any other risk mitigations (like IDS applications) which may protect their environments. At this point VMware’s recommendation is that customers expedite updating, though need not take emergency measures like taking environments offline.
Some readers may be interested in a more detailed discussion of VMware’s approach to the security landscape.
Pwn2Own and Hypervisor Security Research
VMware engineers have been attending security conferences on a regular basis for many years. This enables us to respond to any discovered vulnerabilities as quickly as possible, and also allows us to develop a constructive relationship with security researchers from around the world. Our engineers have been in contact with the Qihoo 360 team for quite some time, beginning with last year’s Pwn2Own 2016 competition. This year was our first introduction to the Tencent team.
At CanSecWest 2016, Qihoo 360 presented work on using fuzzers to detect virtual machine escapes. That work was primarily on QEMU-based hypervisors (CVEs disclosed) but also including VMware hypervisors (no vulnerabilities disclosed). For the first time, the Pwn2Own 2016 competition included a hypervisor platform (VMware Workstation running on Microsoft Windows 10) as a target; no teams chose to make an attempt.
At Power Of Community 2016 (Seoul, South Korea) during the PwnFest competition, Qihoo 360 and Lokihardt independently demonstrated the same guest escape for VMware Workstation via drag-and-drop functionality (not included in ESXi). VMware engineers were on hand to receive information about that vulnerability (CVE-2016-7461), leading to the release of VMware Workstation 12.5.2 and VMware Fusion 8.5.2 several days later. Further mitigations and fixes for related bugs were included in the 12.5.3/8.5.4 (VMSA-2017-0003) and 12.5.4/8.5.5 (VMSA-2017-0005) releases.
At CanSecWest 2017, the Qihoo 360 team presented details on how they had found and exploited the drag-and-drop bug several months before at PwnFest. Again VMware engineers were on hand, and communicated with the team before the presentation occurred to discuss what would be covered, and understand what techniques the team used to find and exploit vulnerabilities. The same engineers also received full details and clarifications about the vulnerabilities used in Pwn2Own 2017 directly from the researchers from Qihoo 360 and Tencent.
These connections are important within the security community. The Qihoo 360 and Tencent teams are premier commercial security research teams in this space; as much as they profit (in both reputation and financially) from VMware software, VMware benefits in understanding modern offensive security research techniques and being held accountable to modern security practices. The learning and accountability gained from these events is vital to maintaining the high quality our customers expect from VMware’s flagship hypervisor products.
The security landscape has changed dramatically over the past several years. Whereas twenty years ago it took a single bug to break software, and ten years ago it generally took two bugs (an information leak to break ASLR, and the actual exploit), today’s cutting edge defensive technologies can force an attacker to construct a chain of as many as six bugs to break out of a web browser and its associated sandbox. Modern fuzzers like AFL have become several orders of magnitude more efficient at revealing exploitable bugs. With the principles of responsible disclosure to connect researchers and software authors, the end result is ever-better software.
As an anecdote, a significant number of researchers at the CanSecWest conference used VMware Workstation or VMware Fusion to give live demonstrations of their work (both offensive and defensive). We saw researchers use debuggers to simulate (destructive) exploits, show techniques on multiple operating systems during a single talk, or use a virtual machine to simultaneously run their slides and unsafe (un-patched) software to demonstrate a particular technique. VMware recognizes the responsibility that goes with being an important tool for cutting-edge security research, and the inherent requirements of those security researchers to ensure any malware or vulnerable software they may be researching remains contained within virtual machines. As security knowledge moves forward, so do VMware’s technologies and techniques to keep researchers protected.
The Evolving Security Landscape
A “guest escape” – arbitrary code execution on a virtual machine host – is the worst category of bug for virtualization software (CVSS of 10.0). VMware software has done well over time in defending against malicious software, though this is not the first guest escape demonstrated in VMware’s history (see most notably CVE-2009-1244 “Cloudburst”, which also affected the virtual SVGA device implementation).
The single best defense against this type of security issue is depth. A robust chain of defenses includes using firewalls / network IDS to control access to virtual machines, running anti-virus or other host IDS to block malicious software from running on a virtual machine, and the hypervisor itself to isolate virtual machines from each other. At some point in time, any of these layers may miss something important or have a bug; the goal is to have enough layers that not all can be breached simultaneously.
At VMworld 2016 (Las Vegas and Barcelona), VMware included a session on security risks around “guest escapes”. The message then remains the same as the message now: security risks are both human and technical, and we consistently see the human aspect under-prioritized when the technical aspect becomes newsworthy. Hypervisor arbitrary code execution bugs are still VERY complicated to discover and exploit; they command the highest prizes at competition and only the best-resourced teams have been able to enter the space, though the barrier to entry is lessening. By contrast, our experience has consistently shown that the biggest threat to IT of any kind is misconfiguration and lax operational practices. We should also learn from web browsers: the average user is at greater risk from phishing than from a web browser vulnerability, and the most effective defense is to stay up to date with patches.
VMware’s Software Development Lifecycle applies a similar defense in depth strategy. We use code reviews to get human eyeballs looking for problems, and also deploy static analysis tools, threat modeling, external audits, and testing (including fuzz testing) to minimize the chances of a vulnerability escaping detection.
To characterize the change we are seeing in the security landscape right now, there is a gradual evolution in targets that can be attacked. When VMware models threats, we consider three categories of actor. The “nation-state” actor has vast resources but generally employs them against limited targets; such an actor will find a way to breach security, whether by technical means or something simpler (money, ideology). The “professional” actor has more limited resources, and tends to look for the softest and most profitable target; defending against this actor amounts to staying on or ahead of the security research curve. And the “script kiddie” uses off-the-shelf resources and previously-known issues; defending here generally requires little more than staying up to date, and the biggest risk is installations which fail to deploy existing patches. The Pwn2Own competition shows that the difficulty of hypervisor attacks is moving from the “nation-state” category to the upper end of the “professional” category. This is a trend we have been expecting for a while, as security research tools become more powerful.
As offensive security evolves, so does defensive security. With vSphere 6.5, VMware began deploying sandboxing technology around virtual machines to prevent a single arbitrary code execution from spreading across a host – a technique we have adapted from studying how web browsers and cell phones have evolved to defend against offensive security research. We are proactively disabling or removing legacy features – the loss in compatibility is increasingly outweighed by the reduction in attack surface. And we are investing deeply in ease-of-upgrade, recognizing that prompt security patches do little good if they cannot be deployed to production in time.
Ultimately, our security mindset is to ask “when”, not “if”, a security vulnerability will occur. This means being proactive in looking for vulnerabilities, staying in touch with the security community to be aware of current trends and research, and developing more efficient means to deploy the inevitable fixes as they become ready.
As always, our goal is to provide customers with the tools they need to operate at their most efficient, while retaining the security mechanisms we all depend upon in the modern IT environment.