-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-24:17.bhyve Security Advisory The FreeBSD Project Topic: Multiple issues in the bhyve hypervisor Category: core Module: bhyve Announced: 2024-10-29 Credits: Synacktiv Sponsored by: The FreeBSD Foundation, The Alpha-Omega Project Affects: All supported versions of FreeBSD. Corrected: 2024-10-19 15:42:15 UTC (stable/14, 14.1-STABLE) 2024-10-29 18:45:36 UTC (releng/14.1, 14.1-RELEASE-p6) 2024-10-19 15:43:46 UTC (stable/13, 13.4-STABLE) 2024-10-29 18:49:55 UTC (releng/13.4, 13.4-RELEASE-p2) 2024-10-29 18:53:41 UTC (releng/13.3, 13.3-RELEASE-p8) CVE Name: CVE-2024-51562, CVE-2024-51563, CVE-2024-51564, CVE-2024-51565, CVE-2024-51566 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background bhyve(8) is a hypervisor that runs guest operating systems inside a virtual machine. II. Problem Description Several vulnerabilities were found in the bhyve hypervisor's device models. The NVMe driver function nvme_opc_get_log_page is vulnerable to a buffer over- read from a guest-controlled value. (CVE-2024-51562) The virtio_vq_recordon function is subject to a time-of-check to time-of-use (TOCTOU) race condition. (CVE-2024-51563) A guest can trigger an infinite loop in the hda audio driver. (CVE-2024-51564) The hda driver is vulnerable to a buffer over-read from a guest-controlled value. (CVE-2024-51565) The NVMe driver queue processing is vulernable to guest-induced infinite loops. (CVE-2024-51566) III. Impact Malicious guest virtual machines may be able to perform a denial of service (DoS) of the bhyve host, and may read memory within the bhyve process that they should not be able to access. IV. Workaround No workaround is available. Virtual machines that provide none of the NVMe, virtio, and hda devices to the guest are not vulnerable. V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date. Restart bhyve processes, or reboot the system. Perform one of the following: 1) To update your vulnerable system via a binary patch: Systems running a RELEASE version of FreeBSD on the amd64 or arm64 platforms, or the i386 platform on FreeBSD 13, can be updated via the freebsd-update(8) utility: # freebsd-update fetch # freebsd-update install 2) To update your vulnerable system via a source code patch: The following patches have been verified to apply to the applicable FreeBSD release branches. a) Download the relevant patch from the location below, and verify the detached PGP signature using your PGP utility. # fetch https://security.FreeBSD.org/patches/SA-24:17/bhyve.patch # fetch https://security.FreeBSD.org/patches/SA-24:17/bhyve.patch.asc # gpg --verify bhyve.patch.asc b) Apply the patch. Execute the following commands as root: # cd /usr/src # patch < /path/to/patch c) Recompile the operating system using buildworld and installworld as described in . Restart the applicable bhyve processes, or reboot the system. VI. Correction details This issue is corrected as of the corresponding Git commit hash in the following stable and release branches: Branch/path Hash Revision - ------------------------------------------------------------------------- stable/14/ 86ba5941b132 stable/14-n269162 releng/14.1/ fcd9a2d8a5bd releng/14.1-n267723 stable/13/ df1a36fdfae6 stable/13-n258536 releng/13.4/ 5d07a7e902fa releng/13.4-n258265 releng/13.3/ adb7b541aea1 releng/13.3-n257475 - ------------------------------------------------------------------------- Run the following command to see which files were modified by a particular commit: # git show --stat Or visit the following URL, replacing NNNNNN with the hash: To determine the commit count in a working tree (for comparison against nNNNNNN in the table above), run: # git rev-list --count --first-parent HEAD VII. References The latest revision of this advisory is available at -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAmc0Jk8ACgkQbljekB8A Gu8imQ/+K7WbzZrsVpMdXLEtXwaXsPuitgX2GVHlsv+d4Vc/0Zc992yEDmLizj3s Y4hrHDqQGLFwr/VjZy0wFZtVEwL1qLJ49N98NDwEsE+SV4wsD/fMceOAe7KNTkNP JwihXyNCMmghRtFkf8ytoZQeo6X2dEzQRez7RhoYQG9LVsbyPo+/aJzsUTaQVE9C yRyb5d4HFXJmMlk/c545WfQsxlYdn7E3ZFws86/VKcWJ4ZQFdeIHd2F048q/Bk69 bbK7DRQ+frJ6ubCk1CRKTj/BrSCtjJKf8Iokl6+UCI6ufoAgbNT6qCoJleHP2fUr FfrVRGvxHCI6O06Lhws6LlWO3l8yd0/AFpu+hu9GmFsYhWj+DAgAMlFypgm4cwqc f4TugRUeQjz3IPfpHT0zeUqW+3q0mT54mzIbmKJcjiaiA8L12FOpZYf3IFIJg9YU +rDpaTMSiH0aNe9WpoACsNzMC3aH/hm6hZ5CyO2Qp7w1xcr9CKB7i3D3yw2XF9+x rNQuA14UkGxiT6jDvS51A8AZOFS/hAPhFKFPJ0C2ZEXa4dEwA45g3neKboggQlxy g7nYfduGjYygS0l/Hq+aEauyZL673dulTRWTex5SyOs7ke88zhxxDzLO/XvILpNT rUpyHM2y2l199HOVeqe18shrLG6Dz1rYq+QvGOg/QD3Zca7+f4g= =9r+d -----END PGP SIGNATURE-----