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 virttopage() 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 virttopage() 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).

Mitigation and workarounds

The issue has been fixed by disabling mmap() operations on instances that have their ring buffer from the reservemem 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 fileoperations structure. The fix was implemented in the kernel source through a patch that adds a check for TRACEARRAYFL_BOOT flag (Kernel Git).

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-40205HIGH7.8
  • Linux KernelLinux Kernel
  • linux-gcp-5.4
NoYesNov 12, 2025
CVE-2025-40211HIGH7.1
  • Linux KernelLinux Kernel
  • linux-gcp-6.8
NoYesNov 21, 2025
CVE-2025-40206MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-zfcpdump-modules-extra
NoYesNov 12, 2025
CVE-2025-40210MEDIUM5.1
  • Linux KernelLinux Kernel
  • kernel-rt-64k-modules
NoYesNov 21, 2025
CVE-2025-40212N/AN/A
  • Linux KernelLinux Kernel
  • linux-azure-6.14
NoYesNov 24, 2025

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