CVE-2025-40018

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-40018
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40018.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40018
Downstream
Related
Published
2025-10-24T11:44:28.955Z
Modified
2025-11-28T02:34:28.882733Z
Summary
ipvs: Defer ip_vs_ftp unregister during netns cleanup
Details

In the Linux kernel, the following vulnerability has been resolved:

ipvs: Defer ipvsftp unregister during netns cleanup

On the netns cleanup path, _ipvsftpexit() may unregister ipvsftp 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 ipvsftpexit() before unregistering the pernet subsystem. In _ipvsftpexit(), skip ipvsftp unregister if called during netns cleanup (when exitingmodule is false) and defer it to _ipvscleanupbatch(), which unregisters all apps after all connections are flushed. If called during module exit, unregister ipvsftp immediately.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40018.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
61b1ab4583e275af216c8454b9256de680499b19
Fixed
8a6ecab3847c213ce2855b0378e63ce839085de3
Fixed
421b1ae1574dfdda68b835c15ac4921ec0030182
Fixed
1d79471414d7b9424d699afff2aa79fff322f52d
Fixed
53717f8a4347b78eac6488072ad8e5adbaff38d9
Fixed
8cbe2a21d85727b66d7c591fd5d83df0d8c4f757
Fixed
dc1a481359a72ee7e548f1f5da671282a7c13b8f
Fixed
a343811ef138a265407167294275201621e9ebb2
Fixed
134121bfd99a06d44ef5ba15a9beb075297c0821

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.39
Fixed
5.4.301
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.246
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.195
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.156
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.112
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.53
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.3