From nobody Wed Sep 04 23:37:29 2024 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 4Wzf6f26D4z5Vrmh for ; Wed, 04 Sep 2024 23:37:30 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wzf6f0BH5z43jr; Wed, 4 Sep 2024 23:37:30 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725493050; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=WmMlfa3aJUKbFkAieYG9YzTkYWRyO+FAm6pw0xJdeak=; b=NPsF5hAdCigsMj3GK5SnAv1K4Uxcc/dxgiclJV577ZWbt75RH4qV0xnEInhvp5oilL4cue hlIrOFTICA25CfyFU5zUYwdLSiXzMtJpNnkPd4cIRzxxLqVw3WyQmnZv9ls4nS8YCDNgGp pvrgOvsfYGEG4Q+lkQwg35euJXPPVU0es296s5BwbUck9byKMCxJRqPJUMaqAv3wE7G9XN AYvdN1JlmXfQE83RNX8EQb5+/YKCUlNw4Ke5OXIE0X+XZz2+PMXrsay2zVd4Q+15Elvv1/ jb5RQ4PtoxKa4K1qzXOPSOi/SS7zsUAXMEYG1rGAEdUCefa5OLT32MT2F3aYEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725493050; a=rsa-sha256; cv=none; b=Ng7xOlxwKwwnUx9WjW9LJ6UCoRb/hRtEtmvccGup4GRZHX9lPGLeomWHOUwmypRaEVctxa MfdKYPTts9XgeRNtDCW0BdklnshVqLClndfvA+0VBfOEy3LJtUKF5ITo3B5AHhON/T3mxk ufn1UWnE8WYDGlI8+vQWo4fCYEQ4gPUGCmMKqCfWS37Qs1VIgHRJMUnPPE+mrKH1Uhl6U2 kaAPn2fExRXKNT83E4bRAEKI7UdF0IQfnJ2fn+H5RVrkLfbVUQzuUbw2UoapNcWdukOOXO 7stpk0rVNDVaquWJYP0RsYQ14/6Y9rBFQk1CW4Uf9zf0OQrm/wZR0kpOGG3aag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725493050; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=WmMlfa3aJUKbFkAieYG9YzTkYWRyO+FAm6pw0xJdeak=; b=M7+9AdsF3f/6o7J6277/oel5JyMir/SgzaXw+sCpF77P2QrfqolnYgrkxsz/aa/NRD62Dp ngdPnHLElod6w6oyI6XXggTk+nzJWjKJR3T46haQlDOsWph7ptNx52lu79Tk+qcNyGuaoE kMJtI7JpLsk28SDMQKRq4WwocK+UPk+rrs3XrmXtpHo3FOBvtP6XaLijcE10OYRFQu+/v7 +s5QBVJid81P+g6A6AfDM8tkV4+9GDrOg53cnAcYHm9xELqK2kkUoWKLvZay3HJQHX9XEG ycp4VvE4kWhM56ztarFnOqg/IxWXFC8P7mkTMF5W4uuKKHmrivq8JEW2io+7+w== Received: by freefall.freebsd.org (Postfix, from userid 945) id E4F1A272DC; Wed, 04 Sep 2024 23:37:29 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-24:14.umtx Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20240904233729.E4F1A272DC@freefall.freebsd.org> Date: Wed, 04 Sep 2024 23:37:29 +0000 (UTC) List-Id: Security issues List-Archive: https://lists.freebsd.org/archives/freebsd-security List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-security@freebsd.org Sender: owner-freebsd-security@FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-24:14.umtx Security Advisory The FreeBSD Project Topic: umtx Kernel panic or Use-After-Free Category: core Module: kern Announced: 2024-09-04 Credits: Synacktiv Sponsored by: The FreeBSD Foundation, The Alpha-Omega Project Affects: All supported versions of FreeBSD. Corrected: 2024-09-04 16:00:58 UTC (stable/14, 14.1-STABLE) 2024-09-04 21:07:40 UTC (releng/14.1, 14.1-RELEASE-p4) 2024-09-04 20:54:24 UTC (releng/14.0, 14.0-RELEASE-p10) 2024-09-04 16:05:17 UTC (stable/13, 13.4-STABLE) 2024-09-04 19:58:30 UTC (releng/13.4, 13.4-RC2-p1) 2024-09-04 20:29:50 UTC (releng/13.3, 13.3-RELEASE-p6) CVE Name: CVE-2024-43102 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background The _umtx_op(2) system call provides support for the implementation of synchronization primitives between threads, and is used by the 1:1 Threading Library (libthr, -lthr) to implement IEEE Std 1003.1-2001 (“POSIX.1”) pthread locks, like mutexes, condition variables and so on. In particular, its UMTX_OP_SHM operation provides support for anonymous shared memory associated to a particular physical address, which is used to implement process-shared mutexes (PTHREAD_PROCESS_SHARED). II. Problem Description Concurrent removals of such a mapping by using the UMTX_SHM_DESTROY sub-request of UMTX_OP_SHM can lead to decreasing the reference count of the object representing the mapping too many times, causing it to be freed too early. III. Impact A malicious code exercizing the UMTX_SHM_DESTROY sub-request in parallel can panic the kernel or enable further Use-After-Free attacks, potentially including code execution or Capsicum sandbox escape. 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 or arm64 platforms, or the i386 platform on FreeBSD 13, 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-24:14/umtx.patch # fetch https://security.FreeBSD.org/patches/SA-24:14/umtx.patch.asc # gpg --verify umtx.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 as of the corresponding Git commit hash in the following stable and release branches: Branch/path Hash Revision - ------------------------------------------------------------------------- stable/14/ 4938f554469b stable/14-n268665 releng/14.1/ f4a2dbb81603 releng/14.1-n267707 releng/14.0/ 37823ca38148 releng/14.0-n265444 stable/13/ a73a70472c47 stable/13-n258319 releng/13.4/ 7739dab97433 releng/13.4-n258248 releng/13.3/ 8fd0fa88b5a6 releng/13.3-n257458 - ------------------------------------------------------------------------- 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 VII. References The latest revision of this advisory is available at -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAmbY55IACgkQbljekB8A Gu9grQ/+J7wLENdAwj/vclXgEwiqMtVBud/oWWXL6/h8YzSCOGRW88NsGrhkS+I4 ykWVdCcTvOqP8FvArarQVTfmMD/dQvAZZciHMkYDrQhjd7BwBuWVkLe1YdA1VR0o TT5gVclbJFJP3kvC+ivusN+hVn8Iacb0bvLn47/7pBKL96cCx1aTcP9XtHJqPZAr W80C5+4Z6qE0bUcCZ5lT8/6XvBtQNiD7otA7h5vBGMoIlBHgrxvYIz+QxAoOJ9Ke DvwNKjAm1nYrgiAzAF7lgPWLe6TxYxfYVcyEdm2UJnVpZqldnZevjIFD4DgaijKF dPT99EJdgkDQMqaiRM4VqlkcQvzZC/MatV9ypcStoRvQhQZczemLZdEVcf2luEdo r6RLvCGQPiSbeANc2DV/J35oX/Zwr9KN29ttkOqisVfadIba2LXANUiAF/x3SReo B/Gyilla4SU42obSaDuOe7fuDxj1HS4vAcJ03BQP0VfMNFkUaqb6ZoXioWhgtHAO E1zRIJcht1Ad2mEJtMid51co40g1Gd0lcxgEF0UOaIm5gTbYGKD+9tiOBaxvXlxC eDiKChtB31XWmfnuK4fSKh28dfyu+ltRUVsmQbakpQyufWx/RhSk3neZs44SNrwq SEX5SZ9Rt+E8uBZYU/rDzP2N6cd9ayMANCanuh2GPjorf15Em3g= =/sml -----END PGP SIGNATURE-----