Skip to main content
VulnerabilityPublished Updated

CVE-2025-38398: Linux kernel · spi: spi-qpic-snand: reallocate BAM transactions

Affects Linux kernelSource GCVE Database

0

Not known to be exploited · CVSS 7.8 High.

Data as of 26 Oct 2026, 10:12 UTC

CVSS 3.1 base score
7.8High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.1% chance of exploitation in 30 days – higher than 4% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 25 Jul 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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 26 Oct 2026.

What to do

Affected software

ProductAffectedFixed in
Ubuntu 24.04 LTSlinux-azure-6.11pkg:deb/ubuntu/linux-azure-6.11?arch=source&distro=nobleOther threatsAffected
  • 6.11.0-1008.8~24.04.1 – 6.11.0-1018.18~24.04.1
7 affected builds
Fixed in–
Ubuntu 24.04 LTSlinux-gcp-6.11pkg:deb/ubuntu/linux-gcp-6.11?arch=source&distro=nobleOther threatsAffected
  • 6.11.0-1006.6~24.04.2 – 6.11.0-1017.17~24.04.1
7 affected builds
Fixed in–
Ubuntu 24.04 LTSlinux-hwe-6.11pkg:deb/ubuntu/linux-hwe-6.11?arch=source&distro=nobleOther threatsAffected
  • 6.11.0-17.17~24.04.2 – 6.11.0-29.29~24.04.1
8 affected builds
Fixed in–
Ubuntu 24.04 LTSlinux-lowlatency-hwe-6.11pkg:deb/ubuntu/linux-lowlatency-hwe-6.11?arch=source&distro=nobleOther threatsAffected
  • 6.11.0-1009.10~24.04.1 – 6.11.0-1016.17~24.04.1
7 affected builds
Fixed in–
Ubuntu 24.04 LTSlinux-raspi-realtimepkg:deb/ubuntu/linux-raspi-realtime?arch=source&distro=nobleOther threatsAffected
  • =6.8.0-2019.20
Fixed in–
Ubuntu 24.04 LTSlinux-realtimepkg:deb/ubuntu/linux-realtime?arch=source&distro=nobleOther threatsAffected
  • =6.8.1-1015.16
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

In the Linux kernel, the following vulnerability has been resolved: spi: spi-qpic-snand: reallocate BAM transactions Using the mtd_nandbiterrs module for testing the driver occasionally results in weird things like below. 1. swiotlb mapping fails with the following message: [ 85.926216] qcom_snand 79b0000.spi: swiotlb buffer is full (sz: 4294967294 bytes), total 512 (slots), used 0 (slots) [ 85.932937] qcom_snand 79b0000.spi: failure in mapping desc [ 87.999314] qcom_snand 79b0000.spi: failure to write raw page [ 87.999352] mtd_nandbiterrs: error: write_oob failed (-110) Rebooting the board after this causes a panic due to a NULL pointer dereference. 2. If the swiotlb mapping does not fail, rebooting the board may result in a different panic due to a bad spinlock magic: [ 256.104459] BUG: spinlock bad magic on CPU#3, procd/2241 [ 256.104488] Unable to handle kernel paging request at virtual address ffffffff0000049b ... Investigating the issue revealed that these symptoms are results of memory corruption which is caused by out of bounds access within the driver. The driver uses a dynamically allocated structure for BAM transactions, which structure must have enough space for all possible variations of different flash operations initiated by the driver. The required space heavily depends on the actual number of 'codewords' which is calculated from the pagesize of the actual NAND chip. Although the qcom_nandc_alloc() function allocates memory for the BAM transactions during probe, but since the actual number of 'codewords' is not yet know the allocation is done for one 'codeword' only. Because of this, whenever the driver does a flash operation, and the number of the required transactions exceeds the size of the allocated arrays the driver accesses memory out of the allocated range. To avoid this, change the code to free the initially allocated BAM transactions memory, and allocate a new one once the actual number of 'codewords' required for a given NAND chip is known.

References

Community reviews

Loading reviews…