Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 954104EA361 for ; Wed, 16 Sep 2026 10:43:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789555463; cv=none; b=WRs2RaUyTb0OQZIJ7ieeP1/AZSJ75tcexX0piJgoE2v4vTqDmNL3PKhokClJK8W7a8I6/7TkQoQqYKpH2zPbK1ZZ68hxv9umldxhT9644yXRp9Ug/DLFS1CVRqs/BOwsbDxusR7TJx4+sxagUe2eHSSJJTG6KvsfQHx/IIkU1CY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789555463; c=relaxed/simple; bh=CDjMwdPFVOeGvGEs4gq2xksYPG9FuwKx2wMImTLRJjs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=T1DuoJBI3qcD2P7qlqZMmyiFyYOyGDyW685viAJ0OFKc2iaqy0n9Rkj63dQj080iQ8//KhCR6LruGUuE0hTUPmmbHWmCDcI0TbQXqEnHuEC99zuCHJ55ruDmdARML65eilYtgZRQ+jtJMt9JujQsDo75qpsswCp6tYAk+at4EV4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1WomU+i2; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1WomU+i2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A20B1F0089B; Wed, 16 Sep 2026 10:43:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789555431; bh=9GpKYsvi1oN2RdDlnCl1OCqbCT+TSmIK5da7gsxZi5Q=; h=From:To:Cc:Subject:Date:Reply-To; b=1WomU+i2/A/2I6v9ASfkaoQDl4IrasfjW4NqGzuXmMJIAtiSPFzyq/hbs5IcJoKy6 0UxQ+f+O6Wh7aitDKXUzzt1bhjTNgZKVmOLxa2mviMqWljEb7dTT9K6f7yv5idp6zI HMvbt7w36aezCeN/eEL6CosotRUG2LT8Nq7d4NiY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-90012: spi: Fix DMA mapping ownership on partial map failure Date: Wed, 16 Sep 2026 11:32:22 +0100 Message-ID: <2026091602-CVE-2026-90012-b777@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3255; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=D/RyHKB5n1KJ/1iNJGP1DgnAmx5kTgHJPWaK2LHe7ag=; b=owGbwMvMwCRo6H6F97bub03G02pJDFmr8leVf2by2+N08/nu/vVl9+7fPaY/Y+cSmRMn333bW HB+64+pyR2xLAyCTAyyYoosX7bxHN1fcUjRy9D2NMwcViaQIQxcnAIwEfl3DAt2zYvP6+5O26vD KOEryhu7pOpaMx/D/ML3s9fHadurzzk480bVvpfXmX/MXQkA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: spi: Fix DMA mapping ownership on partial map failure If RX mapping fails after TX mapping succeeds, __spi_map_msg() unmaps TX but leaves tx_sg_mapped set. If TX mapping fails on a later transfer, mappings created for earlier transfers remain active. In both cases, cur_{tx,rx}_dma_dev have not yet been updated because they are assigned only after every transfer has been mapped. The subsequent spi_unmap_msg() may therefore unmap the TX mapping again or release earlier mappings using a NULL or stale device. Using a NULL device can trigger an oops. An empty SG table does not prevent the NULL dereference because dma_unmap_sg_attrs() accesses the device before checking the entry count. Publish both mapping devices before mapping starts and unwind all failures through __spi_unmap_msg(). This clears the mapping flags and releases each mapping once with the device that created it. Publishing the devices before the loop also refreshes them when no transfer needs mapping. No mapping flag is set in that case, so current users do not use the pointers as mapping owners. The Linux kernel CVE team has assigned CVE-2026-90012 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit e289df82344fecc104ad8326b9ab6da612b9c899 and fixed in 6.12.110 with commit cc8354213ad6bd5fb8cc05a3fa3701188d086626 Issue introduced in 6.11 with commit e289df82344fecc104ad8326b9ab6da612b9c899 and fixed in 6.18.51 with commit a38051fa2ddedbc8ec15292c55e276880ec5b9a4 Issue introduced in 6.11 with commit e289df82344fecc104ad8326b9ab6da612b9c899 and fixed in 7.2.5 with commit 5def8b6aaad44603740786262b95b6f77df52a1c Issue introduced in 6.11 with commit e289df82344fecc104ad8326b9ab6da612b9c899 and fixed in 7.3-rc1 with commit 367cea239fc93094e5c16a72724800e0358f5c46 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-2026-90012 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/cc8354213ad6bd5fb8cc05a3fa3701188d086626 https://git.kernel.org/stable/c/a38051fa2ddedbc8ec15292c55e276880ec5b9a4 https://git.kernel.org/stable/c/5def8b6aaad44603740786262b95b6f77df52a1c https://git.kernel.org/stable/c/367cea239fc93094e5c16a72724800e0358f5c46