From nobody Tue Aug 09 22:35:26 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 4M2SZQ22wqz4YRZ4 for ; Tue, 9 Aug 2022 22:35:26 +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 4M2SZQ1VNdz3MDS; Tue, 9 Aug 2022 22:35:26 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660084526; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=YswOvJxnYtdaZZYzevfxWJLI07NFwkw26DXChuzGysU=; b=RyZkVkFX7Ei/PAdkbjjj5edrbIpLNCjpMAzqdyf1tibX9AOYgPHdyR85Sn9wDjIE0IPdVD YwkORMdytdcQCd1g4EDFt0xHdcjelMG7R45UwJoCbdZk5l9ogBQFmswtI90/xEdb7LvXmw fWVP5h8x+sqjp7CSNfn4rxCZdBGLokVz3lVCOy/BHHUtNwOyXC6AHIRIZGW8qx7i+fV20K /7jPdEPKwHdrlgT3+iSoW4xDy7rLauNL1gZmvXaTP36R0pKvDufIdXA6KLnG0DS9I6qSqh j78YvOb3aYpZ3lgGoOOByj0mN969ACSxx2Bnw2AAbX99nndTzHpgIZ33WlSmnQ== Received: by freefall.freebsd.org (Postfix, from userid 945) id 0E5F717496; Tue, 9 Aug 2022 22:35:26 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-22:09.elf Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20220809223526.0E5F717496@freefall.freebsd.org> Date: Tue, 9 Aug 2022 22:35:26 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660084526; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=YswOvJxnYtdaZZYzevfxWJLI07NFwkw26DXChuzGysU=; b=ZebY5aAhJcj+E/z/bPRdvSvCwhqM2WZmHZWpILChg9b7tH/xp8XteK6PhFBMQH7LSMs7t/ 3UL/0QWj9qwxCSgfaEc/Avnbdl7bg9ESy2UZCHfNjVdlvvQZzd1DcXc5MrBl0miArNMH0m NF/LRwWHurrzOeLnS6x9aFOoQEUN4p4Mq4plXd4yUYv5eQVZHVK22rnDEy1Z/Vmrbu6twm kN4mfh7/tu37OFutDScYE0aQ+ggZ2MEFE3/2Aeg0QS7Ddxn/uF9Tx+nNzZrnI8c48FB0Cg 1HsCU91U331Th2bEeqk5PIT2GcLd0aH3ZOOnOWJXQY7XEqteQU1JfIUnKoDV6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660084526; a=rsa-sha256; cv=none; b=IVuBYiYradnjza1iKnVrp6pVvBXYOtSqg3eICvFW/sd3PIA/s2UgqGIoqUTAw+GMlyem7f MYGfY26or8VbKJt+JBTlYvw28TF88B+KSiRL3yB7qg4PhED20rUsMhrOWk0y8IH+F6+4zT wMdGO4QILfP+wQ+ryqAifNICm/mJGzFmdRismTzzWHSfDa8U4jGmVxlYu1Qu5EXg7hWjKQ 6D74r0kY/Kxeg8oVvCKYzfN6EO/iTLZA9cjAthC4r4vP6WJTi7uegf1baTamfkkSvMLOIN bz2l2eI6zPR6NVExpy9ZczXiZl8sDNm+E2dDeADLiIY327UUezhQoSGWHnN/Gg== 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:09.elf Security Advisory The FreeBSD Project Topic: Out of bound read in elf_note_prpsinfo() Category: core Module: kernel Announced: 2022-08-09 Credits: Josef 'Jeff' Sipek Affects: All supported versions of FreeBSD. Corrected: 2022-08-09 19:47:32 UTC (stable/13, 13.1-STABLE) 2022-08-09 20:00:43 UTC (releng/13.1, 13.1-RELEASE-p1) 2022-08-09 19:59:14 UTC (releng/13.0, 13.0-RELEASE-p12) 2022-08-09 19:57:35 UTC (stable/12, 12.3-STABLE) 2022-08-09 19:59:47 UTC (releng/12.3, 12.3-RELEASE-p6) CVE Name: CVE-2022-23089 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background Process information known as "prpsinfo" is written when dumping core of a process as an ELF note. The sbuf family of functions allows one to safely allocate, compose and release strings in kernel or user space. II. Problem Description When dumping core and saving process information, proc_getargv() might return an sbuf which have a sbuf_len() of 0 or -1, which is not properly handled. III. Impact An out-of-bound read can happen when user constructs a specially crafted ps_string, which in turn can cause the kernel to crash. IV. Workaround The system administrator can workaround this issue by disabling coredump. This can be done by adding: kern.coredump=0 to /etc/sysctl.conf and run `service sysctl start`. V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date. A reboot is required after applying the fix. 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 # 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-22:09/elf.patch # fetch https://security.FreeBSD.org/patches/SA-22:09/elf.patch.asc # gpg --verify elf.patch.asc b) Apply the patch. Execute the following commands as root: # cd /usr/src # patch < /path/to/patch c) Recompile your kernel as described in and 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/ 8a44a2c644fc stable/13-n252079 releng/13.1/ 69a456c0b60b releng/13.1-n250152 releng/13.0/ 056ffc74a769 releng/13.0-n244804 stable/12/ r372376 releng/12.3/ r372380 - ------------------------------------------------------------------------- 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/A6HiuWv54gCjWNV05eS9J6n5cIFAmLyz1EACgkQ05eS9J6n 5cJ6tw//VycxB1Il6TKajIo9VQE5lN1M/h1j0fbyUokXWpcGH/+iGl4sLkxtrFuv Ekjshp9AezGgSIWCEdcwx8ck3LUeU0kVhAjcJjI/p+YfSWcWlLTQk13/Z3FsF6pv EK1VjKDiMpZHbddbkvY2q4JKIdO2UXgBYwtshvwHL+Y8Ev2cxvJdQfwtclf+N0Q6 Shgf25XPqkrG9vCJ30ldlJs902PoHKyGUOqU0+4741rcaZBjeF26RQPOXT+z4yQz RpVQvyQ01OnXgXO8X+7hoW83m3C7hNz5KnmX5YLMQCBUgYjBk4edeOlnq1wnRTtW k0qPdkIa5Rj8Yq8k+VP3PMiKezXOmxrmXUV16j64KZM9+r0eNPYx0C8sgkLZSrRe osk57jIYtI0M7fTVNlhMY7uCLFaK3xHb+/Md+ExpCs79ZbH+CxgnU+HPyIIVV4zX RhDRAh/w/MVKcHJM7y2TM6VDDhiLNqWeV9ruMj92ZnkB+QnRqrah53JUlo8PQcFn oDfe/pSGhchpjwyhwHoXTBQNQjUlbm/7iC95D0UdtfuH2eFcSdDq6aWMO5amxui0 Kkm+nswlYIpJsq3Addu2pEEhh2DHIwF9wiz8DKFJ1et+BF+GW+V4XKvXSd8sO7j3 19GK3xtf9cGnYYoPBpNSxuFLP+zcb+1gXTX+N9gG1EqQfXdjMtI= =lK0G -----END PGP SIGNATURE-----