From owner-freebsd-security-notifications@freebsd.org Tue Apr 6 20:22:58 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 40A9F5B7BD4 for ; Tue, 6 Apr 2021 20:22:58 +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 4FFJqk13dkz4mCR; Tue, 6 Apr 2021 20:22:58 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1617740578; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=kbW6A4afUkFferrB8F8Jh7KYshQkn2d6KLouF+QowWI=; b=PPKSlvPUnrLP0qAHjX1WLyXNIomy3SJLFaLF1F4ftriXxP1TdRHdOLNGb/3JycK3Si0ehZ ocPv6MDmngcAF0fEl1/wcCUlo57T4mEncSNScWwdBH0yZy+EIIMRtWFkiqnnwSLquTY9QU MFDzBTWSPW/VXfLS8plAtz22BgxSF46icpj6c+H3Uhi5LXnpjoD96X9CQVphI37yxMfjTF 0fxORKZOVV6G5+01TILq4QfdyqcyaH3VClcKyDVDuhPYyjmVoyGlrRYJIeSWzweM/xQJgE XjGdwu1akvbwX6YYDCEDJ45tBn9Hn5jnMmg5Fqn6bZ5ZwBZiSYP/q9Fi1dKwlg== Received: by freefall.freebsd.org (Postfix, from userid 945) id 1A67E15C4C; Tue, 6 Apr 2021 20:22:58 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-21:08.vm Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20210406202258.1A67E15C4C@freefall.freebsd.org> Date: Tue, 6 Apr 2021 20:22:58 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1617740578; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=kbW6A4afUkFferrB8F8Jh7KYshQkn2d6KLouF+QowWI=; b=yfAUAYc9mF6gXs5AFPAGi9A2+IOuaEiKXfv2v00MRlmMRAywAlTNQ0KA0rZXjHQUgqnCQ3 0VALqRP0hvzQFWHWGgBNbWWpK5R9VTzh80sKH4UuXr/H1oxUQq3iOIJRqSbHxfQ+vMBxWC 4XJ/VFOcrlf6m4ri01VHQAIBsd0oep9oRzABlPLDBUAJ+d4mUhWZrQb8Q5sJkIw3xCBxhO ujC7aKgoOo/fG9+NNr3vKMUMOxUvDhnQxQr2mRDxzvpjjR6+XaHkrudlFraqavjEyNWbLl gjAnfZa6GF0CDOSmogut//5CEhtfbt9MPOgxen7A7/RUZ4Iu7fkJGXXLHCQ0ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1617740578; a=rsa-sha256; cv=none; b=I0NdsDXxRPIyF665j3euTEKNxMS2HEwckDC+n5FtlFvIj0yKCSP8bGdkygD5doDWCadkM5 TunJ28Q2pL8fj4MLPV5e8I0cj85b49ymNFcy9yU1UrOo4L8PWi10ux1OwugASRZr5TdFYt RGxm/HbPqR9g3f8g4C/86lf9AEQZJNw+IfiDjoybV+TgC0L948mEDV7MLZW3IMQQcqEm3Q 9LMXz7AlDry36putnnoKKZtoG2Y7MILQlUx0QzDcaZ6dQr7yLXmhfcAHgYy+K956qLbye9 D8kd0UqZLxAXZdX66XD3p0kl7izD/0Mcq687zw6F2iV3Z7OkUCoTLnGU7C/Z/Q== 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, 06 Apr 2021 20:22:58 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-21:08.vm Security Advisory The FreeBSD Project Topic: Memory disclosure by stale virtual memory mapping Category: core Module: vm Announced: 2021-04-06 Credits: Ryan Libby, Dell Inc. Affects: All supported versions of FreeBSD. Corrected: 2021-04-06 18:50:46 UTC (stable/13, 13.0-STABLE) 2021-04-06 19:18:49 UTC (releng/13.0, 13.0-RC5-p1) 2021-04-06 19:20:46 UTC (stable/12, 12.2-STABLE) 2021-04-06 19:21:30 UTC (releng/12.2, 12.2-RELEASE-p6) 2021-04-06 19:22:31 UTC (stable/11, 11.4-STABLE) 2021-04-06 19:22:56 UTC (releng/11.4, 11.4-RELEASE-p9) CVE Name: CVE-2021-29626 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background Memory mappings shared between processes are a feature of the FreeBSD virtual memory system. They may be established by unprivileged processes with the mmap(2), fork(2), and other system calls. II. Problem Description A particular case of memory sharing is mishandled in the virtual memory system. It is possible and legal to establish a relationship where multiple descendant processes share a mapping which shadows memory of an ancestor process. In this scenario, when one process modifies memory through such a mapping, the copy-on-write logic fails to invalidate other mappings of the source page. These stale mappings may remain even after the mapped pages have been reused for another purpose. III. Impact An unprivileged local user process can maintain a mapping of a page after it is freed, allowing that process to read private data belonging to other processes or the kernel. 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 and reboot. 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. [FreeBSD 13.0] # fetch https://security.FreeBSD.org/patches/SA-21:08/vm_fault.13.patch # fetch https://security.FreeBSD.org/patches/SA-21:08/vm_fault.13.patch.asc # gpg --verify vm_fault.13.patch.asc [FreeBSD 12.2] # fetch https://security.FreeBSD.org/patches/SA-21:08/vm_fault.12.patch # fetch https://security.FreeBSD.org/patches/SA-21:08/vm_fault.12.patch.asc # gpg --verify vm_fault.12.patch.asc [FreeBSD 11.4] # fetch https://security.FreeBSD.org/patches/SA-21:08/vm_fault.11.patch # fetch https://security.FreeBSD.org/patches/SA-21:08/vm_fault.11.patch.asc # gpg --verify vm_fault.11.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 The following list contains the correction revision numbers for each affected branch. Branch/path Hash Revision - ------------------------------------------------------------------------- stable/13/ 2e08308d62f3 stable/13-n245117 releng/13.0/ 724bc23da1a9 releng/13.0-n244728 stable/12/ r369551 releng/12.2/ r369556 stable/11/ r369559 releng/11.4/ r369561 - ------------------------------------------------------------------------- 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 HHHHHH 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/A6HiuWv54gCjWNV05eS9J6n5cIFAmBsveMACgkQ05eS9J6n 5cJ0Xw/+JFP6UKPMxcYwmAmIoDS5YAsUzuDVQNooZzOQiltyVqPrHD3Dh/32+Tm3 W6yeITNcnUbVhFBPli3x0pHldCCcj1JQNtzUYcS/DKNvD2LxjB4bhiiE0YHImaP9 JWOMoc5rNYpOl4iKK5DZkQAxZsHu1zFSVt+0O/aL70bDCYupsslWBbRRkxgkeShW wGFhSMhlJ1QnnygzsICbyK5GP4XYqfAWZ5dviznNcZLrOifCLG6HNxixfOG/vf33 yZzwA7RSNpOyULC1AYmUqiEZWgABL63hOIiraD0sASteBhMY/DCjq/QLZKsaONsp FYemSTnW1hs1MVfTm4ecwgZJEJf8bV7cQXrxA3bLJmRoN9CcTGHDQCjFKHvMVXSe qU/n+CICO6Ly8nTmL0xYjpJLEQaQfC/98hXk2otpgIia8r5Gn1MOwooTdN+KWlfA LHzuP0Wf5NIjo1QkbbBRUSfCjV+dbGzRxgCYTGj1dN+XbR0uxeVtWeKXU3WaDIYI 6sT3L41yUBvEce7h/449RunNjRb5nuWczh3YTIzqDA3dEStLPKxlzL790M8TId6e XE+YclkxSTNMuxvCEw/vDJB4bZ2eOQ6noSzfrUqxjGnbtcuYP/RJGc3XrVZpiXbY u+OuE4Owve9e/sNCRqZeEQ2CHnntCdji0sk/CAlbkHcdHYPbunI= =rC4V -----END PGP SIGNATURE-----