CVE-2025-39725 Affecting kernel6.12-libbpf-static package, versions <1:6.12.46-66.121.amzn2023


Severity

Recommended
0.0
high
0
10

Based on Amazon Linux security rating.

Threat Intelligence

EPSS
0.02% (5th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-AMZN2023-KERNEL612LIBBPFSTATIC-13167021
  • published1 Oct 2025
  • disclosed5 Sept 2025

Introduced: 5 Sep 2025

CVE-2025-39725  (opens in a new tab)

How to fix?

Upgrade Amazon-Linux:2023 kernel6.12-libbpf-static to version 1:6.12.46-66.121.amzn2023 or higher.
This issue was patched in ALAS2023-2025-1208.

NVD Description

Note: Versions mentioned in the description apply only to the upstream kernel6.12-libbpf-static package and not the kernel6.12-libbpf-static package as distributed by Amazon-Linux. See How to fix? for Amazon-Linux:2023 relevant fixed versions and status.

In the Linux kernel, the following vulnerability has been resolved:

mm/vmscan: fix hwpoisoned large folio handling in shrink_folio_list

In shrink_folio_list(), the hwpoisoned folio may be large folio, which can't be handled by unmap_poisoned_folio(). For THP, try_to_unmap_one() must be passed with TTU_SPLIT_HUGE_PMD to split huge PMD first and then retry. Without TTU_SPLIT_HUGE_PMD, we will trigger null-ptr deref of pvmw.pte. Even we passed TTU_SPLIT_HUGE_PMD, we will trigger a WARN_ON_ONCE due to the page isn't in swapcache.

Since UCE is rare in real world, and race with reclaimation is more rare, just skipping the hwpoisoned large folio is enough. memory_failure() will handle it if the UCE is triggered again.

This happens when memory reclaim for large folio races with memory_failure(), and will lead to kernel panic. The race is as follows:

cpu0 cpu1 shrink_folio_list memory_failure TestSetPageHWPoison unmap_poisoned_folio --> trigger BUG_ON due to unmap_poisoned_folio couldn't handle large folio

[tujinjiang@huawei.com: add comment to unmap_poisoned_folio()]

CVSS Base Scores

version 3.1