CVE-2025-21804
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-21804 affects the Linux kernel's PCI subsystem, specifically in the rcar-ep driver. The vulnerability was discovered in January 2025 and publicly disclosed in February 2025. The issue exists in the rcarpcieparseoutboundranges() function where an incorrect variable is used when calling devmrequestmem_region() (Kernel Commit).

Technical details

The vulnerability stems from using a stack-based string variable (outboundname) to store a dynamically computed resource name, which is then passed as an argument to the devmrequestmemregion() macro. This implementation can lead to undefined behavior as the string may not be properly null-terminated. The issue was introduced in the commit that added endpoint mode support to the Renesas R-Car PCIe controller (Kernel Commit).

Impact

The vulnerability can manifest in various ways depending on memory contents. Common symptoms include garbage characters appearing after colons in /proc/iomem output. In severe cases, if no NULL-terminator is found in memory, the system might crash due to the string iterator overrunning and accessing unmapped memory above the stack (Ubuntu Security).

Mitigation and workarounds

A fix has been developed and merged into the Linux kernel, replacing the problematic outbound_name variable with res->name, which is the name of the previously requested resource. The patch has been backported to multiple stable kernel versions. Users are advised to update their systems to patched kernel versions (Kernel Commit).

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-40343MEDIUM6.4
  • Linux KernelLinux Kernel
  • linux-iot
NoYesDec 09, 2025
CVE-2025-40342MEDIUM6.4
  • Linux KernelLinux Kernel
  • kernel-rt-devel-matched
NoYesDec 09, 2025
CVE-2025-40340MEDIUM6.4
  • Linux KernelLinux Kernel
  • linux-hwe
NoYesDec 09, 2025
CVE-2025-40341MEDIUM5.1
  • Linux KernelLinux Kernel
  • kernel-zfcpdump-core
NoYesDec 09, 2025
CVE-2025-40344N/AN/A
  • Linux KernelLinux Kernel
  • libperf-devel
NoYesDec 09, 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