CVE-2025-21881
Linux Kernel vulnerability analysis and mitigation

Overview

In the Linux kernel, a vulnerability (CVE-2025-21881) was discovered in the uprobes subsystem, specifically in the uprobe_write_opcode() function. The vulnerability was disclosed on March 27, 2025. The issue affects the Linux kernel's memory management system, particularly involving zero page handling (NVD).

Technical details

The vulnerability stems from incorrect handling of zero pages in the uprobe_write_opcode() function. When a zero pfn is set to the PTE without increasing the RSS count in mfill_atomic_pte_zeropage(), the refcount of zero folio does not increase accordingly. Subsequently, when uprobe_write_opcode()->__replace_page() performs operations on the same pfn, it unconditionally decreases the RSS count and old_folio's refcount (NVD).

Impact

The vulnerability results in two critical issues: 1) The RSS count becomes incorrect, leading to a 'Bad rss-count' error when the process exits, and 2) The reserved folio (zero folio) is freed when folio->refcount reaches zero, causing free_pages_prepare->free_page_is_bad() to report a 'Bad page state' error. Additionally, there is potential for a VM_WARN_ON_FOLIO warning in the folio_remove_rmap_pte() function (NVD).

Mitigation and workarounds

The vulnerability has been resolved by implementing a fix that rejects zero old folio immediately after get_user_page_vma_remote(). This solution was chosen considering that uprobe hit on the zero folio is a very rare case (NVD).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-71142N/AN/A
  • Linux KernelLinux Kernel
  • kernel-64k-debug-devel-matched
NoNoJan 14, 2026
CVE-2025-71137N/AN/A
  • Linux KernelLinux Kernel
  • linux-gcp
NoYesJan 14, 2026
CVE-2025-71135N/AN/A
  • Linux KernelLinux Kernel
  • kernel-debug-core
NoNoJan 14, 2026
CVE-2025-71134N/AN/A
  • Linux KernelLinux Kernel
  • kernel-uki-virt
NoNoJan 14, 2026
CVE-2025-71133N/AN/A
  • Linux KernelLinux Kernel
  • kernel-modules-extra
NoYesJan 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management