From nobody Fri Aug 9 23:38:45 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 4WggN63cxgz5Slhr for ; Fri, 09 Aug 2024 23:38:46 +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 4WggN60Bb5z4sQn; Fri, 9 Aug 2024 23:38:46 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723246726; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=pqpskrFUdVhUKofs6f+lfUjZ55J2P4P2GczFfPuXd8c=; b=NrfxcVtjosdS435K02B4ABtWGby+plQKolAkAJSthW3ALvigcr95q7EpEicwN5df5HC0jw drSIBOFJBu+g3bL5ECg/Zi1I15FnDpyQo00Iid0llkrvSRG7g+01JSHf0iCOKCpHcQsqpS tBKptnKFsdS5aCCUDYcuUa470SNpL30+Q6XBMy/IxeGCr0T3HT0QLZfkk2w5gyV8beFttL PQt1id9vdJSgBMHR9YfSpvwrcm6kQD9U+CgTfzmcB5UW71SsbpSWxyvE8IoAt0S1YQObhh A9PJ1xPy7ygyVcb4db4lABRq3A6DY3kpS99KeWDJ1NtksEIlaEFODEpoW6A6XQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723246726; a=rsa-sha256; cv=none; b=d2RirderTndfuaDJii7TNNi/Gcz8UmF75hj2+M7+u0gIgE2pQTom4jmjbpkyFGfvmp4im6 /m0SGP2U3OrrNcXNTogNbpnN6Ru4/4ZP1B5eU0dfT1MSk1zo36bWT79CAnCMcHKsxgs405 zrJOuHkcc7OCkYb0Tv7ii0rfV4ZmwBN2D4vsRliTHL6byMKBZju3UbEdyVBktmgE9gV38S WgpdY7psuJ8qiOTVpqDGC2L/k7gI9DqD4CZtu7N8RDm2LFb8dLsvCBSUYBZ0N/SfuaXwbN 1dULtc/PnnhFhz9K45JiDJnBL6H93Tg8kUWejYtjP5yrD3LEd/vrXfV3NKyb1w== 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=1723246726; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=pqpskrFUdVhUKofs6f+lfUjZ55J2P4P2GczFfPuXd8c=; b=pXc9V6lo9XsY+gffqsmkxkk2rRh9mPsF5N5hpjcYJMTXJsdjsiHldGLcSABcW1rEzIHPmI 2OjuufcPhaWTYp/yOTqSRPhNXvKTnR36Bv6OtSF2ggr4JvQpgzhRfHRcKPBpTHql2KwIKE dWBXWTFYnaTjwhjtWUW85H9tejN3cd8AA8s9ABkLMLQ1F3T88QwEyFpnSvxWV3i7PXRpya rKd/NJdiut2RTEi2tDVNbTSdo923BdlddLKBAyBlM2tegWWT3RLGAEWF07a0T+C40Zbt56 DsVyGuG8zT9d7mffWTN7zrN3LTufP94GAv0yDLQUZG78/gz6CEh4GRz0iO60ig== Received: by freefall.freebsd.org (Postfix, from userid 945) id DD118B187; Fri, 09 Aug 2024 23:38:45 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-24:07.nfsclient [REVISED] Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20240809233845.DD118B187@freefall.freebsd.org> Date: Fri, 09 Aug 2024 23:38:45 +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:07.nfsclient Security Advisory The FreeBSD Project Topic: NFS client accepts file names containing path separators Category: core Module: NFS client Announced: 2024-08-07 Credits: Apple Security Engineering and Architecture (SEAR) Affects: All supported versions of FreeBSD Corrected: 2024-07-27 03:54:45 UTC (stable/14, 14.1-STABLE) 2024-08-07 13:44:21 UTC (releng/14.1, 14.1-RELEASE-p3) 2024-08-07 13:44:39 UTC (releng/14.0, 14.0-RELEASE-p9) 2024-07-28 04:14:54 UTC (stable/13, 13.3-STABLE) 2024-08-07 13:44:52 UTC (releng/13.3, 13.3-RELEASE-p5) CVE Name: CVE-2024-6759 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . 0. Revision History v1.0 2024-08-07 -- Initial release v1.1 2024-08-09 -- Corrected patch path typo I. Background The Network File System (NFS) is a distributed file system that allows remote systems to access files and directories over a network as if they were local. FreeBSD includes both server and client implementations of NFS. II. Problem Description When mounting a remote filesystem using NFS, the kernel did not sanitize remotely provided filenames for the path separator character, "/". This allows readdir(3) and related functions to return filesystem entries with names containing additional path components. III. Impact The lack of validation described above gives rise to a confused deputy problem. For example, a program copying files from an NFS mount could be tricked into copying from outside the intended source directory, and/or to a location outside the intended destination directory. IV. Workaround No workaround is available. Note that for the problem to occur, the NFS server would have to deliberately inject altered paths into RPC replies, or a MITM would have to be altering NFS traffic. 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. [FreeBSD 13.3] # fetch https://security.FreeBSD.org/patches/SA-24:07/nfsclient-13.patch # fetch https://security.FreeBSD.org/patches/SA-24:07/nfsclient-13.patch.asc # gpg --verify nfsclient-13.patch.asc [FreeBSD 14.0 & FreeBSD 14.1] # fetch https://security.FreeBSD.org/patches/SA-24:07/nfsclient-14.patch # fetch https://security.FreeBSD.org/patches/SA-24:07/nfsclient-14.patch.asc # gpg --verify nfsclient-14.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/ 9328ded386d5 stable/14-n268239 releng/14.1/ 8533e927afc1 releng/14.1-n267686 releng/14.0/ 4e7bf17e9db8 releng/14.0-n265422 stable/13/ 0172b5145ad9 stable/13-n258140 releng/13.3/ 3d5cb2b9a97c releng/13.3-n257439 - ------------------------------------------------------------------------- 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----- iQIzBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAma2pYUACgkQbljekB8A Gu+eAQ/+K8Bh4GvdoSsAW14+/ee/uVjQoXpUKsjDTEsU0kRMCgD9aYN5+D/o/nPU lAuKwjkLm+5xpzZjXtm1z24v7fDKy674YL0O7snAEtzcFNKcNob4sCVESs5USSB7 6rG/3/XCCZhsHM5g52caIdqzC/rflOnipKU6ldySMmJHFlHfgag5VQfklq0F6J8V 0NAyodMYO3IcpBNz9mR4sWnwpd31JLPnbD7LYo460YReu9u29qxUdPljLZaKW8ti 2RhzbiTO8JDu6962Qh0QQf9bnalMKCbmh/Vc6qnRIHsn60vxrRR9BArQ9QBuskYN 4H32OCO+GlL4y0smJSQoolTY4Kq4B1qHIJz9DUbFVayFL0EoJAhuEQsYqRIhTD5r h5PJz07/xIvVO41rUqCJiCflcy+KEmBjom065wGspAsfoYraIcILVe9jUmaiuur/ qZjZ3jvpujulqaOCQcy2zOg6qoI2CrVcPuTKWnEDUWAOZoq0SYcef2DfoRNPCgeb P1Y8TeoD3pzb5AYeGavWYP969Lbk4jE+Pfz/7isIegpvru6gilsTtZgX89s5BZuL bf42dkeRmQnzx/3P89LIEV1/ud5/wnE388UYa00VVkH1xbmMcI+Cp1dKqUWzELiZ fnKRJycdR0bW02ufWkjPfHlfOVHAPK1Y7prkOTj4tD52rbmVgi8= =Pgiz -----END PGP SIGNATURE-----