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 CBD7F1FAC31 for ; Mon, 21 Oct 2024 18:55:05 +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=1729536905; cv=none; b=VtvEkVnRgBlhmawFfQG44hqkp2XywdAh7jzJUot253zgCBVEsZViKU6dH2kutzc13PavnmMC9KKlAiIOPVFSd93/5FsyAR3tNUW8YkNZdXbtCXsnAhITXJWp0ecM99jLtRNJAKblQGYAVK1WQRgkZQWL5U/HNnZW0I8qzWhrnmQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729536905; c=relaxed/simple; bh=q9k9VP5f7ClevYGlx75Ri70ozDH4KmgsqVJtKAZ1kD8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GLXVD3PZom86wfVINw82RIPyPma+wpJGTGYL98c81qlthgRVxIWJmqgRj1fpvlI6NAX6ZIc0wR//tzvJYImolDzIDiocJM2ELiUIDLmU9Vc9aQ26rGx4L3aFvtK98780rFa7RYgrLhbzsKrZ2273xQBqbL2oIBfMVWbf42uevp0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cT6MHV5Z; 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="cT6MHV5Z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C403C4CEC3; Mon, 21 Oct 2024 18:55:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729536905; bh=q9k9VP5f7ClevYGlx75Ri70ozDH4KmgsqVJtKAZ1kD8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=cT6MHV5Zsf5HBaqjln1/EA1Y6wXJ/lHxWmuBIovlzs0q8EDsRCMR8GWM9YswuLFNk Vk3nJA7roBguqRlk9QJZbvgy1PVSxauHxcfzaRU869IRziH0QDIZkviCGQl+wJVKSw +BPsBQHYEUyHoGi+O1ACGSJ+ja2uo3/a4Mi+TmtE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50010: exec: don't WARN for racy path_noexec check Date: Mon, 21 Oct 2024 20:54:14 +0200 Message-ID: <2024102109-CVE-2024-50010-57e8@gregkh> X-Mailer: git-send-email 2.47.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=2607; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=q9k9VP5f7ClevYGlx75Ri70ozDH4KmgsqVJtKAZ1kD8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOliiwML9s5P/S5WsVLz44a5mTmt9sam/4Pfe+qprGOOV 4xmm6TTEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABMxKGeYH5o/e/Wtrd9T9zD0 XNlyPZx1k1jVfYZ5ZiH2e3mD2fNjvji9qOqdaNIR1tgAAA== 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: exec: don't WARN for racy path_noexec check Both i_mode and noexec checks wrapped in WARN_ON stem from an artifact of the previous implementation. They used to legitimately check for the condition, but that got moved up in two commits: 633fb6ac3980 ("exec: move S_ISREG() check earlier") 0fd338b2d2cd ("exec: move path_noexec() check earlier") Instead of being removed said checks are WARN_ON'ed instead, which has some debug value. However, the spurious path_noexec check is racy, resulting in unwarranted warnings should someone race with setting the noexec flag. One can note there is more to perm-checking whether execve is allowed and none of the conditions are guaranteed to still hold after they were tested for. Additionally this does not validate whether the code path did any perm checking to begin with -- it will pass if the inode happens to be regular. Keep the redundant path_noexec() check even though it's mindless nonsense checking for guarantee that isn't given so drop the WARN. Reword the commentary and do small tidy ups while here. [brauner: keep redundant path_noexec() check] The Linux kernel CVE team has assigned CVE-2024-50010 to this issue. Affected and fixed versions =========================== Fixed in 6.11.3 with commit d62ba2a5536d Fixed in 6.12-rc1 with commit 0d196e7589ce 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-50010 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/exec.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/d62ba2a5536df83473a2ac15ab302258e3845251 https://git.kernel.org/stable/c/0d196e7589cefe207d5d41f37a0a28a1fdeeb7c6