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 D465F37FF77 for ; Wed, 22 Apr 2026 13:56:17 +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=1776866177; cv=none; b=MGezqi37ROVR+RVNC4ZcDSCGwPsF9qNzO5/yWpKLFezRyrFybU4YcxN7DGnN7C40+08bt51o+yKd9u/mRSdZl2F1QmIiagwjJse3Iy3V1uHDvpyATWGH12CQ8f/yeeRHW7QJ3Aq6WdC379XsSiSTh+6MJAT5oiYNWxhzFA6ewD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776866177; c=relaxed/simple; bh=Ke+ian35pQnhSBj4EGY0P4lIiSquq9SXXb5+CSpGD3A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=noO4yCGcZJWUbct9UZbBvRD7aSGNZgkUorehIMgKITwuwh+xc51+jtgIK6bPRtjvlie+G65TDf763WHwjgCqMk8GlwYiynNZIpDcXTQc8MvBI6yP4ijeckQUSbW4t0/NDG1aVPMGO98lsZHLm4/g0AU/xyG3gc/GLklYmkVrI/U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=B1oLd/xk; 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="B1oLd/xk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69438C2BCAF; Wed, 22 Apr 2026 13:56:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776866177; bh=Ke+ian35pQnhSBj4EGY0P4lIiSquq9SXXb5+CSpGD3A=; h=From:To:Cc:Subject:Date:Reply-To:From; b=B1oLd/xkJxJC/HUrx8Vnf+PR5ScB1kWk2Jg5XdG68uXgnqyC3eQpEpWgbbFEeP/PM llNpx4Kc4ak2lpnFx2Du/gIUOOgikRKm+/OKzn+FpEQVE3Tl670nZLuhg5Py5KvcxT j3qZWyeNevCpbMtsJ5PNZmEtdELBDgRFBEswU61Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31485: spi: spi-fsl-lpspi: fix teardown order issue (UAF) Date: Wed, 22 Apr 2026 15:54:31 +0200 Message-ID: <2026042259-CVE-2026-31485-e15c@gregkh> X-Mailer: git-send-email 2.54.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=4201; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=uWQFql4R3S4fLbk9muwVTtBnYf5G/a4gL3APGkApc3o=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkvLn2fe1cgzujdX5dpF49dNtGVvnDy8cMUy0P1N55LW bjmOV572hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATSV7KML/044TFBo07juZs SNx4uUXiwZ3WwAqGBSvf98/SjWJuODa3aFXAr6POd9JVTwEA 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: spi-fsl-lpspi: fix teardown order issue (UAF) There is a teardown order issue in the driver. The SPI controller is registered using devm_spi_register_controller(), which delays unregistration of the SPI controller until after the fsl_lpspi_remove() function returns. As the fsl_lpspi_remove() function synchronously tears down the DMA channels, a running SPI transfer triggers the following NULL pointer dereference due to use after free: | fsl_lpspi 42550000.spi: I/O Error in DMA RX | Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [...] | Call trace: | fsl_lpspi_dma_transfer+0x260/0x340 [spi_fsl_lpspi] | fsl_lpspi_transfer_one+0x198/0x448 [spi_fsl_lpspi] | spi_transfer_one_message+0x49c/0x7c8 | __spi_pump_transfer_message+0x120/0x420 | __spi_sync+0x2c4/0x520 | spi_sync+0x34/0x60 | spidev_message+0x20c/0x378 [spidev] | spidev_ioctl+0x398/0x750 [spidev] [...] Switch from devm_spi_register_controller() to spi_register_controller() in fsl_lpspi_probe() and add the corresponding spi_unregister_controller() in fsl_lpspi_remove(). The Linux kernel CVE team has assigned CVE-2026-31485 to this issue. Affected and fixed versions =========================== Issue introduced in 4.10 with commit 5314987de5e5f5e38436ef4a69328bc472bbd63e and fixed in 5.10.253 with commit fbe6f40caeebb0b1ea9dfedc259124c1d3cda7a6 Issue introduced in 4.10 with commit 5314987de5e5f5e38436ef4a69328bc472bbd63e and fixed in 5.15.203 with commit ca4483f36ac1b62e69f8b182c5b8f059e0abecfb Issue introduced in 4.10 with commit 5314987de5e5f5e38436ef4a69328bc472bbd63e and fixed in 6.1.168 with commit e3fd54f8b0317fbccc103961ddd660f2a32dcf0b Issue introduced in 4.10 with commit 5314987de5e5f5e38436ef4a69328bc472bbd63e and fixed in 6.6.131 with commit adb25339b66112393fd6892ceff926765feb5b86 Issue introduced in 4.10 with commit 5314987de5e5f5e38436ef4a69328bc472bbd63e and fixed in 6.12.80 with commit d5d01f24bc6fbde40b4e567ef9160194b61267bc Issue introduced in 4.10 with commit 5314987de5e5f5e38436ef4a69328bc472bbd63e and fixed in 6.18.21 with commit e89e2b97253c124d37bf88e96e5e8ce5c3aeeec3 Issue introduced in 4.10 with commit 5314987de5e5f5e38436ef4a69328bc472bbd63e and fixed in 6.19.11 with commit 15650dfbaeeb14bcaaf053b93cf631db8d465300 Issue introduced in 4.10 with commit 5314987de5e5f5e38436ef4a69328bc472bbd63e and fixed in 7.0 with commit b341c1176f2e001b3adf0b47154fc31589f7410e 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-31485 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-fsl-lpspi.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/fbe6f40caeebb0b1ea9dfedc259124c1d3cda7a6 https://git.kernel.org/stable/c/ca4483f36ac1b62e69f8b182c5b8f059e0abecfb https://git.kernel.org/stable/c/e3fd54f8b0317fbccc103961ddd660f2a32dcf0b https://git.kernel.org/stable/c/adb25339b66112393fd6892ceff926765feb5b86 https://git.kernel.org/stable/c/d5d01f24bc6fbde40b4e567ef9160194b61267bc https://git.kernel.org/stable/c/e89e2b97253c124d37bf88e96e5e8ce5c3aeeec3 https://git.kernel.org/stable/c/15650dfbaeeb14bcaaf053b93cf631db8d465300 https://git.kernel.org/stable/c/b341c1176f2e001b3adf0b47154fc31589f7410e