ipvs: Defer ip_vs_ftp unregister during netns cleanup
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 61b1ab4583e275af216c8454b9256de680499b19 · < dc1a481359a72ee7e548f1f5da671282a7c13b8f| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
During network namespace cleanup, the Linux kernel can unregister ip_vs_ftp before flushing connections that still reference it, causing a use-after-free. The input does not specify how an attacker could trigger this condition or whether authentication, network access, or user interaction is required.
Engineers running the Linux kernel should check their versions for this issue; affected versions are not specified in the input.