Bug 2586504 (CVE-2026-138895)

Summary: CVE-2026-138895 kernel: kernel: Denial of service via improper reference counting in hugetlb error path
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:
A flaw was found in the Linux kernel's HugeTLB (Huge Translation Lookaside Buffer) subsystem. A local user could cause a denial of service (DoS) or memory corruption by triggering an out-of-memory condition during memory control group charging. When allocation charging fails, the error-handling path frees the memory page without decrementing its reference count, returning an active page to the freelist. This state can corrupt internal memory allocator structures and cause the system to crash.
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 2026-11-30 13:53:32 UTC
In the Linux kernel, the following vulnerability has been resolved:

mm: hugetlb: drop refcount before freeing on memcg charge failure

When mem_cgroup_charge_hugetlb(folio, gfp) returns -ENOMEM, the folio has
its refcount set to 1 via folio_ref_unfreeze(folio, 1).

The error path calls free_huge_folio(folio) directly, which expects a
refcount of 0.  Hence, VM_BUG_ON_FOLIO(folio_ref_count(folio), folio) is
triggered.

Even with CONFIG_DEBUG_VM disabled, returning a folio with refcount 1 to
the freelist can corrupt allocator state later.

Use folio_put(folio) instead of free_huge_folio(folio) to properly drop
the reference before freeing it.