CVE-2025-40018
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-10-24

Last updated on: 2025-10-29

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: ipvs: Defer ip_vs_ftp unregister during netns cleanup On the netns cleanup path, __ip_vs_ftp_exit() may unregister ip_vs_ftp before connections with valid cp->app pointers are flushed, leading to a use-after-free. Fix this by introducing a global `exiting_module` flag, set to true in ip_vs_ftp_exit() before unregistering the pernet subsystem. In __ip_vs_ftp_exit(), skip ip_vs_ftp unregister if called during netns cleanup (when exiting_module is false) and defer it to __ip_vs_cleanup_batch(), which unregisters all apps after all connections are flushed. If called during module exit, unregister ip_vs_ftp immediately.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-10-24
Last Modified
2025-10-29
Generated
2026-06-16
AI Q&A
2025-10-24
EPSS Evaluated
2026-06-15
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability occurs in the Linux kernel's ipvs FTP module during network namespace (netns) cleanup. The function __ip_vs_ftp_exit() may unregister the ip_vs_ftp module before all connections with valid application pointers are properly flushed, leading to a use-after-free condition. This means that the system might attempt to access memory that has already been freed, which can cause instability or security issues. The fix involves deferring the unregistering of ip_vs_ftp until after all connections are flushed, using a global flag to control the timing of the unregister operation.

Impact Analysis

This vulnerability can lead to use-after-free conditions in the Linux kernel, which may cause system crashes, instability, or potentially allow an attacker to execute arbitrary code or escalate privileges if exploited. This can compromise the security and reliability of systems running vulnerable versions of the Linux kernel.

Mitigation Strategies

To mitigate this vulnerability, update the Linux kernel to a version that includes the fix for CVE-2025-40018. The fix involves deferring the ip_vs_ftp unregister during netns cleanup to prevent use-after-free errors. Applying the official patch or upgrading to a patched kernel version is recommended.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2025-40018. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart