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-----