VDB

CVE-2025-40018

CVE-2025-40018 PUBLISHED CVSS 7.8 HIGH

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.

PackageEcosystemFixed in
kernel6.12-modules-extra-commonAmazon Linux1:6.12.53-69.119.amzn2023
kernel6.12-libbpf-staticAmazon Linux1:6.12.53-69.119.amzn2023
kernel6.12-toolsAmazon Linux1:6.12.53-69.119.amzn2023
kernel6.12-tools-develAmazon Linux1:6.12.53-69.119.amzn2023
python3-perfAmazon Linux1:6.1.156-177.286.amzn2023
kernel-livepatch-6.12.53-69.119Amazon Linux1:1.0-0.amzn2023
kernel-libbpf-staticAmazon Linux1:6.1.156-177.286.amzn2023
bpftoolAmazon Linux1:6.1.156-177.286.amzn2023
python3-perf6.12Amazon Linux1:6.12.53-69.119.amzn2023
kernel-libbpfAmazon Linux1:6.1.156-177.286.amzn2023
kernel-libbpf-develAmazon Linux1:6.1.156-177.286.amzn2023
kernel6.12-headersAmazon Linux1:6.12.53-69.119.amzn2023

14 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux61b1ab4583e275af216c8454b9256de680499b19, 61b1ab4583e275af216c8454b9256de680499b19, 61b1ab4583e275af216c8454b9256de680499b19
LinuxLinux2.6.39, 0, 5.4.301
amazon:2023kernel6.12-modules-extra-common0
amazon:2023kernel6.12-libbpf-static0
amazon:2023kernel6.12-tools0
amazon:2023kernel6.12-tools-devel0
amazon:2023python3-perf0
amazon:2023kernel-livepatch-6.12.53-69.1190
amazon:2023kernel-libbpf-static0
amazon:2023bpftool0
amazon:2023python3-perf6.120
amazon:2023kernel-libbpf0
amazon:2023kernel-libbpf-devel0
amazon:2023kernel6.12-headers0
amazon:2023kernel0
amazon:2023kernel-tools0
amazon:2023kernel-devel0
amazon:2023perf6.120
amazon:2023bpftool6.120
amazon:2023kernel-livepatch-6.1.156-177.2860

…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

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›