Vulnerability · Published Oct 24, 2025 · Assigned by Linux
CVE-2025-40018ipvs: Defer ip_vs_ftp unregister during netns cleanup
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 4% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.158-1 | DEBIAN-CVE-2025-40018 |
| Debian:12 | linux | 6.1.158-1 | DSA-6053-1 |
| Debian:13 | linux | 6.12.57-1 | DEBIAN-CVE-2025-40018 |
| Debian:14 | linux | 6.17.6-1 | DEBIAN-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux | 5.15.0-164.174 | USN-7928-1 |
| Ubuntu:22.04:LTS | linux | 5.15.0-164.174 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux | 6.8.0-90.91 | USN-7931-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-90.91 | UBUNTU-CVE-2025-40018 |
| Ubuntu:25.10 | linux | 6.17.0-8.8 | USN-7920-1 |
| Ubuntu:25.10 | linux | 6.17.0-8.8 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1098.105 | USN-7928-1 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1098.105 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1044.46 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1044.46 | USN-7931-1 |
| Ubuntu:25.10 | linux-aws | 6.17.0-1005.5 | UBUNTU-CVE-2025-40018 |
| Ubuntu:25.10 | linux-aws | 6.17.0-1005.5 | USN-7920-1 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | 6.14.0-1018.18~24.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | 6.14.0-1018.18~24.04.1 | USN-7921-1 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1044.46~22.04.1 | USN-7931-1 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1044.46~22.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1102.111 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1102.111 | USN-7928-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1044.50 | USN-7935-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1044.50 | UBUNTU-CVE-2025-40018 |
| Ubuntu:25.10 | linux-azure | 6.17.0-1006.6 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-azure-6.14 | 6.14.0-1017.17~24.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1044.50~22.04.1 | USN-7935-1 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1044.50~22.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1102.111.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-azure-fde | 6.8.0-1046.53 | UBUNTU-CVE-2025-40018 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.14 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | 6.8.0-1046.53~22.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1029.32 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1098.107 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1098.107 | USN-7928-1 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1045.48 | USN-7931-1 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1045.48 | UBUNTU-CVE-2025-40018 |
| Ubuntu:25.10 | linux-gcp | 6.17.0-1005.5 | USN-7920-1 |
| Ubuntu:25.10 | linux-gcp | 6.17.0-1005.5 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-gcp-6.17 | 6.17.0-1008.8~24.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1045.48~22.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1045.48~22.04.1 | USN-7931-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1094.100 | USN-7928-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1094.100 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1041.46 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1041.46 | USN-7931-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1081.89 | USN-7928-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1081.89 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1028.31 | USN-7931-1 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1028.31 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-hwe-6.14 | 6.14.0-37.37~24.04.1 | USN-7921-1 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-90.91~22.04.1 | USN-7931-1 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-90.91~22.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1092.95 | USN-7928-1 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1092.95 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1042.42 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1042.42 | USN-7931-1 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1042.42~22.04.1 | USN-7931-1 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1042.42~22.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1093.99 | USN-7928-1 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1093.99 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1090.95 | USN-7928-5 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1090.95 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-164.174 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-164.174 | USN-7928-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-90.91.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-90.91.1 | USN-7931-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-90.91.1~22.04.1 | USN-7931-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-90.91.1~22.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1093.94 | USN-7928-1 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1093.94 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1044.47 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1044.47 | USN-7931-1 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-nvidia-6.17 | 6.17.0-1008.8 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1044.47~22.04.1 | USN-7931-1 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1044.47~22.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1044.47.1 | USN-7931-1 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1044.47.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1050.50 | USN-7928-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1050.50 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1020.20 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1039.39 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1039.39 | USN-7928-1 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | 6.14.0-1017.17 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | 6.14.0-1017.17 | USN-7936-1 |
| Ubuntu:24.04:LTS | linux-oem-6.17 | 6.17.0-1008.8 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1095.101 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1095.101 | USN-7928-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1041.42 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1041.42 | USN-7931-1 |
| Ubuntu:25.10 | linux-oracle | 6.17.0-1005.5 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-oracle-6.17 | 6.17.0-1007.7~24.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1041.42~22.04.1 | USN-7931-1 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1041.42~22.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1092.95 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1092.95 | USN-7928-4 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1044.48 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1044.48 | USN-7931-5 |
| Ubuntu:25.10 | linux-raspi | 6.17.0-1006.6 | USN-7920-2 |
| Ubuntu:25.10 | linux-raspi | 6.17.0-1006.6 | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:25.10 | linux-realtime | 6.17.0-1004.5 | UBUNTU-CVE-2025-40018 |
| Ubuntu:25.10 | linux-realtime | 6.17.0-1004.5 | USN-7920-1 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:25.10 | linux-riscv | 6.17.0-8.8.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | 6.14.0-37.37.1~24.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-90.91~22.04.1 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-40018 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1021.22 | USN-7931-4 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1021.22 | UBUNTU-CVE-2025-40018 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1062.66 | USN-7928-1 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1062.66 | UBUNTU-CVE-2025-40018 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 61b1ab4583e275af216c8454b9256de680499b19 – before 8a6ecab3847c213ce2855b0378e63ce839085de361b1ab4583e275af216c8454b9256de680499b19 – before 421b1ae1574dfdda68b835c15ac4921ec003018261b1ab4583e275af216c8454b9256de680499b19 – before 1d79471414d7b9424d699afff2aa79fff322f52d61b1ab4583e275af216c8454b9256de680499b19 – before 53717f8a4347b78eac6488072ad8e5adbaff38d961b1ab4583e275af216c8454b9256de680499b19 – before 8cbe2a21d85727b66d7c591fd5d83df0d8c4f75761b1ab4583e275af216c8454b9256de680499b19 – before dc1a481359a72ee7e548f1f5da671282a7c13b8f61b1ab4583e275af216c8454b9256de680499b19 – before a343811ef138a265407167294275201621e9ebb261b1ab4583e275af216c8454b9256de680499b19 – before 134121bfd99a06d44ef5ba15a9beb075297c0821 |
| Linux | Linux | 2.6.39 |
References
- 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