CVE-2025-38384
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-07-25

Last updated on: 2025-12-16

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: mtd: spinand: fix memory leak of ECC engine conf Memory allocated for the ECC engine conf is not released during spinand cleanup. Below kmemleak trace is seen for this memory leak: unreferenced object 0xffffff80064f00e0 (size 8): comm "swapper/0", pid 1, jiffies 4294937458 hex dump (first 8 bytes): 00 00 00 00 00 00 00 00 ........ backtrace (crc 0): kmemleak_alloc+0x30/0x40 __kmalloc_cache_noprof+0x208/0x3c0 spinand_ondie_ecc_init_ctx+0x114/0x200 nand_ecc_init_ctx+0x70/0xa8 nanddev_ecc_engine_init+0xec/0x27c spinand_probe+0xa2c/0x1620 spi_mem_probe+0x130/0x21c spi_probe+0xf0/0x170 really_probe+0x17c/0x6e8 __driver_probe_device+0x17c/0x21c driver_probe_device+0x58/0x180 __device_attach_driver+0x15c/0x1f8 bus_for_each_drv+0xec/0x150 __device_attach+0x188/0x24c device_initial_probe+0x10/0x20 bus_probe_device+0x11c/0x160 Fix the leak by calling nanddev_ecc_engine_cleanup() inside spinand_cleanup().
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-07-25
Last Modified
2025-12-16
Generated
2026-05-07
AI Q&A
2025-07-25
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 8 associated CPEs
Vendor Product Version / Range
linux linux_kernel to 5.15.187 (exc)
linux linux_kernel From 5.16 (inc) to 6.1.144 (exc)
linux linux_kernel From 6.2 (inc) to 6.6.97 (exc)
linux linux_kernel From 6.7 (inc) to 6.12.37 (exc)
linux linux_kernel From 6.13 (inc) to 6.15.6 (exc)
linux linux_kernel 6.16
linux linux_kernel 6.16
debian debian_linux 11.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-401 The product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a memory leak in the Linux kernel's spinand driver related to the ECC (Error Correcting Code) engine configuration. Specifically, memory allocated for the ECC engine configuration is not properly released during the cleanup process of the spinand driver, leading to unreferenced memory that is not freed. The issue is fixed by ensuring that the cleanup function for the ECC engine is called during spinand cleanup.


How can this vulnerability impact me? :

The memory leak can cause increased memory usage over time, potentially leading to reduced system performance or stability issues if the leaked memory accumulates. This could affect systems running the vulnerable Linux kernel with the spinand driver, especially in environments where the driver is frequently initialized and cleaned up.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by checking for memory leaks related to the ECC engine configuration in the spinand driver. Using the Linux kernel's kmemleak tool can help identify such leaks. You can enable kmemleak and then check for unreferenced objects with commands like: 1. Enable kmemleak (if not already enabled): echo scan > /sys/kernel/debug/kmemleak 2. Scan for memory leaks: echo scan > /sys/kernel/debug/kmemleak 3. Show detected leaks: cat /sys/kernel/debug/kmemleak Look for entries related to spinand or ECC engine conf memory allocations as shown in the example backtrace in the CVE description.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, update the Linux kernel to a version where the fix is applied. The fix involves calling nanddev_ecc_engine_cleanup() inside spinand_cleanup() to properly release allocated memory and prevent the leak. Until the update is applied, monitoring for memory leaks using kmemleak and rebooting the system periodically to clear leaked memory may help reduce impact.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart