QEMU Root Shell Access Vulnerability

AMD ID:    AMD-SB-3012
Potential Impact: Guest OS Root Shell Access from Malicious Host 
Severity: N/A

Summary

Researchers from the University of Tokyo shared with AMD a paper titled “A Root Shell Access Vulnerability in QEMU for AMD SEV-SNP Confidential Virtual Machines.”

The research paper reports that a vulnerability present in the AMD development Quick EMUlator (QEMU)  for SEV-SNP VMs could allow a malicious host to access the guest OS's root shell. 

The researchers note that this vulnerability exists in the measured direct boot, where the attestation report includes the hashes of the kernel, the initrd (initial ramdisk), and kernel arguments but doesn’t include the hash of ACPI tables. Therefore, the malicious host can place maliciously crafted ACPI Machine Language (AML) code into the guest and cause it to be executed within the guest, modifying memory to execute a root shell.

The paper describes several potential mitigations for this vulnerability such as disabling ACPI, Randomizing initrd (initial ram disk) address, Measuring ACPI data, and using virtual TPMs.

AMD confirms that the code against which the issue is reported is now available within the upstream QEMU. This is a vulnerability in the guest Linux® kernel having to accept and trust arbitrary ACPI data from a hypervisor and hence any hypervisor or VMM like QEMU would be impacted as well.

Affected Products

QEMU for AMD SEV-SNP confidential virtual machines (https://github.com/amdese/qemu/tree/snp-latest)

Mitigation

AMD recommends the measurement or sanitization of ACPI tables, such as the use of a vTPM. Preview code for confidential compute enabled vTPM support can be found at the link below. 

Coconut-SVSM: https://github.com/coconut-svsm

Acknowledgement

AMD thanks Takahiro Shinagawa, Manami Mori, and Takaaki Fukai from the University of Tokyo for reporting this issue and engaging in coordinated vulnerability disclosure. 

Revisions 

Revision Date  

Description  

2024-12-09 Initial publication

DISCLAIMER

The information contained herein is for informational purposes only and is subject to change without notice. While every precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and typographical errors, and AMD is under no obligation to update or otherwise correct this information. Advanced Micro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the contents of this document, and assumes no liability of any kind, including the implied warranties of noninfringement, merchantability or fitness for particular purposes, with respect to the operation or use of AMD hardware, software or other products described herein. Any computer system has risks of security vulnerabilities that cannot be completely prevented or mitigated. No license, including implied or arising by estoppel, to any intellectual property rights is granted by this document. Terms and limitations applicable to the purchase or use of AMD’s products are as set forth in a signed agreement between the parties or in AMD's Standard Terms and Conditions of Sale.

AMD, the AMD Arrow logo, and combinations thereof are trademarks of Advanced Micro Devices, Inc. CVE and the CVE logo are registered trademarks of The MITRE Corporation. Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies. Third party content may be licensed to you directly by the third party that owns the content and is not licensed to you by AMD. ALL LINKED THIRD-PARTY CONTENT IS PROVIDED ‘AS IS’ WITHOUT A WARRANTY OF ANY KIND. USE OF SUCH THIRD-PARTY CONTENT IS DONE AT YOUR SOLE DISCRETION AND UNDER NO CIRCUMSTANCES WILL AMD BE LIABLE TO YOU FOR ANY THIRD-PARTY CONTENT. YOU ASSUME ALL RISK AND ARE SOLELY RESPONSIBILITY FOR ANY DAMAGES THAT MAY ARISE FROM YOUR USE OF THIRD-PARTY CONTENT.

© 2024 Advanced Micro Devices, Inc. All rights reserved.