Bug 2393733 (CVE-2025-39727)

Summary: CVE-2025-39727 kernel: mm: swap: fix potential buffer overflow in setup_clusters()
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2025-09-07 16:01:19 UTC
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.

Comment 1 Mauro Matteo Cascella 2025-09-09 08:03:18 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025090728-CVE-2025-39727-b07c@gregkh/

Comment 2 errata-xmlrpc 2025-10-27 18:31:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2025:19106 https://access.redhat.com/errata/RHSA-2025:19106

Comment 3 errata-xmlrpc 2025-11-12 12:22:11 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2025:21118 https://access.redhat.com/errata/RHSA-2025:21118