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 01FB4653 for ; Sat, 17 Aug 2024 08:55:02 +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=1723884903; cv=none; b=KVeXKoKveBofAv/oxsDRGmqzxsKd3cD5JuacmO5ay4mndRqUhuHd03BH/0T4WL/Wz8vwO1JfEmKHnn3MX3Z9vKVIjTMbHuJQ6ZcXiWMZZZy33YpFrV2UzQ+HUYRD7hl3JbepFlrWU/W6fI0csSgjgsKPggXCcYEAX6/Dsv1qdwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723884903; c=relaxed/simple; bh=5vSV7dPx7raFVCgDS7oKjya4vL0nFptFKUDIHyHj3ao=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fevBBDmUoYC+OjKwQCxxone+GMakpWvmrAUlHAkhqu5ov3hFgaw7Xq+cKhMBi3J5lFe8PKM8xfXv35FvuLdU6C17oKVZwFPESbl0Xopt9FvV4BqmizuvilZ8zeyQ5HGwE5rzBjd/OwNMVzOS+Zs9pBuleF4eA9v8jws6tJiSvUo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1MdfQ/2+; 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="1MdfQ/2+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B7D8C116B1; Sat, 17 Aug 2024 08:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723884902; bh=5vSV7dPx7raFVCgDS7oKjya4vL0nFptFKUDIHyHj3ao=; h=From:To:Cc:Subject:Date:Reply-to:From; b=1MdfQ/2+I890ml885x38mxj9kSpBopO88zra+3Q37IXUdoxEg/XKsep81N+fQOt32 P+dkrxwTMYvnpIuMl4wkaWyvtkdCEAXsUY8QGmXyL0xpsKFOxtz019R6Yo09k35mAj O0+AVi7mGekex59XP9w9ah7+RN9x/XhoPBS6sduY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42265: protect the fetch of ->fd[fd] in do_dup2() from mispredictions Date: Sat, 17 Aug 2024 10:54:39 +0200 Message-ID: <2024081737-CVE-2024-42265-a943@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=2182; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5vSV7dPx7raFVCgDS7oKjya4vL0nFptFKUDIHyHj3ao=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkHUn3FXkVYF6hVNmwRaH0temqtz6PNSjv7ra6aGGfE/ nP3OJrcEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPRk2VYMGNh6s9pzrwOelvP L22ZVTv7gJSrFsNcidip4keXPH96YNM3Z6lTmUd+fnsiCwA= 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: protect the fetch of ->fd[fd] in do_dup2() from mispredictions both callers have verified that fd is not greater than ->max_fds; however, misprediction might end up with tofree = fdt->fd[fd]; being speculatively executed. That's wrong for the same reasons why it's wrong in close_fd()/file_close_fd_locked(); the same solution applies - array_index_nospec(fd, fdt->max_fds) could differ from fd only in case of speculative execution on mispredicted path. The Linux kernel CVE team has assigned CVE-2024-42265 to this issue. Affected and fixed versions =========================== Fixed in 6.1.104 with commit 5db999fff545 Fixed in 6.6.45 with commit da72e783afd2 Fixed in 6.10.4 with commit 1171ceccabfd Fixed in 6.11-rc2 with commit 8aa37bde1a7b 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-42265 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/file.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/5db999fff545b924b24c9afd368ef5c17279b176 https://git.kernel.org/stable/c/da72e783afd27d9f487836b2e6738146c0edd149 https://git.kernel.org/stable/c/1171ceccabfd596ca370c5d2cbb47d110c3f2fe1 https://git.kernel.org/stable/c/8aa37bde1a7b645816cda8b80df4753ecf172bf1