CVE-2025-39737

Source
https://cve.org/CVERecord?id=CVE-2025-39737
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39737.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-39737
Downstream
Published
2025-09-11T16:52:12.519Z
Modified
2026-03-20T12:43:01.909963Z
Summary
mm/kmemleak: avoid soft lockup in __kmemleak_do_cleanup()
Details

In the Linux kernel, the following vulnerability has been resolved:

mm/kmemleak: avoid soft lockup in __kmemleakdocleanup()

A soft lockup warning was observed on a relative small system x86-64 system with 16 GB of memory when running a debug kernel with kmemleak enabled.

watchdog: BUG: soft lockup - CPU#8 stuck for 33s! [kworker/8:1:134]

The test system was running a workload with hot unplug happening in parallel. Then kemleak decided to disable itself due to its inability to allocate more kmemleak objects. The debug kernel has its CONFIGDEBUGKMEMLEAKMEMPOOL_SIZE set to 40,000.

The soft lockup happened in kmemleakdocleanup() when the existing kmemleak objects were being removed and deleted one-by-one in a loop via a workqueue. In this particular case, there are at least 40,000 objects that need to be processed and given the slowness of a debug kernel and the fact that a raw_spinlock has to be acquired and released in _deleteobject(), it could take a while to properly handle all these objects.

As kmemleak has been disabled in this case, the object removal and deletion process can be further optimized as locking isn't really needed. However, it is probably not worth the effort to optimize for such an edge case that should rarely happen. So the simple solution is to call cond_resched() at periodic interval in the iteration loop to avoid soft lockup.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39737.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
2abd839aa7e615f2bbc50c8ba7deb9e40d186768
Fixed
9f1f4e95031f84867c5821540466d62f88dab8ca
Fixed
1ef72a7fedc5bca70e8cc980985790de10d407aa
Fixed
a04de4c40aab9b338dfa989cf4aec70fd187eeb2
Fixed
f014c10d190b92aad366e56b445daffcd1c075e4
Fixed
e21a3ddd58733ce31afcb1e5dc3cb80a4b5bc29b
Fixed
8d2d22a55ffe35c38e69795468a7addd1a80e9ce
Fixed
926092268efdf1ed7b55cf486356c74a9e7710d1
Fixed
9b80430c194e4a114dc663c1025d56b4f3d0153d
Fixed
d1534ae23c2b6be350c8ab060803fbf6e9682adc

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39737.json"