CVE-2025-39727 Details
Description
In the Linux kernel, the following vulnerability has been resolved: mm: swap: fix potential buffer overflow in setup_clusters() In setup_swap_map(), we only ensure badpages are in range (0, last_page]. As maxpages might be < last_page, setup_clusters() will encounter a buffer overflow when a badpage is >= maxpages. Only call inc_cluster_info_page() for badpage which is < maxpages to fix the issue.
A potential buffer overflow vulnerability has been identified in the Linux kernel's swap management system. This issue arises in the 'setup_clusters()' function within 'setup_swap_map()', where the handling of 'badpages' can lead to a buffer overflow. The vulnerability occurs because the 'badpages' are only validated to be within a certain range, and if 'maxpages' is less than the last page, a 'badpage' equal to or greater than 'maxpages' can cause the overflow. The vulnerability affects the Linux kernel stable tree.
Users can upgrade to the latest version of the Linux kernel stable tree, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/152c1339dc13ad46f1b136e8693de15980750835 | kernel.org | Patch |
| https://git.kernel.org/stable/c/815c528b13f2bb9b3130c13bedeabf2351a68129 | kernel.org | Patch |
| https://git.kernel.org/stable/c/91b370800b3f2b3dda244c0ab06719c4971190a5 | kernel.org | Patch |
| https://git.kernel.org/stable/c/9b01ada580ee84fb319e7ecb5fb5b1f54a9eb799 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-120 | Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.12, < 6.12.42 >= 6.13, < 6.15.10 >= 6.16, < 6.16.1 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 19, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Nov 25, 2025 | Initial Analysis | [email protected] |
| Sep 7, 2025 | New CVE Received | kernel.org |