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.
Security readout for executives and security teams
Plain-English summary
A Linux Qualcomm SPI NAND driver can write beyond allocated memory during flash operations, corrupting kernel memory. Reported outcomes include write failures and kernel panics after reboot. Because successful abuse could compromise confidentiality, integrity, and availability, affected systems should be identified and updated promptly.
Executive priority
Treat as a high-priority platform issue for systems using the affected Qualcomm NAND driver. Validate exposure immediately and schedule vendor-supported updates promptly, especially where a crash, flash corruption, or local privilege compromise would disrupt critical services. Systems without the relevant driver and hardware are unlikely to be exposed.
Technical view
The qpic-snand driver initially sizes BAM transaction arrays for one codeword before the NAND geometry is known. Operations requiring additional transactions can access beyond those arrays, causing memory corruption. The resolution reallocates BAM transaction storage after the chip’s actual codeword count becomes known. CVSS 3.1 is 7.8 with local, low-privileged access required.
Likely exposure
Exposure is limited to Linux systems using the affected Qualcomm qpic-snand driver with applicable NAND hardware. The supplied record identifies affected 6.15-series and 6.16 data, but its version notation is ambiguous. Confirm exact vulnerable and fixed package versions with the system vendor or distribution.
Exploitation context
The supplied CVSS vector describes local exploitation requiring low privileges, low complexity, and no user interaction, with potential complete confidentiality, integrity, and availability impact. Testing reproduced memory corruption and kernel panics. The supplied record is not in KEV, and no evidence of active exploitation or a public exploit is provided.
Researcher notes
The demonstrated trigger involved mtd_nandbiterrs testing, but the root cause is undersized BAM transaction arrays during flash operations. The sources establish out-of-bounds access and memory corruption, not a proven privilege-escalation exploit. Exact affected release boundaries and exploitability under ordinary workloads remain insufficiently detailed in the supplied bundle.
Mitigation direction
Apply a vendor-supported kernel update containing the referenced stable fix.
Confirm distribution advisories because the supplied affected-version notation is ambiguous.
Prioritize appliances or systems using Qualcomm SPI NAND hardware.
Restrict local access and unnecessary low-privileged accounts until patched.
Validation and detection
Inventory kernel versions and determine whether the qpic-snand driver is present and used.
Verify the installed kernel contains either referenced stable correction or its vendor backport.
Review logs for qcom_snand mapping failures, raw-page write failures, or related kernel panics.
After updating, confirm normal NAND operations and successful reboot using approved operational tests.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-38398 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
3Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.