From nobody Tue Mar 15 19:29:17 2022 X-Original-To: freebsd-security@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 F417E1A171AB for ; Tue, 15 Mar 2022 19:29:17 +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 4KJ3PT6byPz3jjs; Tue, 15 Mar 2022 19:29:17 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647372557; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=jRlHERJdmJKDzIlnMla8byHaRXnG6yYBeMPPDzyeqkM=; b=jkJLUAdmdBxyl+CXDNEXSdorswq8BXJb5gl6C1j37pkIJcigHzTIHu3kZ0PODkJXO6xCz2 Gz6GNiOzVIsRSzfNL4y3mW2U1Qeo+LjjHkxnCq8QhQj2in1sHTLpHeuaOwaHO5pgW78ftN yrsCAaRvRrTp0cXbpDw8jen2LENdQYWuIBR3ywdikiVw8Wnd5hhEqe2+drv1YqyZN0nYXu 8aOBh28s53PLd8ndtRq74y2+JufX/UFJsvefL5QezhJ9d/SMWPacXJckhVAwpmtuyBBsEW VWrzBYmVi16xqLPjn8xXWacmhVSm6NBl1ajaGMWujLCFI7W09RNaXWzbOp+3KQ== Received: by freefall.freebsd.org (Postfix, from userid 945) id BCE014611; Tue, 15 Mar 2022 19:29:17 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-22:03.openssl Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20220315192917.BCE014611@freefall.freebsd.org> Date: Tue, 15 Mar 2022 19:29:17 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647372557; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=jRlHERJdmJKDzIlnMla8byHaRXnG6yYBeMPPDzyeqkM=; b=UT2yTWYD+T8KCgP1vMzxUHMVPurUo1soIc47VlFByUltG3YwEWdAvsOalunHwwHpPOGuy+ q4b1MTnMaSY9w1Tz0POLGr48s9cE3jZ2TsHoXS2ZxxNiiQV9JBgZqBMXaK532PXCrYy9bw xkRH/72hS0txHxJGA1GHl05dsbUvk8nl/fRwqMuhA4CIZi9WtHr4tKtocihh7cGlNUbsTk b9ZJIAiRSCXGVTl5uIymou7hIo8AZWQb6uoO+n1MB+yqFvS9SFCWkSkQiltx4gRS80f+CI 7ww75iLYJH+tC/zWASakI5Md0LtH34lsXmwBawFtRvfxwLIbAsiF7no8V4Nx7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647372557; a=rsa-sha256; cv=none; b=ItltOkTvfKgDEYnWw62c+NFvz+EXCCzE7XJqpN93N5XAGjBvl39zr7c5Dbe3Jy0+UgDR3x 8sYdJ3kvYyUJwPMnwN0C4wo9+H2t3e1nVJNmE6pEsyOnz6kJzNJ6s6hAJDwGcwiTfFAK6B FwDV2C6MItYbwGAQWm6RO69QrXkPmMv8Ri5gj8ihrhKRXFN8XkosPf68Dt9AdQnBimpcpf hvBnw1nmYJNGiKxzLYK4YGgwdNDDlkDgtb/lGULPTZ98gJxSJ5ennZ5oGp0ixm1Te3saNq MZ+AmAKv6vEHMuiBKeEdsFqxD86hg9ImwHD1aGNspE1+Q1LqXH0VZBqff9qcSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N List-Id: Security issues List-Archive: https://lists.freebsd.org/archives/freebsd-security List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-security@freebsd.org X-BeenThere: freebsd-security@freebsd.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-22:03.openssl Security Advisory The FreeBSD Project Topic: OpenSSL certificate parsing infinite loop Category: contrib Module: openssl Announced: 2022-03-15 Credits: Tavis Ormandy from Google Affects: All supported versions of FreeBSD. Corrected: 2022-03-15 16:51:46 UTC (stable/13, 13.1-STABLE) 2022-03-15 17:42:48 UTC (releng/13.1, 13.1-BETA1-p1) 2022-03-15 17:43:02 UTC (releng/13.0, 13.0-RELEASE-p8) 2022-03-15 16:56:09 UTC (stable/12, 12.3-STABLE) 2022-03-15 18:17:50 UTC (releng/12.3, 12.3-RELEASE-p3) 2022-03-15 18:17:16 UTC (releng/12.2, 12.2-RELEASE-p14) CVE Name: CVE-2022-0778 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 The BN_mod_sqrt() function, which computes a modular square root, contains a bug that can cause it to loop forever for non-prime moduli. This function is used when parsing certificates that contain certain forms of elliptic curves. III. Impact A specially crafted certificate with invalid explicit curve parameters may trigger an infinite loop, leading to a denial of service. Since certificate parsing happens prior to verification of the certificate signature, any process that parses an externally supplied certificate may be affected. 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-22:03/openssl.patch # fetch https://security.FreeBSD.org/patches/SA-22:03/openssl.patch.asc # gpg --verify openssl.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/ 5f3d952f6e6b stable/13-n250020 releng/13.1/ 942b5e156d41 releng/13.1-n249979 releng/13.0/ 3847c17aa23a releng/13.0-n244777 stable/12/ r371734 releng/12.3/ r371742 releng/12.2/ r371735 - ------------------------------------------------------------------------- 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/A6HiuWv54gCjWNV05eS9J6n5cIFAmIw5a0ACgkQ05eS9J6n 5cKZqQ/8D7qHRsnXGENtJqjN9Nt2VRiBeO5GKrhBJFVS8/cgVvlgDPFIrWOA/b7v p386eSIRPA3BGpEzP6cQddM/pogHFjSuskSznkNvfsUeZ7B9avODNvHykiODMajU ACv/JZ8IU9rWR2C3DqtlnVqKt3N8Pa8ZpxUCpYDeBEMIaYn/UOUZ9PmZZtaCJ1jz ZSsel99VvA7RdSd58ahb9Mga6KLDdp4bVVftfpepihTOu7pfmxZqrG7W+1pld/wd R88yGEDxyDD9/qDToA13i8+gAU5P5ASmzfNNqVwzJ4QLlkk2OrJBFKCLl+1BrR2p w6r3eZzx9SexCSJ9jLw54rezpXgLyJ/+fURHtKVOu39ELqZmftBgBYS0gxWiQ6jH Wx3lrPjjskFBp4MO5uBChnF8BIpGZN2guLpQkPtHCiaa469OI/NI5zarvXYvGPJL j4BMZtQQWGj2WIFWmMu7fvkhYOgVWmyjS4SWEwom7UGLq1EJKb9Rau9e4TOr8bYw EQV5c71Wn7IV9Oga1rPVRUe2hHAX1VkvhVm49G47V2gyvmPwXwwbVe7byW8Mz46j znkTSmAzHNbXFcJV+aPXejGRDvg0H+wfDyQFlN32IXdyVrbphRjekOu2Ftn8eWS9 SkEdbvYP5x192NpBgfpHo5tc2CJHcM4xKg7WAIUk0vrK7aSgPoc= =TDUh -----END PGP SIGNATURE-----