CVE-2025-40018

ipvs: Defer ip_vs_ftp unregister during netns cleanup

State
Published
Severity
7.8 High
Published
Oct 24, 2025
Updated
Oct 15, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 61b1ab4583e275af216c8454b9256de680499b19 to before 8a6ecab3847c213ce2855b0378e63ce839085de3Affected
  • 61b1ab4583e275af216c8454b9256de680499b19 to before 421b1ae1574dfdda68b835c15ac4921ec0030182Affected
  • 61b1ab4583e275af216c8454b9256de680499b19 to before 1d79471414d7b9424d699afff2aa79fff322f52dAffected
  • 61b1ab4583e275af216c8454b9256de680499b19 to before 53717f8a4347b78eac6488072ad8e5adbaff38d9Affected
  • 61b1ab4583e275af216c8454b9256de680499b19 to before 8cbe2a21d85727b66d7c591fd5d83df0d8c4f757Affected
  • 61b1ab4583e275af216c8454b9256de680499b19 to before dc1a481359a72ee7e548f1f5da671282a7c13b8fAffected
  • 61b1ab4583e275af216c8454b9256de680499b19 to before a343811ef138a265407167294275201621e9ebb2Affected
  • 61b1ab4583e275af216c8454b9256de680499b19 to before 134121bfd99a06d44ef5ba15a9beb075297c0821Affected
LinuxLinux
  • 2.6.39Affected
  • before 2.6.39Not affected
  • 5.4.301 through 5.4.*Not affected
  • 5.10.246 through 5.10.*Not affected
  • 5.15.195 through 5.15.*Not affected
  • 6.1.156 through 6.1.*Not affected
  • 6.6.112 through 6.6.*Not affected
  • 6.12.53 through 6.12.*Not affected
  • 6.17.3 through 6.17.*Not affected
  • 6.18 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.