CVE-2025-39727

Source
https://cve.org/CVERecord?id=CVE-2025-39727
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39727.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-39727
Downstream
Related
Published
2025-09-07T15:16:17.986Z
Modified
2026-03-20T12:43:01.569459Z
Summary
mm: swap: fix potential buffer overflow in setup_clusters()
Details

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

mm: swap: fix potential buffer overflow in setup_clusters()

In setupswapmap(), we only ensure badpages are in range (0, lastpage]. As maxpages might be < lastpage, setup_clusters() will encounter a buffer overflow when a badpage is >= maxpages.

Only call incclusterinfo_page() for badpage which is < maxpages to fix the issue.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39727.json",
    "cna_assigner": "Linux"
}
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
b843786b0bd01ced7fcdbf3b033d68db2f7c61b2
Fixed
91b370800b3f2b3dda244c0ab06719c4971190a5
Fixed
9b01ada580ee84fb319e7ecb5fb5b1f54a9eb799
Fixed
815c528b13f2bb9b3130c13bedeabf2351a68129
Fixed
152c1339dc13ad46f1b136e8693de15980750835

Database specific

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