Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-38398— spi: spi-qpic-snand: reallocate BAM transactions

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于BAM事务重新分配可能导致映射失败。

CVSS 7.8 · High EPSS 0.15% · P4

Possible ATT&CK Techniques 1 AI

T1068 · Exploitation for Privilege Escalation

Affected Version Matrix 6

VendorProduct Version RangeStatus
Linux Linux 7304d1909080ef0c9da703500a97f46c98393fcd< 86fb36de1132b560f9305f0c78fa69f459fa0980 affected
7304d1909080ef0c9da703500a97f46c98393fcd< d85d0380292a7e618915069c3579ae23c7c80339 affected
6.15 affected
< 6.15 unaffected
6.15.6≤ 6.15.* unaffected
6.16≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-38398

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
spi: spi-qpic-snand: reallocate BAM transactions
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于BAM事务重新分配可能导致映射失败。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 7304d1909080ef0c9da703500a97f46c98393fcd ~ 86fb36de1132b560f9305f0c78fa69f459fa0980 -
Linux Linux 6.15 -

II. Public POCs for CVE-2025-38398

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-38398

请登录查看更多情报信息。

Same Patch Batch · Linux · 2025-07-25 · 114 CVEs total

CVE-2025-38429 10.0 CRITICAL bus: mhi: ep: Update read pointer only after buffer is written
CVE-2025-38411 9.8 CRITICAL netfs: Fix double put of request
CVE-2025-38430 9.8 CRITICAL nfsd: nfsd4_spo_must_allow() must check this is a v4 compound request
CVE-2025-38439 9.8 CRITICAL bnxt_en: Set DMA unmap len correctly for XDP_REDIRECT
CVE-2025-38365 9.1 CRITICAL btrfs: fix a race between renames and directory logging
CVE-2025-38437 8.8 HIGH ksmbd: fix potential use-after-free in oplock/lease break ack
CVE-2025-38377 8.8 HIGH rose: fix dangling neighbour pointers in rose_rt_device_down()
CVE-2025-38367 8.8 HIGH LoongArch: KVM: Avoid overflow with array index
CVE-2025-38395 8.4 HIGH regulator: gpio: Fix the out-of-bounds access to drvdata::gpiods
CVE-2025-38375 8.4 HIGH virtio-net: ensure the received length does not exceed allocated size
CVE-2025-38434 7.8 HIGH Revert "riscv: Define TASK_SIZE_MAX for __access_ok()"
CVE-2025-38396 7.8 HIGH fs: export anon_inode_make_secure_inode() and fix secretmem LSM bypass
CVE-2025-38449 7.8 HIGH drm/gem: Acquire references on GEM handles for framebuffers
CVE-2025-38382 7.8 HIGH btrfs: fix iteration of extrefs during log replay
CVE-2025-38412 7.8 HIGH platform/x86: dell-wmi-sysman: Fix WMI data block retrieval in sysfs callbacks
CVE-2025-38422 7.8 HIGH net: lan743x: Modify the EEPROM and OTP size for PCI1xxxx devices
CVE-2025-38440 7.8 HIGH net/mlx5e: Fix race between DIM disable and net_dim()
CVE-2025-38408 7.8 HIGH genirq/irq_sim: Initialize work context pointers properly
CVE-2025-38401 7.8 HIGH mtk-sd: Prevent memory corruption from DMA map failure
CVE-2025-38447 7.8 HIGH mm/rmap: fix potential out-of-bounds page table access during batched unmap

Showing top 20 of 114 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2025-38398

No comments yet


Leave a comment