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 C774D84A31 for ; Wed, 7 Aug 2024 15:27:04 +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=1723044424; cv=none; b=ivK4Y4YiDac6ia7Lnl9ixeIrvkQN4zkCLA+H51Ti0qm+bTMepqnWdwcjTSSg94j9cWMwRp6Pv/ckFTM4fte4PIryjNa6bpBQWdgKIoS9XD6eX1wCIeplckBsW8wFC8MkhN7VLTpDSrE2AuKjRoGJgzcbME+wMab52fF6amqVZro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723044424; c=relaxed/simple; bh=fhZXRfqg5uX52Row+ik8EC0IJHMH7cHeB7z4UjyZ8QU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=s2XVf2/8j/AftIr/yWfcjfou2nFCMesoKZdpArCNpZjwDD9s2YV80O3W6fEPeBxVi1FsoTyk9m38rJAPH39NtnnHQuKHmeQmeUC/hG9d9DYQhUm/24VyngvBI4dSCmE8Z8U1NL83wZrPvsCa4tYqBOAZ9bWDwqLJtZjJubODeuk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tGqTXbXq; 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="tGqTXbXq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B568C4AF0D; Wed, 7 Aug 2024 15:27:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723044424; bh=fhZXRfqg5uX52Row+ik8EC0IJHMH7cHeB7z4UjyZ8QU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=tGqTXbXq+LvaAAAOi+xv/JREvvfGLcWnzShoj/iu4dYQ0oHjGWZw4HwkilxHindeZ Qc2mLg5F8SaHuYlDBDVbXXuM6Ld1m32awLoorYLeDaq2XFpZRf0T0vWGvEwjAEktwl Mn6XE9wDQ6W7kxq0ZTWMhO6c/kiYcr2xkwuJlw2Y= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42249: spi: don't unoptimize message in spi_async() Date: Wed, 7 Aug 2024 17:14:55 +0200 Message-ID: <2024080742-CVE-2024-42249-ada7@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=2024; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fhZXRfqg5uX52Row+ik8EC0IJHMH7cHeB7z4UjyZ8QU=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmb+5MUo+8+k22xyvk+XU9Q4lqqCv8G2Vm5PksflExq0 D9T+1auI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbyjYlhwcpXih8bo69J7vf+ 7niicneC/nzlLQzzszhnHshou+16eH7qzd8BErM6lO22AQA= 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: spi: don't unoptimize message in spi_async() Calling spi_maybe_unoptimize_message() in spi_async() is wrong because the message is likely to be in the queue and not transferred yet. This can corrupt the message while it is being used by the controller driver. spi_maybe_unoptimize_message() is already called in the correct place in spi_finalize_current_message() to balance the call to spi_maybe_optimize_message() in spi_async(). The Linux kernel CVE team has assigned CVE-2024-42249 to this issue. Affected and fixed versions =========================== Issue introduced in 6.9 with commit 7b1d87af14d9 and fixed in 6.9.10 with commit 8b9af6d67517 Issue introduced in 6.9 with commit 7b1d87af14d9 and fixed in 6.10 with commit c86a918b1bdb 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-42249 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: drivers/spi/spi.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/8b9af6d67517ce4a0015928b3cf35bfd2b1bc1c2 https://git.kernel.org/stable/c/c86a918b1bdba78fb155184f8d88dfba1e63335d