PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet

CVE-2025-21778: 
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-21778 affects the Linux kernel's tracing subsystem. The vulnerability was discovered in February 2025 and relates to an issue where attempting to mmap() a trace instance buffer that is attached to reserve_mem would cause a system crash. This vulnerability affects the kernel's tracing functionality, specifically when dealing with persistent ring buffers (Kernel Git).

Technical details

The vulnerability stems from an incompatibility between virt_to_page() and vmap()'d memory in the ring buffer implementation. When the code attempts to map ring buffer pages to user space using page = virt_to_page((void *)cpu_buffer->subbuf_ids[s]) followed by vm_insert_pages(vma, vma->vm_start, pages, &nr_pages), it fails because virt_to_page() does not work with vmap()'d memory used by the persistent ring buffer. This results in a page fault in kernel mode with error code 0x0000 (not-present page) (Kernel Git).

Impact

When exploited, this vulnerability causes a kernel crash (Oops) when attempting to mmap a trace instance buffer attached to reserve_mem. This can lead to system instability and potential denial of service conditions (Kernel Git).

Exploitability

The vulnerability requires local access and can be triggered by attempting to mmap() a trace instance buffer that is attached to reserve_mem. The exploit conditions are specific to the kernel's tracing functionality usage (Kernel Git).

Mitigation and workarounds

The issue has been fixed by disabling mmap() operations on instances that have their ring buffer from the reserve_mem option. When an mmap() is attempted on a persistent buffer, it now returns -ENODEV, similar to cases where the .mmap field isn't defined in the file_operations structure. The fix was implemented in the kernel source through a patch that adds a check for TRACE_ARRAY_FL_BOOT flag (Kernel Git).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

linux

Fixed

sid

linux: 6.12.16-1

Fixed

trixie

linux: 6.12.16-1

Fixed

RHEL / CentOS

Affected

RHEL 8

Not Affected

RHEL 9

Not Affected

RHEL 10

Not Affected

Source: This report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-98862MEDIUM6
  • Linux Kernel logoLinux Kernel
  • linux-iot
NoYesOct 18, 2026
CVE-2026-98859MEDIUM5.7
  • Linux Kernel logoLinux Kernel
  • kernel-64k-modules-partner
NoYesOct 18, 2026
CVE-2026-98861MEDIUM4.7
  • Linux Kernel logoLinux Kernel
  • linux-fips
NoYesOct 18, 2026
CVE-2026-98863NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-riscv
NoYesOct 18, 2026
CVE-2026-98858NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-ibm-5.15
NoYesOct 18, 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