CVE-2025-40064
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-40064 is a use-after-free vulnerability discovered in the Linux kernel's SMC (Shared Memory Communication) subsystem, specifically in the _pnetfindbasendev() function. The vulnerability was disclosed on October 28, 2025. This security flaw affects the network device handling during connection establishment in the SMC protocol implementation (NVD).

Technical details

The vulnerability occurs when smcpnetfindismresource() fetches skdstget(sk)->dev and passes it to pnetfindbasendev(), where RTNL (Route Netlink) lock is held. A use-after-free condition occurs at _pnetfindbasendev() when the device is first used, indicating that the device had already been freed before acquiring RTNL in pnetfindbasendev(). While the device is being removed, dst->dev could be swapped with blackhole_netdev, and the device's reference count by dst will be released. Red Hat has assigned this vulnerability a CVSS v3.1 score of 7.0, indicating high severity (Red Hat).

Impact

The vulnerability could potentially lead to system crashes, memory corruption, or possible privilege escalation in affected Linux kernel versions. The issue affects multiple Red Hat Enterprise Linux versions including RHEL 8, RHEL 9, and RHEL 10, as well as their real-time kernel variants (Red Hat).

Mitigation and workarounds

The fix involves modifying the code to hold the device's reference count before calling smcpnetfindismresource(). Additionally, smcpnetfindroceresource() had the same issue and was also addressed. The solution implements the use of _skdstget() and dstdev_rcu() in both functions (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-40085N/AN/A
  • Linux KernelLinux Kernel
  • kernel-abi-whitelists
NoNoOct 29, 2025
CVE-2025-40083N/AN/A
  • Linux KernelLinux Kernel
  • kernel-modules-internal
NoYesOct 29, 2025
CVE-2023-7324N/AN/A
  • Linux KernelLinux Kernel
  • kernel-debug-modules-internal
NoYesOct 29, 2025
CVE-2025-40082N/AN/A
  • Linux KernelLinux Kernel
  • linux-fips
NoNoOct 28, 2025
CVE-2025-40081N/AN/A
  • Linux KernelLinux Kernel
  • kernel-selftests-internal
NoNoOct 28, 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