{"id":"CVE-2025-37801","state":"PUBLISHED","title":"spi: spi-imx: Add check for spi_imx_setupxfer()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: spi-imx: Add check for spi_imx_setupxfer()\n\nAdd check for the return value of spi_imx_setupxfer().\nspi_imx->rx and spi_imx->tx function pointer can be NULL when\nspi_imx_setupxfer() return error, and make NULL pointer dereference.\n\n Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000\n Call trace:\n  0x0\n  spi_imx_pio_transfer+0x50/0xd8\n  spi_imx_transfer_one+0x18c/0x858\n  spi_transfer_one_message+0x43c/0x790\n  __spi_pump_transfer_message+0x238/0x5d4\n  __spi_sync+0x2b0/0x454\n  spi_write_then_read+0x11c/0x200","publishedAt":"2025-05-08T06:26:01.980Z","updatedAt":"2026-10-15T21:52:00.334Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","status":"affected","lessThan":"2fea0d6d7b5d27fbf55512d51851ba0a346ede52","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","status":"affected","lessThan":"2b4479eb462ecb39001b38dfb331fc6028dedac8","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","status":"affected","lessThan":"185d376875ea6fb4256b9dc97ee0b4d2b0fdd399","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","status":"affected","lessThan":"055ef73bb1afc3f783a9a13b496770a781964a07","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","status":"affected","lessThan":"951a04ab3a2db4029debfa48d380ef834b93207e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-imx.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"6.1.136","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.89","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.26","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.5","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-imx.c"]}],"references":["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","https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:03.054Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/37xxx/CVE-2025-37801.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-37801","state":"PUBLISHED","datePublished":"2025-05-08T06:26:01.980Z","dateUpdated":"2026-10-15T21:52:00.334Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.941Z"},"containers":{"cna":{"title":"spi: spi-imx: Add check for spi_imx_setupxfer()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: spi-imx: Add check for spi_imx_setupxfer()\n\nAdd check for the return value of spi_imx_setupxfer().\nspi_imx->rx and spi_imx->tx function pointer can be NULL when\nspi_imx_setupxfer() return error, and make NULL pointer dereference.\n\n Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000\n Call trace:\n  0x0\n  spi_imx_pio_transfer+0x50/0xd8\n  spi_imx_transfer_one+0x18c/0x858\n  spi_transfer_one_message+0x43c/0x790\n  __spi_pump_transfer_message+0x238/0x5d4\n  __spi_sync+0x2b0/0x454\n  spi_write_then_read+0x11c/0x200"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","status":"affected","lessThan":"2fea0d6d7b5d27fbf55512d51851ba0a346ede52","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","status":"affected","lessThan":"2b4479eb462ecb39001b38dfb331fc6028dedac8","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","status":"affected","lessThan":"185d376875ea6fb4256b9dc97ee0b4d2b0fdd399","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","status":"affected","lessThan":"055ef73bb1afc3f783a9a13b496770a781964a07","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","status":"affected","lessThan":"951a04ab3a2db4029debfa48d380ef834b93207e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-imx.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"6.1.136","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.89","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.26","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.5","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-imx.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/2fea0d6d7b5d27fbf55512d51851ba0a346ede52"},{"url":"https://git.kernel.org/stable/c/2b4479eb462ecb39001b38dfb331fc6028dedac8"},{"url":"https://git.kernel.org/stable/c/185d376875ea6fb4256b9dc97ee0b4d2b0fdd399"},{"url":"https://git.kernel.org/stable/c/055ef73bb1afc3f783a9a13b496770a781964a07"},{"url":"https://git.kernel.org/stable/c/951a04ab3a2db4029debfa48d380ef834b93207e"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path is reached from a local process issuing write()/read()/SPI_IOC_MESSAGE on /dev/spidevB.C, or from an in-kernel SPI protocol driver via spi_write_then_read(); there is no network or remote-peer input involved.\nAC:L - On an affected board (an i.MX SPI slave node lacking spi-max-frequency, which spi-imx never compensates for since it sets no controller->max_speed_hz) every transfer without an explicit speed deterministically takes the unchecked error path — no race, no memory-layout luck, and the attacker fully controls transfer speed_hz, bits_per_word, len and word_delay through a single ioctl.\nPR:L - An ordinary unprivileged local user with access to the spidev character device (routinely granted via an \"spi\" group on embedded/industrial i.MX deployments) can submit the crafted spi_ioc_transfer array; no CAP_SYS_ADMIN or root is needed.\nUI:N - The attacker performs the ioctl/write themselves; no action by another user or administrator is required.\nS:U - The corruption and crash are confined to the kernel of the same system; no VM, IOMMU, or other security-authority boundary is crossed.\nC:H - The stale spi_imx->tx/bits_per_word state left by the unchecked error causes spi_imx->count to underflow, so spi_imx_buf_tx_u32() reads far past the transfer's TX buffer and shifts adjacent kernel heap memory out onto the SPI bus, where an attacker-controlled or observable peripheral can read it.\nI:H - The same count underflow makes spi_imx_buf_rx_u32() write 4 bytes per FIFO word past the end of the RX buffer, repeatedly from spi_imx_isr(), giving an unbounded heap out-of-bounds write with data sourced from the SPI RX FIFO.\nA:H - In the common case spi_imx->tx is NULL and spi_imx_push() jumps to address 0, producing a kernel NULL pointer dereference oops/panic exactly as shown in the fix's backtrace; the OOB-write variant likewise corrupts the heap and crashes the system."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:57:40.320Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.1.136"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.6.89"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.12.26"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.14.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T19:55:31.277Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-37801","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:45:18.978744Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:52:00.334Z"}}]}}}