Skip to contentSkip to conversation

CVE-2025-37801: spi: spi-imx: Add check for spi_imx_setupxfer()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 8, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

spi: spi-imx: Add check for spi_imx_setupxfer()

Add check for the return value of spi_imx_setupxfer(). spi_imx->rx and spi_imx->tx function pointer can be NULL when spi_imx_setupxfer() return error, and make NULL pointer dereference.

 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
 Call trace:
  0x0
  spi_imx_pio_transfer+0x50/0xd8
  spi_imx_transfer_one+0x18c/0x858
  spi_transfer_one_message+0x43c/0x790
  __spi_pump_transfer_message+0x238/0x5d4
  __spi_sync+0x2b0/0x454
  spi_write_then_read+0x11c/0x200

The Linux kernel CVE team has assigned CVE-2025-37801 to this issue.

Affected and fixed versions
===========================

	Fixed in 6.1.136 with commit 2fea0d6d7b5d27fbf55512d51851ba0a346ede52
	Fixed in 6.6.89 with commit 2b4479eb462ecb39001b38dfb331fc6028dedac8
	Fixed in 6.12.26 with commit 185d376875ea6fb4256b9dc97ee0b4d2b0fdd399
	Fixed in 6.14.5 with commit 055ef73bb1afc3f783a9a13b496770a781964a07
	Fixed in 6.15-rc3 with commit 951a04ab3a2db4029debfa48d380ef834b93207e

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-2025-37801

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-imx.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/2fea0d6d7b5d27fbf55512d51851ba0a346ede52
	https://git.kernel.org/stable/c/2b4479eb462ecb39001b38dfb331fc6028dedac8
	https://git.kernel.org/stable/c/185d376875ea6fb4256b9dc97ee0b4d2b0fdd399
	https://git.kernel.org/stable/c/055ef73bb1afc3f783a9a13b496770a781964a07
	https://git.kernel.org/stable/c/951a04ab3a2db4029debfa48d380ef834b93207e