{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-37801","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-04-16T04:51:23.941Z","datePublished":"2025-05-08T06:26:01.980Z","dateUpdated":"2026-08-05T11:57:40.320Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:57:40.320Z"},"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"}],"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."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-imx.c"],"versions":[{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","lessThan":"2fea0d6d7b5d27fbf55512d51851ba0a346ede52","status":"affected","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","lessThan":"2b4479eb462ecb39001b38dfb331fc6028dedac8","status":"affected","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","lessThan":"185d376875ea6fb4256b9dc97ee0b4d2b0fdd399","status":"affected","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","lessThan":"055ef73bb1afc3f783a9a13b496770a781964a07","status":"affected","versionType":"git"},{"version":"307c897db762d1e0feee9477276b08f6deca4a5b","lessThan":"951a04ab3a2db4029debfa48d380ef834b93207e","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-imx.c"],"versions":[{"version":"5.19","status":"affected"},{"version":"0","lessThan":"5.19","status":"unaffected","versionType":"semver"},{"version":"6.1.136","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.89","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.26","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.14.5","lessThanOrEqual":"6.14.*","status":"unaffected","versionType":"semver"},{"version":"6.15","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"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"}]}]}],"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"}],"title":"spi: spi-imx: Add check for spi_imx_setupxfer()","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":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-11-03T19:55:31.277Z"}}]}}