CVE-2025-40018
ipvs: Defer ip_vs_ftp unregister during netns cleanup
Mitigation
- Upgrade Linux to 134121bfd99a06d44ef5ba15a9beb075297c0821 or later.
Who should check
- Anyone running Linux >= 61b1ab4583e275af216c8454b9256de680499b19, < 8a6ecab3847c213ce2855b0378e63ce839085de3; >= 61b1ab4583e275af216c8454b9256de680499b19, < 421b1ae1574dfdda68b835c15ac4921ec0030182; >= 61b1ab4583e275af216c8454b9256de680499b19, < 1d79471414d7b9424d699afff2aa79fff322f52d; >= 61b1ab4583e275af216c8454b9256de680499b19, < 53717f8a4347b78eac6488072ad8e5adbaff38d9; >= 61b1ab4583e275af216c8454b9256de680499b19, < 8cbe2a21d85727b66d7c591fd5d83df0d8c4f757; >= 61b1ab4583e275af216c8454b9256de680499b19, < dc1a481359a72ee7e548f1f5da671282a7c13b8f; >= 61b1ab4583e275af216c8454b9256de680499b19, < a343811ef138a265407167294275201621e9ebb2; >= 61b1ab4583e275af216c8454b9256de680499b19, < 134121bfd99a06d44ef5ba15a9beb075297c0821
- Anyone running Linux 2.6.39
Vulnerability facts
- Affected
- Linux >= 61b1ab4583e275af216c8454b9256de680499b19, < 8a6ecab3847c213ce2855b0378e63ce839085de3; >= 61b1ab4583e275af216c8454b9256de680499b19, < 421b1ae1574dfdda68b835c15ac4921ec0030182; >= 61b1ab4583e275af216c8454b9256de680499b19, < 1d79471414d7b9424d699afff2aa79fff322f52d; >= 61b1ab4583e275af216c8454b9256de680499b19, < 53717f8a4347b78eac6488072ad8e5adbaff38d9; >= 61b1ab4583e275af216c8454b9256de680499b19, < 8cbe2a21d85727b66d7c591fd5d83df0d8c4f757; >= 61b1ab4583e275af216c8454b9256de680499b19, < dc1a481359a72ee7e548f1f5da671282a7c13b8f; >= 61b1ab4583e275af216c8454b9256de680499b19, < a343811ef138a265407167294275201621e9ebb2; >= 61b1ab4583e275af216c8454b9256de680499b19, < 134121bfd99a06d44ef5ba15a9beb075297c0821; Linux 2.6.39
- Fixed in
- Linux 8a6ecab3847c213ce2855b0378e63ce839085de3, Linux 421b1ae1574dfdda68b835c15ac4921ec0030182, Linux 1d79471414d7b9424d699afff2aa79fff322f52d, Linux 53717f8a4347b78eac6488072ad8e5adbaff38d9, Linux 8cbe2a21d85727b66d7c591fd5d83df0d8c4f757, Linux 134121bfd99a06d44ef5ba15a9beb075297c0821
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.23% chance of exploitation in 30 days (percentile 8, 2026-11-26)
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 61b1ab4583e275af216c8454b9256de680499b19, < 8a6ecab3847c213ce2855b0378e63ce839085de3; >= 61b1ab4583e275af216c8454b9256de680499b19, < 421b1ae1574dfdda68b835c15ac4921ec0030182; >= 61b1ab4583e275af216c8454b9256de680499b19, < 1d79471414d7b9424d699afff2aa79fff322f52d; >= 61b1ab4583e275af216c8454b9256de680499b19, < 53717f8a4347b78eac6488072ad8e5adbaff38d9; >= 61b1ab4583e275af216c8454b9256de680499b19, < 8cbe2a21d85727b66d7c591fd5d83df0d8c4f757; >= 61b1ab4583e275af216c8454b9256de680499b19, < dc1a481359a72ee7e548f1f5da671282a7c13b8f; >= 61b1ab4583e275af216c8454b9256de680499b19, < a343811ef138a265407167294275201621e9ebb2; >= 61b1ab4583e275af216c8454b9256de680499b19, < 134121bfd99a06d44ef5ba15a9beb075297c0821 | — | cvelist |
| Linux | 2.6.39 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-40018. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-40018.md Affected: Linux >= 61b1ab4583e275af216c8454b9256de680499b19, < 8a6ecab3847c213ce2855b0378e63ce839085de3; >= 61b1ab4583e275af216c8454b9256de680499b19, < 421b1ae1574dfdda68b835c15ac4921ec0030182; >= 61b1ab4583e275af216c8454b9256de680499b19, < 1d79471414d7b9424d699afff2aa79fff322f52d; >= 61b1ab4583e275af216c845… Fixed in: Linux 8a6ecab3847c213ce2855b0378e63ce839085de3, Linux 421b1ae1574dfdda68b835c15ac4921ec0030182, Linux 1d79471414d7b9424d699afff2aa79fff322f52d, Linux 53717f8a4347b78eac6488072ad8e5adbaff38d9, Linux 8cbe2a21d85727b66d7c591fd5d83df0d8c4f757, Linux 134121bfd99a06d44ef5ba15a9beb075297c0821 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Other
- https://git.kernel.org/stable/c/8a6ecab3847c213ce2855b0378e63ce839085de3
- https://git.kernel.org/stable/c/421b1ae1574dfdda68b835c15ac4921ec0030182
- https://git.kernel.org/stable/c/1d79471414d7b9424d699afff2aa79fff322f52d
- https://git.kernel.org/stable/c/53717f8a4347b78eac6488072ad8e5adbaff38d9
- https://git.kernel.org/stable/c/8cbe2a21d85727b66d7c591fd5d83df0d8c4f757
- https://git.kernel.org/stable/c/dc1a481359a72ee7e548f1f5da671282a7c13b8f
- https://git.kernel.org/stable/c/a343811ef138a265407167294275201621e9ebb2
- https://git.kernel.org/stable/c/134121bfd99a06d44ef5ba15a9beb075297c0821
FAQ
Is CVE-2025-40018 being exploited?
There is no confirmed exploitation: CVE-2025-40018 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-40018?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-40018?
Linux >= 61b1ab4583e275af216c8454b9256de680499b19, < 8a6ecab3847c213ce2855b0378e63ce839085de3; >= 61b1ab4583e275af216c8454b9256de680499b19, < 421b1ae1574dfdda68b835c15ac4921ec0030182; >= 61b1ab4583e275af216c8454b9256de680499b19, < 1d79471414d7b9424d699afff2aa79fff322f52d; >= 61b1ab4583e275af216c8454b9256de680499b19, < 53717f8a4347b78eac6488072ad8e5adbaff38d9; >= 61b1ab4583e275af216c8454b9256de680499b19, < 8cbe2a21d85727b66d7c591fd5d83df0d8c4f757; >= 61b1ab4583e275af216c8454b9256de680499b19, < dc1a481359a72ee7e548f1f5da671282a7c13b8f; >= 61b1ab4583e275af216c8454b9256de680499b19, < a343811ef138a265407167294275201621e9ebb2; >= 61b1ab4583e275af216c8454b9256de680499b19, < 134121bfd99a06d44ef5ba15a9beb075297c0821; Linux 2.6.39.
Is there a fix for CVE-2025-40018?
Yes. Fixed in Linux 8a6ecab3847c213ce2855b0378e63ce839085de3, Linux 421b1ae1574dfdda68b835c15ac4921ec0030182, Linux 1d79471414d7b9424d699afff2aa79fff322f52d, Linux 53717f8a4347b78eac6488072ad8e5adbaff38d9, Linux 8cbe2a21d85727b66d7c591fd5d83df0d8c4f757, Linux 134121bfd99a06d44ef5ba15a9beb075297c0821. Upgrade Linux to 134121bfd99a06d44ef5ba15a9beb075297c0821 or later.
How do I check if I'm affected by CVE-2025-40018?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.