CVE-2025-39727

EUVD-2025-31502
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.
Classic Buffer Overflow
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTPrimary
7.8 HIGH
LOCAL
LOW
LOW
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Base Score
CVSS 3.x
EPSS Score
Percentile: 5%
Affected Products (NVD)
VendorProductVersion
linuxlinux_kernel
6.12 ≤
𝑥
< 6.12.42
linuxlinux_kernel
6.13 ≤
𝑥
< 6.15.10
linuxlinux_kernel
6.16 ≤
𝑥
< 6.16.1
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
linux
bookworm
6.1.170-3
fixed
bookworm (security)
6.1.176-1
fixed
bullseye
5.10.223-1
fixed
bullseye (security)
5.10.259-1
fixed
forky
7.0.13-1
fixed
sid
7.1.3-1
fixed
trixie
6.12.86-1
fixed
trixie (security)
6.12.95-1
fixed
Amazon Linux logo
Amazon Linux Releases
Amazon Package
Release
bpftool6.12
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
bpftool6.12-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel-livepatch-6.12.46-66.121
Amazon Linux 2023
1:1.0-0.amzn2023
fixed
kernel6.12
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-debuginfo-common-aarch64
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-debuginfo-common-x86_64
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-devel
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-headers
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-libbpf
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-libbpf-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-libbpf-devel
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-libbpf-static
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-modules-extra
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-modules-extra-common
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-tools
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-tools-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
kernel6.12-tools-devel
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
perf6.12
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
perf6.12-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
python3-perf6.12
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed
python3-perf6.12-debuginfo
Amazon Linux 2023
1:6.12.46-66.121.amzn2023
fixed