Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05A4A1C32FF for ; Sun, 19 Jan 2025 11:53:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737287616; cv=none; b=SW8uf7Ykojrn9+3Lo06GPhSWGZ6AVpzeZE+yjpPE2Sj+UxFN9vdcQ4UNf0VS/8oWP5NaCE92uKPqv4X50kIOIP0s34dyYQyYzdyDRpVaQv+Rk41I71a2tZ4um3YvV7VUnwMuU4zB0w/+OT6MnzprLaGOCbZDtBC1cZ+1WeO73+g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737287616; c=relaxed/simple; bh=b6ekKpwpI2MwRrZGMt2JR6bg0s+7LOyDf7X4GoeFURg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=K/kRcDpJ4rl+TQjXRw/Bu2b0yspxRtpqdckui1wZM685XBBFJeyACHCufjimNk9tzVDUen2GElKXysXLr5BJqAyphzjpxRcJQVE1PskTnlLnB+o7r8XYJyQclIYZv7/iWtPOUICOaOTFQWIvgfTvfmitJe0oYVj/3zfupTDqbI8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dSVqI1FI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="dSVqI1FI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 105BEC4CED6; Sun, 19 Jan 2025 11:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737287615; bh=b6ekKpwpI2MwRrZGMt2JR6bg0s+7LOyDf7X4GoeFURg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=dSVqI1FIgvpzzgDlrxj0hNiK9u+r5AZWRAZi+qZWul/dHNj8teO/D6Ic9rfSydXY8 fQw1Cvbqhj12KifSCIkEescADQUtS+4Wp42eA1yqYTC6IGGOkNhzzZ+5FbmeH1YE5I KyQMc1tnu0bWdydVr1dkmQFYpZ28wV1J+axVVAK0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-57924: fs: relax assertions on failure to encode file handles Date: Sun, 19 Jan 2025 12:52:55 +0100 Message-ID: <2025011943-CVE-2024-57924-954a@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2931; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=b6ekKpwpI2MwRrZGMt2JR6bg0s+7LOyDf7X4GoeFURg=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk9z7v9NoRYCAfVaOoUn/3uvYZxZvlc19ds2gy9hX6ro te3C3R3xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwERsDzEsuOrrtfn/zoy0pC2z uJlEVS57PPvmxjDf58QMZ2m2Barz1kQ8S/h263fDqgf3AQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: fs: relax assertions on failure to encode file handles Encoding file handles is usually performed by a filesystem >encode_fh() method that may fail for various reasons. The legacy users of exportfs_encode_fh(), namely, nfsd and name_to_handle_at(2) syscall are ready to cope with the possibility of failure to encode a file handle. There are a few other users of exportfs_encode_{fh,fid}() that currently have a WARN_ON() assertion when ->encode_fh() fails. Relax those assertions because they are wrong. The second linked bug report states commit 16aac5ad1fa9 ("ovl: support encoding non-decodable file handles") in v6.6 as the regressing commit, but this is not accurate. The aforementioned commit only increases the chances of the assertion and allows triggering the assertion with the reproducer using overlayfs, inotify and drop_caches. Triggering this assertion was always possible with other filesystems and other reasons of ->encode_fh() failures and more particularly, it was also possible with the exact same reproducer using overlayfs that is mounted with options index=on,nfs_export=on also on kernels < v6.6. Therefore, I am not listing the aforementioned commit as a Fixes commit. Backport hint: this patch will have a trivial conflict applying to v6.6.y, and other trivial conflicts applying to stable kernels < v6.6. The Linux kernel CVE team has assigned CVE-2024-57924 to this issue. Affected and fixed versions =========================== Fixed in 6.12.10 with commit adcde2872f8fc399b249758ae1990dcd53b694ea Fixed in 6.13-rc7 with commit 974e3fe0ac61de85015bbe5a4990cf4127b304b2 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2024-57924 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/notify/fdinfo.c fs/overlayfs/copy_up.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/adcde2872f8fc399b249758ae1990dcd53b694ea https://git.kernel.org/stable/c/974e3fe0ac61de85015bbe5a4990cf4127b304b2