Securing Self-Virtualizing Ethernet Devices

Securing Self-Virtualizing Ethernet Devices

Securing Self-Virtualizing Ethernet Devices Igor Smolyar Muli Ben-Yehuda Dan Tsafrir Technion – Israel Institute of Technology figors,muli,[email protected] Abstract Single root I/O virtualization (SRIOV) is a hard- ware/software interface that allows devices to “self virtu- alize” and thereby remove the host from the critical I/O hypervisor path. SRIOV thus brings near bare-metal performance to untrusted guest virtual machines (VMs) in public clouds, enterprise data centers, and high-performance comput- (a) Traditional Virtualization (b) Direct I/O Device Assignment ing setups. We identify a design flaw in current Ethernet SRIOV NIC deployments that enables untrusted VMs to Figure 1: Types of I/O Virtualization completely control the throughput and latency of other, unrelated VMs. The attack exploits Ethernet ”pause” frames, which enable network flow control functional- driver is installed in the guest [20, 69]; (3) the host as- ity. We experimentally launch the attack across sev- signs a real device to the guest, which then controls the eral NIC models and find that it is effective and highly device directly [22, 52, 64, 74, 76]. When emulating a accurate, with substantial consequences if left unmiti- device or using a paravirtual driver, the hypervisor in- gated: (1) to be safe, NIC vendors will have to mod- tercepts all interactions between the guest and the I/O ify their NICs so as to filter pause frames originating device, as shown in Figure 1a, leading to increased over- from SRIOV instances; (2) in the meantime, administra- head and significant performance penalty. tors will have to either trust their VMs, or configure their The hypervisor can reduce the overhead of device em- switches to ignore pause frames, thus relinquishing flow ulation or paravirtualization by assigning I/O devices di- control, which might severely degrade networking per- rectly to virtual machines, as shown in Figure 1b. Device formance. We present the Virtualization-Aware Network assignment provides the best performance [38,53,65,76], Flow Controller (VANFC), a software-based SRIOV NIC since it minimizes the number of I/O-related world prototype that overcomes the attack. VANFC filters pause switches between the virtual machine and its hypervisor. frames from malicious virtual machines without any loss However, assignment of standard devices is not scalable: of performance, while keeping SRIOV and Ethernet flow a single host can generally run an order of magnitude control hardware/software interfaces intact. more virtual machines than it has physical I/O device slots available. 1 Introduction One way to reduce I/O virtualization overhead fur- ther and improve virtual machine performance is to of- A key challenge when running untrusted virtual ma- fload I/O processing to scalable self-virtualizing I/O de- chines is providing them with efficient and secure I/O. vices. The PCI Special Interest Group (PCI-SIG) on Environments running potentially untrusted virtual ma- I/O Virtualization proposed the Single Root I/O Virtu- chines include enterprise data centers, public cloud com- alization (SRIOV) standard for scalable device assign- puting providers, and high-performance computing sites. ment [60]. PCI devices supporting the SRIOV standard There are three common approaches to providing I/O present themselves to host software as multiple virtual services to guest virtual machines: (1) the hypervisor interfaces. The host can assign each such partition di- emulates a known device and the guest uses an unmod- rectly to a different virtual machine. With SRIOV de- ified driver to interact with it [71]; (2) a paravirtual vices, virtual machines can achieve bare-metal perfor- mance even for the most demanding I/O-intensive work- reaching the edge switch. The traffic of virtual machines loads [38, 39]. We describe how SRIOV works and why and host that share the same link remains unaffected; it improves performance in Section 2. thus VANFC is 100% effective in eliminating the attack. New technology such as SRIOV often provides new VANFC has no impact on throughput or latency compared capabilities but also poses new security challenges. Be- to the baseline system not under attack. cause SRIOV provides untrusted virtual machines with VANFC is fully backward compatible with the current unfettered access to the physical network, such machines hardware/software SRIOV interface and with the Ether- can inject malicious or harmful traffic into the network. net flow control protocol, with all of its pros and cons. We analyze the security risks posed by using SRIOV Controlling Ethernet flow by pausing physical links has in environments with untrusted virtual machines in Sec- its fundamental problems, such as link congestion prop- tion 3. We find that SRIOV NIC, as currently deployed, agation, also known as the ”congestion spreading” phe- suffers from a major design flaw and cannot be used se- nomenon [13]. The attack might also be prevented by curely together with network flow control. completely redesigning the Ethernet flow control mech- We make two contributions in this paper. The first anism, making it end-to-end credit-based, as in Infini- contribution is to show how a malicious virtual machine Band [18], for example. But such a pervasive approach with access to an SRIOV device can use the Ethernet is not practical to deploy and remains outside the scope flow control functionality to attack and completely con- of this work. Instead, VANFC specifically targets the de- trol the bandwidth and latency of other unrelated VMs sign flaw in SRIOV NICs that enables the attack. VANFC using the same SRIOV device, without their knowledge prevents the attack without any loss of performance and or cooperation. The malicious virtual machine does this without requiring any changes to either Ethernet flow by transmitting a small number of Ethernet pause or Pri- control or to the SRIOV hardware/software interfaces. ority Flow Control (PFC) frames on its host’s link to One could argue that flow control at the Ethernet level the edge switch. If Ethernet flow control is enabled, the is not necessary, since protocols at a higher level (e.g., switch will then shut down traffic on the link for a spec- TCP) have their own flow control. We show why flow ified amount of time. Since the link is shared between control is required for high performance setups, such as multiple untrusted guests and the host, none of them will those using Converged Enhanced Ethernet, in Section 8. receive traffic. The details of this attack are discussed In Section 9 we provide some notes on the VANFC im- in Section 4. We highlight and experimentally evaluate plementation and on several aspects of VM-to-VM traf- the most notable ramifications of this attack in Section 5. fic security. We present related work in Section 10. We offer concluding remarks on SRIOV security as well as Our second contribution is to provide an understand- remaining future work in Section 11. ing of the fundamental cause of the design flaw lead- ing to this attack and to show how to overcome it. We 2 SRIOV Primer present and evaluate (in Section 6 and Section 7) the Virtualization-Aware Network Flow Controller (VANFC), Hardware emulation and paravirtualized devices impose a software-based prototype of an SRIOV NIC that suc- a significant performance penalty on guest virtual ma- cessfully overcomes the described attack without any chines [15, 16, 21, 22, 23]. Seeking to improve vir- loss in performance. tual I/O performance and scalability, PCI-SIG proposed With SRIOV, a single physical endpoint includes both the SRIOV specification for PCIe devices with self- the host (usually trusted) and multiple untrusted guests, virtualization capabilities. The SRIOV spec defines how all of which share the same link to the edge switch. The host software can partition a single SRIOV PCIe device edge switch must either trust all the guests and the host into multiple PCIe “virtual” devices. or trust none of them. The former leads to the flow con- Each SRIOV-capable physical device has at least one trol attack we show; the latter means doing without flow Physical Function (PF) and multiple virtual partitions control and, consequently, giving up on the performance called Virtual Functions (VFs). Each PF is a standard and efficient resource utilization flow control provides. PCIe function: host software can access it as it would With SRIOV NICs modeled after VANFC, cloud users any other PCIe device. A PF also has a full configuration could take full advantage of lossless Ethernet in SRIOV space. Through the PF, host software can control the en- device assignment setups without compromising their se- tire PCIe device as well as perform I/O operations. Each curity. By filtering pause frames generated by the mali- PCIe device can have up to eight independent PFs. cious virtual machine, VANFC keeps these frames from VFs, on the other hand, are “lightweight” (virtual) Bridge (VEB) [51]. guest VM0 SRIOV provides virtual machines with I/O perfor- mance and scalability that is nearly the same as bare metal. Without SRIOV, many use cases in cloud comput- ing, high-performance computing (HPC) and enterprise hypervisor data centers would be infeasible. With SRIOV it is pos- sible to virtualize HPC setups [24, 37]. In fact, SRIOV is considered the key enabling technology for fully virtu- alized HPC clusters [54]. Cloud service providers such as Amazon Elastic Compute Cloud (EC2) use SRIOV as the underlying technology in EC2 HPC services. Their Cluster Compute-optimized virtual machines with high performance enhanced networking rely on SRIOV [2]. SRIOV is important in traditional data centers as well. Figure 2: SRIOV NIC in a virtualized environment Oracle, for example, created the Oracle Exalogic Elastic Cloud, an integrated hardware and software system for data centers.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us