From nobody Thu Sep 19 15:48:49 2024 X-Original-To: freebsd-security-notifications@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X8g0y0kPWz5X8ZY for ; Thu, 19 Sep 2024 15:48:50 +0000 (UTC) (envelope-from security-advisories@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X8g0x4QYTz4Qrj; Thu, 19 Sep 2024 15:48:49 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726760929; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=BJNKaD5q2HZcveB+sT+jmRqRYb5p5lxHsO/6QsTd4nc=; b=a5efBUEItfIoPcqqG6ws35ecxkmnc2jXsavosQGY9AsoNOxdLs471DtPka/bjhhe2Q6mKV l7g8dc4XdKWKwvkEcR5bHRzkmy0XExa21h52oIKZOHC+5enmq9MqYB1tUsfW2tR4JEbQBF cNMMUR/5broOzue4OBcrw6nx8WNRT2HHpoCC9dZQh+1g6TuvqjNMIDM1sqU7EHjpTFu5hi tUMD0unIuZqYpOgHinoTSV3HeiKt9SbkoJVxD51Edajg6CjrDC0Mm8o4NKw7EXohJrb4eD VlS8b5YiPhIg6lWr2EZJ6QrqeVWFRWsx8hAygNUdJmMI/KBrWVqloPmbMsLIfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726760929; a=rsa-sha256; cv=none; b=EIdUIaLZcXf+4vD+AJ7ZhHF1+hlMrvbSUqhfyCWT4kz6P9Tapaf9QaSZwx6Xi2rT2jaTEd /SY2YZCRw55DwJp91qyFODujD3KV+tfOOKMtIYvUFvG7yzR0eaKDYJu9ovCrQh8t6d+3wL 9eebbw18mtBYMtmLLQfuAHs49ArFu6toN5+/F4SIJnpqK1uE2FWNJRkL7oypGzQS287ipb Z9JkoS6vCDWXS7vM3KstDLTfcrw3GVRKTkw1rEwm0VngAY9ptbOQoypxK8d7//W0NWv7Eu Wc006ZexdK1V2FJKmkLlTq9fD5+4EN9K+qClNSFECi0wOD2Fj0IYYBf59FAs5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726760929; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=BJNKaD5q2HZcveB+sT+jmRqRYb5p5lxHsO/6QsTd4nc=; b=n0vr5SNQLH3WgfnqeEeCLwAu/P0O/+TSpDx3NUzwAAzlv9YpNJoQwcSkSb9E7kp+/SF6cg tLUqxQUR0KIvJPvLJOaAXEUnNTl9lKtTc7GvsuqNqMvuEJ4d+YUeD3EuVBY7MgV2u/rIhv g9cYmS5+aKhSEZLzVoGx6qCpe4uUsAUVyhcGsZmAkK2VECQCr5yEAqNsZkse9XKkrqNfIx KSLJ3GR6cMQC/mEOg4q9zNRcGUlKVg25y9ya02Uv+H3yZ1OkZDZ7ZylhMM+f0lzqThuhWJ br2UkPJ4xa6x2bOLo7fKRTbK1IfgXos/fiANn6L4OVg97mlZoMO6uh9gMB+PxQ== Received: by freefall.freebsd.org (Postfix, from userid 945) id 76F641C41A; Thu, 19 Sep 2024 15:48:49 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-24:15.bhyve Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20240919154849.76F641C41A@freefall.freebsd.org> Date: Thu, 19 Sep 2024 15:48:49 +0000 (UTC) List-Id: Moderated Security Notifications [moderated, low volume] List-Archive: https://lists.freebsd.org/archives/freebsd-security-notifications List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-security-notifications@freebsd.org Sender: owner-freebsd-security-notifications@FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-24:15.bhyve Security Advisory The FreeBSD Project Topic: bhyve(8) out-of-bounds read access via XHCI emulation Category: core Module: bhyve Announced: 2024-09-19 Credits: Synacktiv Sponsored by: The FreeBSD Foundation, The Alpha-Omega Project Affects: All supported versions of FreeBSD. Corrected: 2024-09-19 12:40:17 UTC (stable/14, 14.1-STABLE) 2024-09-19 13:30:18 UTC (releng/14.1, 14.1-RELEASE-p5) 2024-09-19 13:30:44 UTC (releng/14.0, 14.0-RELEASE-p11) 2024-09-19 12:48:52 UTC (stable/13, 13.4-STABLE) 2024-09-19 13:35:06 UTC (releng/13.4, 13.4-RELEASE-p1) 2024-09-19 13:35:37 UTC (releng/13.3, 13.3-RELEASE-p7) CVE Name: CVE-2024-41721 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 bhyve can be configured to emulate devices on a virtual USB controller (XHCI), such as USB tablet devices. An insufficient boundary validation in the USB code could lead to an out-of-bounds read on the heap, which could potentially lead to an arbitrary write and remote code execution. III. Impact A malicious, privileged software running in a guest VM can exploit the vulnerability to crash the hypervisor process or potentially achieve code execution on the host in the bhyve userspace process, which typically runs as root. Note that bhyve runs in a Capsicum sandbox, so malicious code is constrained by the capabilities available to the bhyve process. IV. Workaround No workaround is available, but guests that do not use XHCI emulation are not impacted. V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date. Guest operating systems emulating USB devices with XHCI need to be restarted for the correction to be applied (i.e., their corresponding bhyve process needs to be terminated and started again). 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:15/bhyve.patch # fetch https://security.FreeBSD.org/patches/SA-24:15/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 corresponding 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/ 419da61f8203 stable/14-n268745 releng/14.1/ 3c6c0dcb5acb releng/14.1-n267716 releng/14.0/ ba46f1174972 releng/14.0-n265453 stable/13/ 2abd2ad64899 stable/13-n258347 releng/13.4/ 5f035df278cc releng/13.4-n258258 releng/13.3/ e7a790dc3ffe releng/13.3-n257468 - ------------------------------------------------------------------------- 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 corresponding part of the security audit report as provided by Synacktiv will be published in due course. The latest revision of this advisory is available at -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAmbsPQ0ACgkQbljekB8A Gu/6chAAzST6xGx6RCb7MAHeZbqE3mTTUFoEkElPG3OiFsnFDySDnk0kKIjCNRbq GssLGYfUerFYD4/jDhGLApZnBnPhaTruNgwi38d8Pg4pkcqGv8Y5xSdOQBN83Rjq WiEgRqysuaE6HhvNN+JYf690M1Z6Tz0WkqoUJa8ZB8WcDnvBNQwMM0Prmo1RTZGR UXxftj+is3EQFUQs/3GcPRzTcp8Cu5QZnfFdbGph6Da/ZIQ6NaslYgslWvmsYHzP AVb/WI54VnIuMVoRIDWGtjjQa8p2H+dRih67clZYFxl2ya85aK78UrrtPk8x4dci 9KsISpKidqC/ofdT4mHpNH3Uxx4N2ymPJG6xJ/MGmDmrIIk1vjKejy9RVSJzt4QN Iu1u/8d5NVXsMxbKQMEKqXY2dPFKi17S+EnhKzJUjtXeBxcMbNPh2Xcl+BmI8cZ2 WuJvfplzu5Wcvd3LUa7s0Z3AHKktiMr1IGIlk8XEEee0b7k164imZlRUZFTCYA6S dNGTQ2UcHZz7W2Sk2HZf8CdNEgQQftW0BDc2IIs3lyA2WyPsIjGByUl987k3veQa fQCXzf7cp/a0rOZ9KngMxdJap+TBKCsPLEFm46i074ngmuoJZsW3xd7ZD8hLFlPX eaKh5MjWsHHfTYPRxeUKk2j9dobzN1ZP7AYWDasaDxZ4kmVIuEE= =FVQ2 -----END PGP SIGNATURE----- From nobody Thu Sep 19 15:49:02 2024 X-Original-To: freebsd-security-notifications@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X8g1B5kBrz5X8wn for ; Thu, 19 Sep 2024 15:49:02 +0000 (UTC) (envelope-from security-advisories@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X8g1B3wRTz4R4l; Thu, 19 Sep 2024 15:49:02 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726760942; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=2FjUZgxBnUT6Al2jZ82pTZprEnjzBacYLGSUtY3h4+U=; b=MMjtOW2z8/8u7dPlGMQZjwemRP0Ltv1LCYyezzP5tnpldXC0aUQIL0ksizOY6RYjSf4PKx 9HXTwK5FDczyFp9+eZzyfnYKL0bngGxNdysD/a31ZzycT7n1Dd/fTjGHn0PItuRVNZLa8M tPJ+BsOC6rKK8FSviaElEgHE47YYTfCDwHq9Is+beFVuJx/2crr7zTa2bvqT6yxY57lgMi sgtgd3nH3vdUlUgnwYBZLhB2oa2FGSuW54WygCXgMSDD/cYbRzdALPcccjgCT+3dyHwQsM YrYKvJU+5JOtRFJ+zbK+8kJgRCAI4naA6R2GqtCOGWyeRmVAl6zfXxFsQ+zXnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726760942; a=rsa-sha256; cv=none; b=sdiIWZkq6RUiW+naD+ZxpUdYK2jkMHw6Pj3xKAfCwskUR9RKEUxqvKeyATUvqFtXAdu8B+ L3Vp58S4pOw32lSn3aPaB3yygfX1zejWVx6gszFyHmZGQRrZNsUCQqgCDQSf5CXUOpF+JW a3Ye+o5Y+qnnhwiFkOxZQShS8T5J0pet/xHCc8G3w5HxlG0Q87K4H1gDkrpxCLh7A5+tzH inuRimhmpngPZySWt/ZjKmTtzsgXEDAcLzT+7RLil1N7R2go9u5CKuAF2dau8Kkbe533UB 7R9BVCcTHGAg3JmhY//RfJmC/x+3mVN0EFrRFuZO6bgeNYw/MQnyFBNVZn+jEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726760942; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=2FjUZgxBnUT6Al2jZ82pTZprEnjzBacYLGSUtY3h4+U=; b=jqQlVaS4AHnCC2FJ8epaIcffcxIRrnsvNG46jJ0RcIYUPKh5H4DBCzCSIcV3ftN4cSVa6C HyjT8Dszo6AvdKss5SjNt+KS+/OUKnkJcnBsB6Q9xMYH1eb0ZFrEXH5RXxeH7F+KNj9545 CkOSraPtKJ993rX8ssFRfDf4RHjR1mGt19j2kzp9mrZRI1uZH2CkaRQtfK23/cdwfawvZC XXhtxozkfuSw3NWlnzdu7xUNk6W4qo78zGt6MPF5Evf4vmMHvL+hnN22XXl6Y+3C7m2Hqb SPPA2iOSWOI7gBaB0ATtCvOZO/mpkUhnnL469XPjkU4nE9d8JNRy1PTgFeJ7iQ== Received: by freefall.freebsd.org (Postfix, from userid 945) id 6F6AE1C334; Thu, 19 Sep 2024 15:49:02 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-24:16.libnv Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20240919154902.6F6AE1C334@freefall.freebsd.org> Date: Thu, 19 Sep 2024 15:49:02 +0000 (UTC) List-Id: Moderated Security Notifications [moderated, low volume] List-Archive: https://lists.freebsd.org/archives/freebsd-security-notifications List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-security-notifications@freebsd.org Sender: owner-freebsd-security-notifications@FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-24:16.libnv Security Advisory The FreeBSD Project Topic: Integer overflow in libnv Category: core Module: libnv Announced: 2024-09-19 Credits: MiƂosz Kaniewski Affects: All supported versions of FreeBSD. Corrected: 2024-09-15 16:59:15 UTC (stable/14, 14.1-STABLE) 2024-09-19 13:30:20 UTC (releng/14.1, 14.1-RELEASE-p5) 2024-09-19 13:30:45 UTC (releng/14.0, 14.0-RELEASE-p11) 2024-09-15 16:59:51 UTC (stable/13, 13.4-STABLE) 2024-09-19 13:35:07 UTC (releng/13.4, 13.4-RELEASE-p1) 2024-09-19 13:35:38 UTC (releng/13.3, 13.3-RELEASE-p7) CVE Name: CVE-2024-45287 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background libnv (also called nvlist) is a general-purpose library designed for storing name-value pairs. This library can serve as an Inter-Process Communication (IPC) framework, enabling processes to exchange data. For example, it is used in libcasper to communicate between privileged and unprivileged processes. Additionally, libnv can function as an interface for communication between userland and kernel. Originally, libnv was inspired by OpenZFS nvlist. However, the implementations are separate. This advisory is only about base system implementation of libnv, not a OpenZFS one. II. Problem Description A malicious value of size in a structure of packed libnv can cause an integer overflow, leading to the allocation of a smaller buffer than required for the parsed data. The introduced check was incorrect, as it took into account the size of the pointer, not the structure. This vulnerability affects both kernel and userland. This issue was originally intended to be addressed as part of FreeBSD-SA-24:09.libnv, but due to a logic issue, this issue was not properly addressed. III. Impact It is possible for an attacker to overwrite portions of memory (in userland or the kernel) as the allocated buffer might be smaller than the data received from a malicious process. This vulnerability could result in privilege escalation or cause a system panic. IV. Workaround No workaround is available. V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date and reboot. 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 # shutdown -r +10min "Rebooting for a security update" 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:16/libnv.patch # fetch https://security.FreeBSD.org/patches/SA-24:16/libnv.patch.asc # gpg --verify libnv.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 . d) Recompile your kernel as described in and 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/ 056c50c48be3 stable/14-n268739 releng/14.1/ f67468e6e5e2 releng/14.1-n267717 releng/14.0/ e9d57be06e23 releng/14.0-n265454 stable/13/ d84fced6b468 stable/13-n258342 releng/13.4/ 2cffa6354d9f releng/13.4-n258259 releng/13.3/ 417e81a40091 releng/13.3-n257469 - ------------------------------------------------------------------------- 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----- iQIzBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAmbsPQ8ACgkQbljekB8A Gu9aMBAA1N3FliBdeklIU0XGoyrvS0z7goFpFKeLVlkIHssYzZQAWHMILHET6O9n Gv5vICw5vGDWv/1Rb9muCMQ4wcEW/c/YFEU0FM3VFTgJ+fQrA4ZO/NjpRSixiGDk uVkJ25Fo2TMp58ITPWmT3Nj1MJ0x9xNzMxXhLk2JgK/sEMH+/Giju8Zq7XojHHC0 QluYmz1V3EClPXiArkcgt/pagQ24b5yYmOAKGQGHEdRM18QWeJzJ4kUBzATcUVjv RWkLHz69emH6aQ3JNwyuEQlK/Xda3ge2zMIJ4tYObg21dEFdgqnFoLFrylCUkgIE T86QPQfb0HGTRhnSjdh/NN5qyiOo9q4FzpIsI3eJ3XJgk0/T/O8Rv+2fexAm0g3+ 37kgkxohETi6RQc3D4ClpmW7bP1DEK8uUwUGeJgCNmkpE4DVpLmGZ0tNbSf/0Mk6 slYSHb6dF6wNB4AV/1HIusp6i2GlPziNYkhlslkRQgeyXO9T1bWxYqdkYihDFLRs PStlk1Diu0p+h3r08sX3LQrszBp1bLGkqaipFPLBwWStxYne9nsClORFhN4q9i+4 fAnWxIRBXH62fJTy1DCPFqpI9zyvQTkVHQVKu5d+JgaTmTPsfJ3MIXdkGdAEV6+m xbZSFwd2e8uzPIlZke2JmaT4xVv1T92lWu7Ywf8M0eEYWg5WQi8= =OHm5 -----END PGP SIGNATURE-----