From owner-freebsd-security-notifications@freebsd.org Tue Aug 24 20:52:43 2021 Return-Path: Delivered-To: freebsd-security-notifications@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 3E9DF660AAC for ; Tue, 24 Aug 2021 20:52:43 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GvLsR16MGz4pxp; 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=MGKJzD6Qo+R6ESeeqZ0bP9oK6glh2ntJgUf28XQO+kbxInm9l7o/Sg431tawrpTe24Ilnl 3DLWnNmpqomtCeBEPwkra3PcIf4Po22Nb/gKE1uM6qzMLicyZdW/o+uoA4nerXUI8iGsY5 bEt3f1qDstVpQjjp4sLqUYZz8eOaXbRxdw6ZpfCKLeZqeurrC54hiDmGsOF72XNsZb0as5 OxmVfeDkUqM89wprzqbaHrmdVNY/fB0varA+9JifnDissA4uqh7syHMtlt0XySdsu5mLjA 38e5Pmz7n7ZmKlc5jsTfRKcFwm2DpJkXEqM+1qzI1V9uku0KHHTRs1/Gh6/vFg== Received: by freefall.freebsd.org (Postfix, from userid 945) id 0D8577597; 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.0D8577597@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=rriMZgnb0L78Qxy3wxcFO9p2t6FWyObm2HHu4O1OYvWnx0Db8tnRQKhGfPzv8j5FLTnYxt kkuLf7vjxTycqSEk6p4xraz15f1dxgYNogrWBl3PB7SCWpgEcP0WjECKv3RlFtsRm0cODB Rs6pwlTm4I8QWmgKaSh9FvCckmyiCKvRychXD/6wbxNBh0n7KWQ/HdNV8A29tNtTS0L8VF KNB82A+TMuVrPBvQHBm0RNXOz3Qxp+SRv1lOYLA2mfQwJtjEmeYIDdVKWr9iAi/sjAJKgM b5l5RWgwLYDMyJ/pvK9ieFMNQb9cISHp0USLzZo/vpvYMK8I77pTDYq/spp/mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1629838363; a=rsa-sha256; cv=none; b=cSRY1fsw2ic3EvRasPMNp0AOA2ZD4R6LaCn75kvoKUTgHVubdWsIt9QSmgAxOb8pwmXjAn kKSBIyGThXWK0Y6rHR1Lkt6FyQ05XegeuATsAFtP3+agEtHze/uifXOHZc7SxSQjx6TJXA UY72ftg9iiT07fi+mr11kqNIb8XxZMaSyBTwUi7KRfXMFDQoyO1oTl+9IcN7qRfbIH5YFG GxNOFhZ7Zl61eVZtmuMiI9smXLCrCyI9/UqLXO1ojlEnN/6Yi4a5cMrSyvCjkv8RPQVuWh +DEc5ouotpni11bjFw5K9oepxhxu11Xe3puck42BuSWVeHqTO/LBaoxoQdYieQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: freebsd-security-notifications@freebsd.org X-Mailman-Version: 2.1.34 List-Id: "Moderated Security Notifications \[moderated, low volume\]" 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----- From owner-freebsd-security-notifications@freebsd.org Tue Aug 24 20:52:50 2021 Return-Path: Delivered-To: freebsd-security-notifications@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 44C48660738 for ; Tue, 24 Aug 2021 20:52:50 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GvLsY5YzFz4ppv; Tue, 24 Aug 2021 20:52: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=1629838370; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=SLTFutSfddXhbGN47tHpCiqeYUNc4DsBUilA4PTzyag=; b=WiW9Aif9Ao5NLs61lYfJ7u0s4G91075SnREhRA7U6zQmFJtdyHl+mRLrgzY1Gtnwuix7Vo cNh/jcAlvBTcJNmSILmde41xtXD9nzvvEogh8mhMJZDev0uAiyPlVXgaN2SfAoP42M1GXO 0i7YJWP+ccGKw8D7bStyRjwUdk7ynWRoPof4hvH39SEq0jqkriu0aVL/WMxX9igPmW30xD i55gJiqrbJQBgYCCDmNTtaWmolmw8eAaZbCmkQkxtGJavLgEQKH6Q7Q0ruoHRCdjlbskvD Ebjw6AIs8e/yVwMwHRd1SMV+gAuWwgqqHiT1ckFrgkD6NljK8EdH9bbWqqanWw== Received: by freefall.freebsd.org (Postfix, from userid 945) id 8D89373E2; Tue, 24 Aug 2021 20:52:49 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-21:14.ggatec Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20210824205249.8D89373E2@freefall.freebsd.org> Date: Tue, 24 Aug 2021 20:52:49 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1629838370; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=SLTFutSfddXhbGN47tHpCiqeYUNc4DsBUilA4PTzyag=; b=IgD2CbClQepj21ybpydmm2Ylv4Mkj0f9VDVWwIvFHSwWpTe0QYzhXwm6zgfABlaRVukVvI QMyh2JBPElBiot8vrBb4pPyKgSVw8rfUFCEgyosHn8qmK3DhLzlepl8yGIEEM8VHPC8A8U b9L48i18hQSHffQ1xe3ojfJ2dq1fewa0UpnA+zLuY1mDORYW1hPEtO+WSZxvcSVtKkoODY 9hnuSqc6OYbWNS5uCy2xJ9ovRuViOrujFsHceKV09sBL5tnt+eV7IB2ucf1UkLfFbm/+EZ 4iU3TZkPAHykw9Ph6J4cUQVIFfLPG/z44SEQHMoAo67HwCRWaUhaRTzWqHE3rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1629838370; a=rsa-sha256; cv=none; b=WTyu82U3AGY6xnCvtrDt6HZECQQNdR0K8KXH9Q5dmmele+wXaVviaMaZnLDKpIgxCMa15A Lw3Slr4Wh9l0NtIRIrAE563fyaHgSeTlC0P7xJgfUbo1Cx7hmlY7uLvEc1ZhgHGUX9F0Jn ZwhKgGYGDU/L5oKDZY3/87Zwn8RebH0bBJ6KtBsnM0huxJjcr+/o7391QR6F0XrCo+tKGy byHlo0SrK1hswFhzhfTZgk/WPWi6ogk12koG2JwBJES/ZhcOfiin+vO+dIo16frx8AnJRU +CDSOGbQQrJ04HT4IfCWjUj/hQnsyH1Ll1pLDFnl64RIbDu+P7M1mlbxngYRRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: freebsd-security-notifications@freebsd.org X-Mailman-Version: 2.1.34 List-Id: "Moderated Security Notifications \[moderated, low volume\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2021 20:52:50 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-21:14.ggatec Security Advisory The FreeBSD Project Topic: Remote code execution in ggatec(8) Category: core Module: ggatec Announced: 2021-08-24 Credits: Johannes Totz Affects: All supported versions of FreeBSD. Corrected: 2021-08-24 17:50:50 UTC (stable/13, 13.0-STABLE) 2021-08-24 17:37:45 UTC (releng/13.0, 13.0-RELEASE-p4) 2021-08-24 18:30:13 UTC (stable/12, 12.2-STABLE) 2021-08-24 18:32:15 UTC (releng/12.2, 12.2-RELEASE-p10) 2021-08-24 18:29:35 UTC (stable/11, 11.4-STABLE) 2021-08-24 18:31:29 UTC (releng/11.4, 11.4-RELEASE-p13) CVE Name: CVE-2021-29630 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background GEOM Gate is a GEOM module that reflects I/O requests into user mode where the ggatec(8) daemon fowards those requests to ggated(8), possibly over the network to another machine. II. Problem Description The ggatec(8) daemon does not validate the size of a response before writing it to a fixed-sized buffer. This allows to overwrite the stack of ggatec(8). III. Impact A malicious ggated(8) or an attacker in a priviledged network position can overwrite the stack with crafted content and potentially execute arbitrary code. IV. Workaround No workaround is available but systems not using ggatec(8) are not affected. Neither ggatec(8) nor ggated(8) are enabled by default and need explicit configuration by the super-user. V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date. Restart any ggatec(8) instances. Existing ggate devices can be kept alive and restarted with `ggatec rescue`. 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. # fetch https://security.FreeBSD.org/patches/SA-21:14/ggatec.patch # fetch https://security.FreeBSD.org/patches/SA-21:14/ggatec.patch.asc # gpg --verify ggatec.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 daemons, or reboot the system. 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/ 0729ba2f49c9 stable/13-n246938 releng/13.0/ c8a2cc4ba845 releng/13.0-n244757 stable/12/ r370383 releng/12.2/ r370394 stable/11/ r370381 releng/11.4/ r370387 - ------------------------------------------------------------------------- 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/A6HiuWv54gCjWNV05eS9J6n5cIFAmElV14ACgkQ05eS9J6n 5cKyqBAAi7eHUJ5Ud4dNJac8zbaj5uIlYF1XUPBfm5XlevfW1b1vgrfrs0QM3Sw5 9efTVTESFUC+T9wVMYO3s9POEwiu3x0A/eRsH2tq9oaZPQKdpAhkEEQ/uqnNRKfm qHZ8YuSJGT+EWEFp1ib5O4Y78TvjL7ST0+IG/O5vBMKqgsxy29o6tOAy3q9+RVqj hNQNo7KbXBXEns/I7HN4JssQSjeWOmK65Ty5YAp1VsNGbD/7rSqsCp4P/CatvRQ7 0kzVMb/hkaDn1G7jYOXbAPk+XrUr9cFriChjLuAAyZRBfWcNlPmoxRgNoDVDY44x elnBAEmSPD9adwy2hoHeusiiUnN7Vrz6DJeox7BSnbQx1lbU+j6qev0EBaMAmEUJ POxn9wjfth3hdfRSx5p2jSVaD/086BBpMQ9KXojVONgqE7hFF402+ooCnorA2XTh s08cIy38TEyHoW/rqr3SoXwyvkM3vAjQBmYzocDqocfufQ7UCH+SDFSsORuof+4N 9T2j/UvGqmrQvnMhAsRfbdFImvwUut+ZLJzNqTEjYWlZv58QEKocU0OOvrd2Wb5i ok2CRIhCy08UnDItFSYI28TaMv8ZiCoWLx7H0+20mQeLaPF45dQWXz1o4FrFHVjx EdMZpmh9tFU8j5bm0J5l8CpoiTZsqZ41gTrFyEdSnOnS1uvT8jQ= =6Z2C -----END PGP SIGNATURE----- From owner-freebsd-security-notifications@freebsd.org Tue Aug 24 20:52:55 2021 Return-Path: Delivered-To: freebsd-security-notifications@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 EA494660B4D for ; Tue, 24 Aug 2021 20:52:55 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GvLsg4461z4qBK; Tue, 24 Aug 2021 20:52:55 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1629838375; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=4r+fQaaFty7OGmza4TJMaS9bbuKqMtBhMVkkYfwB4MI=; b=hvPBmi4KuGLo/9ikd7buj5tx5yB9643AQcTPNSI+66qOTzw92HHkXO1gELNNTtQ96GTFIB 7jgjdRPFYglP5PNPkVhA08mOsn+giL2wwg4TegLGBl3JASpIIaWnL6Hf4p/HVk3goTF6nP 2vj+lotKlGjgNBofM0tlyvOeha0Z4jdYho3n3M7yz5ghIAANV1xJPrE5qRQxwLb2OtLMgt Y5TMRd2/JUzMU6zbFdrJGswNYsOPyoxw0DsZOtEjhrX8RqX6y2UTjGVsbFQGH88g4gkwok /zECQ1lxs8gHEcZVNkyRPzEIjjem3aM4penPUGfRLX7/58B5usV/zHoxKLjeYg== Received: by freefall.freebsd.org (Postfix, from userid 945) id 3895474BF; Tue, 24 Aug 2021 20:52:55 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-21:15.libfetch Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20210824205255.3895474BF@freefall.freebsd.org> Date: Tue, 24 Aug 2021 20:52:55 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1629838375; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=4r+fQaaFty7OGmza4TJMaS9bbuKqMtBhMVkkYfwB4MI=; b=qwrDeYURVYTcNHilibDUFdPT7o3xtqutBJGF98t8I+34E9EDbcWz+0lW66I5vEOeFjeBVH oUa/xM/ODoImkyrNktZgP4znj93Z2OxMrS6SmeHLa04iaAUeAtRXwRUfr2zmY3xLnIhFpq YTqWhxSlCMe2C35tYor4OD9gz4znoFYSmQb7+QWlmEu1MtO09M1Ltx+wTGOVd2ZGziDwTb aRIzYnZ8ZKMdtG5qHtFAf7ntWNxyz/egPddIYteXJgM67/QSAYiiR3DnRiq6lqRNcl+8IA /zIMoJoESBFjDbv3EJk8bsn4fEMfgzGdhTqlEIR1pE3U34iuRdTBYLy83d9rEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1629838375; a=rsa-sha256; cv=none; b=F1wlHdaK1tBYaiUb1dKzv89CTxIP5Nbphxbnsd5WhDMaO75IYPWhsTQmvleuYW83luNTdy cGjAAV21cHkD8v4sY4U6W5bCwm8Hr0H+ZYOqUCnNIJiT7m4MV+vwsksuv7Cgvyx0EGjVJc 440we3p2HFhjdpbgmHr8MkN14uatRVJwtFERo0HAd+qxeX70eIfdRXMq/oTS6s74srX1Eq SbpF+dm4t2t15MX97HyalPmZXbtalUGIkxcXi3EpzD+hXA0jlSbF3MJj+/xfsWrrZjg1fn UafF8WZZpQVu7y0nBl8v3U6G5iWBMh8h0Q/Bokax2tOiOe8v6jkaNkQAbHt91w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: freebsd-security-notifications@freebsd.org X-Mailman-Version: 2.1.34 List-Id: "Moderated Security Notifications \[moderated, low volume\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2021 20:52:56 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-21:15.libfetch Security Advisory The FreeBSD Project Topic: libfetch out of bounds read Category: core Module: libfetch Announced: 2021-08-24 Credits: Samanta Navarro Affects: All supported versions of FreeBSD. Corrected: 2021-08-24 17:59:43 UTC (stable/13, 13.0-STABLE) 2021-08-24 18:00:47 UTC (releng/13.0, 13.0-RELEASE-p4) 2021-08-24 18:30:16 UTC (stable/12, 12.2-STABLE) 2021-08-24 18:32:17 UTC (releng/12.2, 12.2-RELEASE-p10) 2021-08-24 18:29:40 UTC (stable/11, 11.4-STABLE) 2021-08-24 18:31:31 UTC (releng/11.4, 11.4-RELEASE-p13) CVE Name: CVE-2021-36159 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background libfetch(3) is a multi-protocol file transfer library included with FreeBSD and used by the fetch(1) command-line tool, pkg(8) package manager, and others. II. Problem Description The passive mode in FTP communication allows an out of boundary read while libfetch uses strtol to parse the relevant numbers into address bytes. It does not check if the line ends prematurely. If it does, the for-loop condition checks for *p == '\0' one byte too late because p++ was already performed. III. Impact The connection buffer size can be controlled by a malicious FTP server because the size is increased until a newline is encountered (or no more characters are read). This also allows to move the buffer into more interesting areas within the address space, potentially parsing relevant numbers for the attacker. Since these bytes become available to the server in form of a new TCP connection to a constructed port number or even part of the IPv6 address this is a potential information leak. 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. 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. # fetch https://security.FreeBSD.org/patches/SA-21:15/libfetch.patch # fetch https://security.FreeBSD.org/patches/SA-21:15/libfetch.patch.asc # gpg --verify libfetch.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/ a75324d674f5 stable/13-n246939 releng/13.0/ 060510ba8bfb releng/13.0-n244758 stable/12/ r370384 releng/12.2/ r370395 stable/11/ r370382 releng/11.4/ r370388 - ------------------------------------------------------------------------- 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/A6HiuWv54gCjWNV05eS9J6n5cIFAmElV14ACgkQ05eS9J6n 5cJpVBAApBRBKwxTpmLfH+JJP8JwDwpop407/A54uPFRXzl7ri6D0wlvlHgMb70T OPnD2pco3gI56GOvRLipnbtrkGZJT0ijsXHMqMK+3O44yoMP8BMNOZauPUVia6FW 6P0aLXqjiJDYZ8N2k+MnnsXQFJKvFt/Vv0D7aHOUettfgyx5YIQX2urjB/hGZIfM 93VMRCsLruixIRgsL6Jt2PvS004HxqJOsaNMg6unp0JWa/vrcCcr4AMzJmu+k0lg /XtUpNBWdClKSYvDFikNrCz9x8ae6V9wosz5gfeKL+1tctBMxhrMLwBEaWtB7YIc 4Vu9+ZsGRLBpapEE8aLRyApY1xFP0xcDutf1G/tuuz5zK8gObaTrxTcRm6fbyf8C ejspPabgM3lgKrWjGiI0T3WzYPWJKTZqtGEAtyMAutjpv9+N/p0YEDsCWkvG/zlt BZ+TbT33oL2N1odzLBNOlJkiR2LQnTcjBgci+jqCVx7CdnYmV2laGF1kIttBCcRN TOJoOJ1pbK1UXqek77+cCSeTKrlocU6oH3+1W68oLeWtemvzCTxlxLsT/pU/TetC 2fibVyN9P1PMI0VbaktjSN8HX8QWtr1u5kp2AIZPmq5RqL+S7+o90GVFr5f41D7M QjHGddO+DG77lGyd+KC7zMuG6p8OcDBkdy9Tc0aTVW4JPhnIeyA= =QN3R -----END PGP SIGNATURE----- From owner-freebsd-security-notifications@freebsd.org Tue Aug 24 20:53:00 2021 Return-Path: Delivered-To: freebsd-security-notifications@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 89223660D87 for ; Tue, 24 Aug 2021 20:53:00 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GvLsm2hGfz4psT; Tue, 24 Aug 2021 20:53:00 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1629838380; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=PfcXaWD3tfJAjV1WWTE+qtdcWO8AlGyXbPL1ygbUD+c=; b=JBzp+3eC9hJW1PUmiqLihx2WXJwLhRUgBnP8uI0kmyLVqeH5uR0IlYF5/OaCXcsPVsTiYQ /OoFJNeY6BFl4PNKXcAUGdrMmkPQBumsvWZfRe1CcXNQjBENDb3tFT3hK7yAoDUVowMtOg kcfZxwwz6I7OMEGhqCKXktWKsm5Md0LQ7TMreodKHBt6X0QCQF7KBg5D4OyaBspYCm9mGp oEwOHD/Mo8AuMIBf0eV3rgsaPA5Td52OekkVMtZxeoqjyW/Y1hyYdq8jmWopluWd5xsbd9 nmd1pkfLuWCrkFHNmDcI4mhcNdXXEMZqRvQcO2bg30WaINut+tZkjRxnTMG8Ng== Received: by freefall.freebsd.org (Postfix, from userid 945) id 346EE72F0; Tue, 24 Aug 2021 20:53:00 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-21:16.openssl Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20210824205300.346EE72F0@freefall.freebsd.org> Date: Tue, 24 Aug 2021 20:53:00 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1629838380; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=PfcXaWD3tfJAjV1WWTE+qtdcWO8AlGyXbPL1ygbUD+c=; b=aaBygqaimGXZ45O/OQe9aNHiM41kZUI+gY5KZnar3TffFq+oiP0h5xjh9jCWdfocwaFcnC jED7+mC8DTFmbFv29BabK8JvyxJlyprDZlSOYEo1ZQ31RQJZXqtOiBw/woBOhu/cESFQ01 kWS77X0x0Cu/9dOnxxmZXmJFGxSImCqga3+OhuCoMy/RERj1QvrWbMsnbgWgFL0iDrv5lw N/K+QhXTvsNB0c/aypIoRiBaSa/3qsCcvt1i841/h424ZvObvK4u2DX4zbNt7/ZJuM7TLF +YUhRUX+AM01y0zkAUvrdt1MR0WllgPpsKgMd7+NLSe3QdI+3b8l0EU6CsXhcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1629838380; a=rsa-sha256; cv=none; b=JGfsx6XVJklexsBao1xkt9Fn8hcV+uxhC0GR+RwQ7iNd0e0ZLamCcmUJv6Dwc2CI2UsZBf RPRLrQS+k7R0CnlGSAwp6P/OCEBG3oewHhW1LegWBOjU3nfpcpg1ynfpeZhUwdDxrzSIaV Oqk8k9JTbgZeCh4QKk2apGE3sa1kx9Jsh1IrFO4qWqfYQOCHNeBKWt4XEzKf5QKKgJBBL/ QCleGUy1FugnHFlTccPzjdZCxO5kRqjtlQyQX07/deBFMfzMXFGdeEX0Z6J6akFf1IEEqS vVvZBWhRU33BnZUXkZjhPd/lHqpI/Y2TS5c6AEMfVdXgLgNE2qffOodYC9mZYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: freebsd-security-notifications@freebsd.org X-Mailman-Version: 2.1.34 List-Id: "Moderated Security Notifications \[moderated, low volume\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2021 20:53:01 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-21:16.openssl Security Advisory The FreeBSD Project Topic: Multiple OpenSSL vulnerabilities Category: contrib Module: openssl Announced: 2021-08-24 Credits: See OpenSSL advisory in references. Affects: FreeBSD 12.2 and later. Corrected: 2021-08-24 18:05:48 UTC (stable/13, 13.0-STABLE) 2021-08-24 18:08:04 UTC (releng/13.0, 13.0-RELEASE-p4) 2021-08-24 18:30:22 UTC (stable/12, 12.2-STABLE) 2021-08-24 18:32:19 UTC (releng/12.2, 12.2-RELEASE-p10) CVE Name: CVE-2021-3711, CVE-2021-3712 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background FreeBSD includes software from the OpenSSL Project. The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured Open Source toolkit for the Transport Layer Security (TLS) protocol. It is also a general-purpose cryptography library. II. Problem Description There are two issues fixed in this security advisory: A bug in the SM2 decryption implementation incorrectly calculates a buffer needed to hold the plaintext leading to a potential buffer overflow. [CVE-2021-3711] ASN1_STRING structures directly constructed, instead of using library functions, may not be NULL-terminated resulting in library functions causing a read buffer overrun. [CVE-2021-3712] III. Impact Specially crafted decrypted SM2 content could cause attacker chosen data to overflow the buffer changing application behavior or causing the application to crash. [CVE-2021-3711] A specially crafted malicious string can cause an application that directly constructs the ASN1_STRING structure to crash or disclose memory contents. [CVE-2021-3712] 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. 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:16/openssl.13.patch # fetch https://security.FreeBSD.org/patches/SA-21:16/openssl.13.patch.asc # gpg --verify openssl.13.patch.asc [FreeBSD 12.2] # fetch https://security.FreeBSD.org/patches/SA-21:16/openssl.12.patch # fetch https://security.FreeBSD.org/patches/SA-21:16/openssl.12.patch.asc # gpg --verify openssl.12.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 all daemons that use the library, or reboot the system. 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/ 9d31ae318711 stable/13-n246940 releng/13.0/ 2261c814b7fa releng/13.0-n244759 stable/12/ r370385 releng/12.2/ r370396 - ------------------------------------------------------------------------- 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/A6HiuWv54gCjWNV05eS9J6n5cIFAmElV18ACgkQ05eS9J6n 5cLnrA//XoiClJmvm+5GKDzP6IbDIxRyS7NkDxMWY/7Q/QvPs8fFrFdXiD4qJOcz VTElfioKTv2X7j+X5TO4zRKjg86Lb94gSXtgOLeK2tWticksZ3o5WPLXXjI0ohBo M1VhMJoJc3p2Oam9yPOdfnllCTJYV5ZqmcBL2FZCYWdkebZWkpHgrImZ53yQ87jm IK4fy+El47l3Jb2K6P5S1eeW3e3CElbkUgNkSIJsl5Z9hdrTrd3We6FSE8QQjXn+ OsQw5s6VDhHzFG34x9CIhqpjWQTX5izdlaeSunMXHwe3Vp5CoRpl/sq1r53PJG1j nnY7X4Csgbv48rRm6KXOCHDzEatNvmdnBmEzcanIUXer//tra97Zd/wlWepV0hwK T4TcJly/74DH+tW6TQ78/UC0EkxeTqc/I1Qu41jBIH1KDfDs7OqKiftHo2wOJjQa 43DlAr6eEbRAZ2l1e+ATJs0r6ao1BCUnB+Fpc4cnBLaft9G3DYCAmWI4wUKRSRAU n880U3kjSTtVDfLTkUQ33QSg0uqduVEjt9XWe/SV9RoL8xHqtvk/CIS+aFAqPbR4 62yaTQCrUdidkeqn7/XVScCuZ27bWCJpqWHGtihTnm3yfM09NtYIjozyngf2duaJ 0RFuewl1kvYo5Xsu54TuO36dQQdmJU0qayKEpWZ1+NadgJUMAJY= =8I/t -----END PGP SIGNATURE----- From owner-freebsd-security-notifications@freebsd.org Tue Aug 24 20:53:06 2021 Return-Path: Delivered-To: freebsd-security-notifications@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 161BB660D52 for ; Tue, 24 Aug 2021 20:53:06 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GvLss0Bfmz4qFK; Tue, 24 Aug 2021 20:53:04 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1629838385; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=r3BmyrdJRpdLRHBRQkPgkGTn7h4XflSpOPnVp1ymhmM=; b=bav2f1huMdkXvLJF9uUlGexQ4bLs1MT1C3H03YNteq0tzxbR8NvLVgqLeSl36HP22/T0UB He+/ZLbC0LKllpglg8qMBtRyRqDFcMe04cMfgUSHCNBO7i211hRQanhBbLCwou7MKK7Lc0 mPbP4F0v00VvBW/M/CszxMDnDJSdbhsZItX6cwmwdjF6TclfWbESbgJ8j9eO32bkex8jLN jvC3rC1AOaEfnY8YV5RM1mndFEsiEpeXUPkY8XXtgrYvup36Rmfrkd0WUvAXL1jDl+Ai1q S/YJLm88gkkem+YqUo2s2TsCz7qj6Z6THqPnSNfaG6SMQYHOkh6WX3XL9s1aTw== Received: by freefall.freebsd.org (Postfix, from userid 945) id 6E2BC74C1; Tue, 24 Aug 2021 20:53:04 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-21:17.openssl Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20210824205304.6E2BC74C1@freefall.freebsd.org> Date: Tue, 24 Aug 2021 20:53:04 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1629838385; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=r3BmyrdJRpdLRHBRQkPgkGTn7h4XflSpOPnVp1ymhmM=; b=t38JzFQQsRKucX8J9Eu+mGr78hd72HXOTrx0uwHRfF1iHfC//TKfMhmpGQ2vnP32RqBmMk qtdzCHYtTjVcUcDQQt3v2tSujf0Eabv3OUn7ZLzwW6fGrKLkl9/fot9/uCt4gZJg757Ivx TQpbQ1amHPTlh44+zcys4r7dMJW4xD3pn/SiM8mlpYPkzCn1snELvBtg0Wr1S6jkZlSdU9 PLw+NJF9M+VLMVZQsWW59qZ/4x5ypTT4rk5rhJVemO5hOY7kgbHzFjlF3+wxxJqj5LNrqa fxda7EZ2qhlx48WwqUNvj02m3+lNFuI8M4XPMoE2cEgD/9Y/0wBTv8HRqSVC1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1629838385; a=rsa-sha256; cv=none; b=SQh0ImmOR71z6g+6dx7aYGwiWKznYiHVvXEL8o9TP/kXASmguSKLqnRuJNSe6oRbXkulIU 4k0JMYPwnSqpgHcJH2X5sL7QvykaLpOcPlNL4zNUR5bnsBcLpL5S3oOAxwqmDjPomRfuMR 34D9sGYEwxDumspjQ7ewQ1RJ3skAoin/eyxqDgVtqlXXgK3bOyIYD7+p5rDQhTm/A+3nXC cbgvT1glDanmNm1Nx6AC89e1T9jtkbF3Smja3WkeCTXfSeyoRZbgHBEigXqS3c+PWL0gmt pm5nYSEP8CElonAkSZUyOop0ofI69mkulDdu7iI+cYEIK+3Hpw1eIFzf3hUzpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: freebsd-security-notifications@freebsd.org X-Mailman-Version: 2.1.34 List-Id: "Moderated Security Notifications \[moderated, low volume\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2021 20:53:06 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-21:17.openssl Security Advisory The FreeBSD Project Topic: Multiple vulnerabilities in OpenSSL Category: contrib Module: openssl Announced: 2021-08-24 Affects: FreeBSD 12.2 and FreeBSD 11.4 Corrected: 2021-02-18 23:55:09 UTC (stable/12, 12.2-STABLE) 2021-08-24 18:32:22 UTC (releng/12.2, 12.2-RELEASE-p10) 2021-02-19 16:21:03 UTC (stable/11, 11.4-STABLE) 2021-08-24 18:31:34 UTC (releng/11.4, 11.4-RELEASE-p13) CVE Name: CVE-2021-23840, CVE-2021-23841 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background FreeBSD includes software from the OpenSSL Project. The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured Open Source toolkit for the Transport Layer Security (TLS) protocol. It is also a general-purpose cryptography library. II. Problem Description This advisory covers two distinct OpenSSL issues: Calls to EVP_CipherUpdate(), EVP_EncryptUpdate() and EVP_DecryptUpdate() may overflow the output length argument in some cases where the input length is close to the maximum permissable length for an integer on the platform. In such cases the return value from the function call will be 1 (indicating success), but the output length value will be negative. [CVE-2021-23840] The OpenSSL public API function X509_issuer_and_serial_hash() attempts to create a unique hash value based on the issuer and serial number data contained within an X509 certificate. However it fails to correctly handle any errors that may occur while parsing the issuer field (which might occur if the issuer field is maliciously constructed). [CVE-2021-23841] III. Impact The integer overflow in EVP_*Update() could cause applications to behave incorrectly or crash leading to a potential denial of service attack. The X509_issuer_and_serial_hash() issue may result in a NULL pointer dereference and a crash leading to a potential denial of service attack. IV. Workaround No workaround is available. The function X509_issuer_and_serial_hash() is never directly called by OpenSSL itself so applications are only vulnerable if they use this function directly and they use it on certificates that may have been obtained from untrusted sources. 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 12.2] # fetch https://security.FreeBSD.org/patches/SA-21:17/openssl.12.patch # fetch https://security.FreeBSD.org/patches/SA-21:17/openssl.12.patch.asc # gpg --verify openssl.12.patch.asc [FreeBSD 11.4] # fetch https://security.FreeBSD.org/patches/SA-21:17/openssl.11.patch # fetch https://security.FreeBSD.org/patches/SA-21:17/openssl.11.patch.asc # gpg --verify openssl.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 . Restart all daemons that use the library, or reboot the system. 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/12/ r369284 releng/12.2/ r370397 stable/11/ r369299 releng/11.4/ r370389 - ------------------------------------------------------------------------- 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/A6HiuWv54gCjWNV05eS9J6n5cIFAmElV18ACgkQ05eS9J6n 5cIngA/9Hncs91cNHSVTuvNvrATmpxpnCyiphivR297oiDKRCOoHxA7W8AAigSQH gNM8XGZ8aANmoGfh7M86V5Dvlq0qeRn0Pe8cEus53OumEqpbSkMu97ftv7gFkM/S +uEEoNA+pK/lrupQQ7gAHwWbzaNumJwGXpH/FLh865TjngvI2hFW41TfMxHQvymf tAIzRdg/QYASnXTXBn56ad0i34v+/Z4Cz6XFJ4bBkqPJpiCvzJPWB37CSxw1D6YM 4w5yBhu7db1VJKLP89/YnRnsB4ryOE5cCGtg086pa2DdacB63XTEgc/m90UtfHYl Dk6LVr79SqFPDRukNCTBozcwkHr8aKSg1eR4o2vV3yfq5OUhHmCA9FXstyxXPYe+ DjtSG8X9m/XKiz4Eok2EIv3PwBT29M3lVnKG20kvpxoguOUTg4VLtyyDIZxKmNpY XC3OAmUViDS9iEA8uqKjUEt5YEsNvs6qIKasZHdznST04nuEimIiMUOD57odwL7M rAeJu4GBPHJqNQsfFPRddjrVimnUtGHFDW5r4JtqPP5sZZCIBplWuMzay875EYCL amYGuewZhsacUSgUktsFPrM9z8rd24k86IPn3PEIwsVbubDDz40Q1/v1McgquZ0n boUnhYSRG5qVgOItsikahk1OpQMQhsXDRo6RotGdl90pqdngNjQ= =T3/+ -----END PGP SIGNATURE-----