CVE-2025-40018
ipvs: Defer ip_vs_ftp unregister during netns cleanup
Reported by linux · Published October 24, 2025
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel6.12-modules-extra-common | Amazon Linux | 1:6.12.53-69.119.amzn2023 |
| kernel6.12-libbpf-static | Amazon Linux | 1:6.12.53-69.119.amzn2023 |
| kernel6.12-tools | Amazon Linux | 1:6.12.53-69.119.amzn2023 |
| kernel6.12-tools-devel | Amazon Linux | 1:6.12.53-69.119.amzn2023 |
| python3-perf | Amazon Linux | 1:6.1.156-177.286.amzn2023 |
| kernel-livepatch-6.12.53-69.119 | Amazon Linux | 1:1.0-0.amzn2023 |
| kernel-libbpf-static | Amazon Linux | 1:6.1.156-177.286.amzn2023 |
| bpftool | Amazon Linux | 1:6.1.156-177.286.amzn2023 |
| python3-perf6.12 | Amazon Linux | 1:6.12.53-69.119.amzn2023 |
| kernel-libbpf | Amazon Linux | 1:6.1.156-177.286.amzn2023 |
| kernel-libbpf-devel | Amazon Linux | 1:6.1.156-177.286.amzn2023 |
| kernel6.12-headers | Amazon Linux | 1:6.12.53-69.119.amzn2023 |
14 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 61b1ab4583e275af216c8454b9256de680499b19, 61b1ab4583e275af216c8454b9256de680499b19, 61b1ab4583e275af216c8454b9256de680499b19 |
| Linux | Linux | 2.6.39, 0, 5.4.301 |
| amazon:2023 | kernel6.12-modules-extra-common | 0 |
| amazon:2023 | kernel6.12-libbpf-static | 0 |
| amazon:2023 | kernel6.12-tools | 0 |
| amazon:2023 | kernel6.12-tools-devel | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-livepatch-6.12.53-69.119 | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | perf6.12 | 0 |
| amazon:2023 | bpftool6.12 | 0 |
| amazon:2023 | kernel-livepatch-6.1.156-177.286 | 0 |
…and 12 more
Timeline
- Oct 12, 2025 PoC Published (6 in total, the first dated here)
- Oct 24, 2025 EPSS Score (30 in total, the first dated here)
- Oct 24, 2025 Coalition ESS Score (7 in total, the first dated here)
- Oct 24, 2025 CVE Published
- Dec 15, 2025 Security Advisory (151 in total, the first dated here)
- Apr 20, 2026 Distribution Patch (97 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-40018
vulnetix vdb fixes CVE-2025-40018
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-40018/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart