From owner-freebsd-security@freebsd.org Tue Aug 24 20:52:43 2021 Return-Path: Delivered-To: freebsd-security@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3FAB9660B26 for ; Tue, 24 Aug 2021 20:52:43 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GvLsR0yvQz4ppk; Tue, 24 Aug 2021 20:52:43 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1629838363; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=Lo9tyzYaQG7I+MFFtorFKoLAxZuI3ME4f3p/xWqY7qY=; b=y2rb+yuBEGswL7cq8zReIhpSii/yCLdTDLFecFdKazD9CxXnY7LWS5IEM9qLmwZTT7N+tC 2tww6f6/fvzsvscUUhOxqfT77hZOq2DzN9EHFuplgQlzk/vJlHGNDKntK0W9iT3dZ8wwyE jjp0COO0fsUG2DNnaDIuKzdMZUk7OmU0jSenwtrMBwZ5N11fbFA+HDPMLqzD8z9sGENyhx JVY9Je+QDPFLR+F2uZmpHPpHKEcSF1rI7tPmD8QsmumxMkcwoGJtpPHdPo0Iyp3GCY3DY+ /w3lJW6TBMaF9zK6uQbZvLkeKTJFH+xnI71VULjHy6R9x6WjnI1G9vQchN1yMw== Received: by freefall.freebsd.org (Postfix, from userid 945) id 0976172E9; Tue, 24 Aug 2021 20:52:43 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-21:13.bhyve Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20210824205243.0976172E9@freefall.freebsd.org> Date: Tue, 24 Aug 2021 20:52:43 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1629838363; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=Lo9tyzYaQG7I+MFFtorFKoLAxZuI3ME4f3p/xWqY7qY=; b=c7h0AEq1RfRBy6FgSrx7gfFQlHfQtxoNMFpK1VA69fLHStLp1MnGXOQZ/NuByPkafJfzYP ZIHXtw1WwumD3gNwMv3//D/vzYjxccRHZCtjkjAeuo/85Ig6eDOuMqGzKMB7qRIbDPxeC6 6eVGVQFTUQVmdXa207kOb0YPL88V7+2IMlYy4Un5aFWO3W3XxtMXIwwD86b+zc24sLwhHc +jhhafP3Fa4wT1dIu4MinRkGVaEgifSMfwWL85CTQ8xdW0AV0IsiyWaFPeLuvRk1ZSnSkT hSZ27m2ekA9UYB/uCeIz8cyGJ5R+kAc3kVXWu2cPK3jppce8vplnBZ0UdLR/EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1629838363; a=rsa-sha256; cv=none; b=sw4QpRHYTTiLRQjX0OoVJGCXdVmqraPpPDHxYEzx34nP94rUb5hZhxoPuLxKZB9dO6zwCr hQVsGazheBsgu/HAt4cQ5kHeI2KaQTa6geJf1znamA3bAt2JTGruyG0F2Vc1w7ROtSZ+YR LRIRNZK0x3u/Xvhw0bIFW2JoUMxKfBJFxNZHAj7hqf8WUamF5zdVqd8rETJLZUNMV7+clD TcSYbGElgUa/CiyQYogA0CAPtGfpfmx2olB6/wmdsPMIL0A7xMfJO3LhK3CsEJZAodDQiI YPL8nwGBHxjRg2fJprbB5+DzzxoGTX82Kf6T01KtwcScuqeNLko2k3rCDeTjYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.34 List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2021 20:52:43 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-21:13.bhyve Security Advisory The FreeBSD Project Topic: Missing error handling in bhyve(8) device models Category: core Module: bhyve Announced: 2021-08-24 Credits: Agustin Gianni (GitHub Security Lab) Affects: All supported versions of FreeBSD. Corrected: 2021-08-24 18:29:48 UTC (stable/13, 13.0-STABLE) 2021-08-24 17:33:35 UTC (releng/13.0, 13.0-RELEASE-p4) 2021-08-24 18:33:04 UTC (stable/12, 12.2-STABLE) 2021-08-24 18:32:13 UTC (releng/12.2, 12.2-RELEASE-p10) 2021-08-24 18:33:02 UTC (stable/11, 11.4-STABLE) 2021-08-24 18:31:27 UTC (releng/11.4, 11.4-RELEASE-p13) CVE Name: CVE-2021-29631 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 supports running a variety of guest operating systems in virtual machines. It implements a number of device models using the VirtIO interface to exchange data between the guest and the host. II. Problem Description Certain VirtIO-based device models failed to handle errors when fetching I/O descriptors. Such errors could be triggered by a malicious guest. As a result, the device model code could be tricked into operating on uninitialized I/O vectors, leading to memory corruption. III. Impact A malicious guest may be able to crash the bhyve process. It may be possible to exploit the memory corruption bugs to achieve arbitrary code execution in the bhyve process. IV. Workaround No workaround is available. Virtual machines are unaffected unless they use one or more of the following device models: * virtio-console * virtio-rnd * virtio-scsi (available starting in FreeBSD 12.0) * virtio-9p (available starting in FreeBSD 13.0) V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date. 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, i386, or (on FreeBSD 13 and later) arm64 platforms 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. [FreeBSD 13.0] # fetch https://security.FreeBSD.org/patches/SA-21:13/bhyve.13.patch # fetch https://security.FreeBSD.org/patches/SA-21:13/bhyve.13.patch.asc # gpg --verify bhyve.13.patch.asc [FreeBSD 12.2] # fetch https://security.FreeBSD.org/patches/SA-21:13/bhyve.12.patch # fetch https://security.FreeBSD.org/patches/SA-21:13/bhyve.12.patch.asc # gpg --verify bhyve.12.patch.asc [FreeBSD 11.4] # fetch https://security.FreeBSD.org/patches/SA-21:13/bhyve.11.patch # fetch https://security.FreeBSD.org/patches/SA-21:13/bhyve.11.patch.asc # gpg --verify bhyve.11.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 . VI. Correction details This issue is corrected by the corresponding Git commit hash or Subversion revision number in the following stable and release branches: Branch/path Hash Revision - ------------------------------------------------------------------------- stable/13/ 20f96f215562 stable/13-n246941 releng/13.0/ ec08bc89d4b3 releng/13.0-n244756 stable/12/ r370400 releng/12.2/ r370393 stable/11/ r370399 releng/11.4/ r370386 - ------------------------------------------------------------------------- For FreeBSD 13 and later: 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 For FreeBSD 12 and earlier: Run the following command to see which files were modified by a particular revision, replacing NNNNNN with the revision number: # svn diff -cNNNNNN --summarize svn://svn.freebsd.org/base Or visit the following URL, replacing NNNNNN with the revision number: VII. References The latest revision of this advisory is available at -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/A6HiuWv54gCjWNV05eS9J6n5cIFAmElV10ACgkQ05eS9J6n 5cLrsw//SuInBQjVhNXa1OkC7FcBve+vQCmgThGAxJVrFpRdHxg/q3Vfyza3/V1w FGUiPPhAsF3wYwK9UqMS5a3dOI3WbaUvH8dDeLd3BLj4AfFE3uTOFC0xzmdBQcm0 2mFbTRkL0Wqb6FpDiswdu1s9jp1JggIa+SGuajl4XaoIyM/tek3PFuEOeE2v2N7E djKciPwFnsRneFQIOTHVqa0mut5AilNI9WwKZgv3qzqQNnAasBpbiZKG/BhA2mZm GLm0NtI40BdnIW3mfGYqK3r/tXUi/tcMSHzV2NDOGToB5wHj6Ah1lQ8pUEVnLo0d TeDrioK/z53wqLhHUSsxdifST6JX0CQ2kf7qb256mE3o9brRyD2s6AM2Bld3r/ov wzPTIzIGmtaxezCJhZpEPfaul/B2mCTjWkGrxOMROAzeocrIY4pJ5cGmH8XYfGA+ WQOwe+OKHb33qak3mrgGxECv72R/h2PUH5PV14HEj+PW5S03qIHm3iisvGWo6+3C efqZ9tsiWbPvbF3CFuECOgjUIu5YDf6K83H5/Lnaw9SnANuTj8t8I1yg/RmByWlx 9ucposBVht9h9TcFKNm+REfNCaYwQ3FukfGn/s3ih/iHNcGn1rGjh1t+vN4DNnLl Ew3GTlSzJqzeO3QvstdrRDvvBNFGDZV6yyZBu3ogPaZc4WAHnHQ= =suTg -----END PGP SIGNATURE-----