CVE-2025-38398: Linux kernel · spi: spi-qpic-snand: reallocate BAM transactions
Source GCVE Database
Not known to be exploited · CVSS 5.5 Medium.
Data as of 13 Nov 2026, 20:33 UTC
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 25 Jul 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 13 Nov 2026.
What to do
AI-suggested
A fix is available that changes the driver to free the initially allocated BAM transactions memory and allocate a new buffer once the actual number of codewords is known. Users should apply the official Linux kernel update containing this fix when it becomes available. No other mitigation or workaround is indicated.
Description
CVE-2025-38398 is a vulnerability in the Linux kernel's spi-qpic-snand driver related to improper memory allocation for BAM transactions. The driver initially allocates memory for only one 'codeword' during probe, but the actual number of codewords depends on the NAND chip's page size and is unknown at that time. This leads to out-of-bounds memory access when the number of required transactions exceeds the allocated size, causing memory corruption. Symptoms include swiotlb mapping failures, kernel panics due to NULL pointer dereference, and spinlock corruption on reboot. The issue is resolved by freeing the initially allocated memory and reallocating it once the actual number of codewords is known.