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 6DE1012E1C7 for ; Wed, 7 Aug 2024 15:27:07 +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=1723044427; cv=none; b=AMRKTQL89/3shzmI6P4R70CQ3tL6pBqTrpjSHFolwZYjqKpF4rqTjmX3ldyZ/ePNWOKtIBOFPTwWoQwRkXTtWLUTo7h91K3PJ40xeyfYDirmRYvomHZYWdV4QI2WSujmZnD86Vvjc4Jo8axfCf48XkWrYR7D7wDJapPcYHxRAjg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723044427; c=relaxed/simple; bh=FJQYRXQATk1UoypQ6V5xkW8pg27Js4+z3+lZDdw2JYo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HLUCVHvIFmpumM8MWcOY0tKei5Hhml34avCVQK6GP14PX+tlSyWxYNAWXIGYy5kIYjosxGKsWLiIBZVvy7yOHXYRoAOHtSnDgZar2k5txczPg2VoFwS/jveMj1sU0/STzXcyuh9EWf9I42WvyC+yPvpXN4NLdnlKTqImwugALYA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wIe9bDfR; 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="wIe9bDfR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A81B7C32781; Wed, 7 Aug 2024 15:27:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723044427; bh=FJQYRXQATk1UoypQ6V5xkW8pg27Js4+z3+lZDdw2JYo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=wIe9bDfRVfCdrRUZHJlrL7B3nq5U7yFjvi6z5NOsFbCltrdIBFC5KIw43UnsGMzuG wlUQ9ViKJDQCrYJ/0Ytyd03WMJIXP160eQErBRtFkmK32anY1ce49Whmno4J21/igK aDDvw3kB26trkmwEsxflNIpLeKSJSFOzn5xn3NCE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42250: cachefiles: add missing lock protection when polling Date: Wed, 7 Aug 2024 17:14:56 +0200 Message-ID: <2024080743-CVE-2024-42250-9580@gregkh> X-Mailer: git-send-email 2.46.0 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=2237; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=FJQYRXQATk1UoypQ6V5xkW8pg27Js4+z3+lZDdw2JYo=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmb+5ODbL0Wb7o2+fX9LuuPHJNFIx7xt/+tENCO+Ghz8 W8V//EZHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRpmkMC64rq/sd/m0Rsslv LXv1XN+177e/92RYcFghzF1s77ucd+8aWvn7LRU8atifAAA= 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: cachefiles: add missing lock protection when polling Add missing lock protection in poll routine when iterating xarray, otherwise: Even with RCU read lock held, only the slot of the radix tree is ensured to be pinned there, while the data structure (e.g. struct cachefiles_req) stored in the slot has no such guarantee. The poll routine will iterate the radix tree and dereference cachefiles_req accordingly. Thus RCU read lock is not adequate in this case and spinlock is needed here. The Linux kernel CVE team has assigned CVE-2024-42250 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit b817e22b2e91 and fixed in 6.9.10 with commit 8eadcab7f3dd Issue introduced in 6.8 with commit b817e22b2e91 and fixed in 6.10 with commit cf5bb09e742a 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-42250 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/cachefiles/daemon.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/97cfd5e20ddc2e33e16ce369626ce76c9a475fd7 https://git.kernel.org/stable/c/6bb6bd3dd6f382dfd36220d4b210a0c77c066651 https://git.kernel.org/stable/c/8eadcab7f3dd809edbe5ae20533ff843dfea3a07 https://git.kernel.org/stable/c/cf5bb09e742a9cf6349127e868329a8f69b7a014