CVE-2025-39727

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

HIGH
7.8
CVSS Score
Published: September 7, 2025 at 03:16 PM UTC
Updated: October 19, 2026 at 09:10 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.2%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

All versions6.12 ≤ v < 6.12.426.13 ≤ v < 6.15.106.16 ≤ v < 6.16.16.12b843786b0bd01ced7fcdbf3b033d68db2f7c61b2
Vendor states this is fixed in 152c1339dc13ad46f1b136e8693de15980750835 (fixed)
Vendor states this is fixed in 815c528b13f2bb9b3130c13bedeabf2351a68129 (fixed)
Vendor states this is fixed in 91b370800b3f2b3dda244c0ab06719c4971190a5 (fixed)
Vendor states this is fixed in 9b01ada580ee84fb319e7ecb5fb5b1f54a9eb799 (fixed)
Vendor states this is fixed in 6.12 (unaffected)
Vendor states this is fixed in 6.12.42 (unaffected)
Vendor states this is fixed in 6.15.10 (unaffected)
Vendor states this is fixed in 6.16.1 (unaffected)
Vendor states this is fixed in 6.17 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/152c1339dc13ad46f1b136e8693de15980750835
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/815c528b13f2bb9b3130c13bedeabf2351a68129
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/91b370800b3f2b3dda244c0ab06719c4971190a5
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9b01ada580ee84fb319e7ecb5fb5b1f54a9eb799

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-120

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card