Skip to main content

Linux Kernel CVE-2025-40018

HIGH
2025-10-24 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.8
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Share

Severity by source

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY
7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
7.0 HIGH

Local only and needs CAP_NET_ADMIN to configure IPVS (AV:L, PR:L); the UAF depends on winning a flush-vs-unregister ordering during netns teardown, so AC:H; memory corruption yields C/I/A:H.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE
7.0 HIGH
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Red Hat
6.6 MEDIUM
qualitative

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Analysis Generated
Jul 30, 2026 - 08:00 vuln.today
CVE Published
Oct 24, 2025 - 12:15 cve.org
HIGH 7.8

DescriptionCVE.org

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.

AnalysisAI

Use-after-free in the Linux kernel's IPVS (IP Virtual Server) FTP application helper (ip_vs_ftp) allows local privileged users to corrupt kernel memory during network namespace teardown. On the netns cleanup path, __ip_vs_ftp_exit() could unregister ip_vs_ftp before connections still holding valid cp->app pointers were flushed, leaving dangling references that are later dereferenced. The flaw is fixed upstream with stable-tree backports; there is no public exploit identified at time of analysis and EPSS exploitation probability is low (0.20%, 10th percentile).

Technical ContextAI

IPVS is the in-kernel Layer-4 load balancer (netfilter/ipvsadm) used by LVS and by Kubernetes kube-proxy in IPVS mode. The ip_vs_ftp module is an application helper that tracks FTP control connections so IPVS can handle the dynamically negotiated data connections; each tracked connection carries a cp->app pointer to the registered application handler. The root cause is a lifecycle/ordering bug (CWE-416 Use-After-Free; CWE field is N/A in the source data) in per-network-namespace (pernet) cleanup: __ip_vs_ftp_exit() unregistered the ip_vs_ftp app before __ip_vs_cleanup_batch() had flushed connections referencing it, so a subsequent access to cp->app touches freed memory. The fix introduces a global exiting_module flag so that during netns cleanup the unregister is deferred to __ip_vs_cleanup_batch() (after all connections are flushed), while module-unload still unregisters immediately.

Affected ProductsAI

The Linux kernel IPVS subsystem (net/netfilter/ipvs/ip_vs_ftp.c and the pernet cleanup path) is affected on builds with IPVS and the FTP application helper enabled. No explicit version range or CPE was supplied in the input; the eight git.kernel.org stable references (commits 134121bfd99a, 1d79471414d7, 421b1ae1574d, 53717f8a4347, 8a6ecab3847c, 8cbe2a21d857, a343811ef138, dc1a481359a7) indicate the fix was backported across several stable branches, implying multiple maintained kernel series are impacted. Exact fixed release tags are not provided and should be confirmed against each stable branch's changelog.

RemediationAI

Upstream fix available (commit/stable backports); a specific released patched version was not provided in the input and should be confirmed per stable branch. Update to the fixed kernel package for your distribution/stable series that includes the deferral of ip_vs_ftp unregister to __ip_vs_cleanup_batch() (see the stable commits, e.g. https://git.kernel.org/stable/c/421b1ae1574dfdda68b835c15ac4921ec0030182 and the other listed git.kernel.org references). Where immediate patching is not possible, reduce exposure by avoiding the IPVS FTP helper: unload or blacklist the ip_vs_ftp module (modprobe -r ip_vs_ftp / blacklist in modprobe.d) if FTP load balancing is not required - the trade-off is loss of active-mode FTP handling through IPVS. In multi-tenant or container environments, restrict CAP_NET_ADMIN and the ability to create/destroy network namespaces with IPVS configured, which removes the ability to reach the vulnerable cleanup path at the cost of reduced per-container network self-service.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
Container suse/hpc/warewulf4-x86_64/sle-hpc-node:15.6.17.8.134 Image SLES15-SP6 Image SLES15-SP6-BYOS Image SLES15-SP6-BYOS-Azure Image SLES15-SP6-BYOS-EC2 Image SLES15-SP6-BYOS-GCE Image SLES15-SP6-CHOST-BYOS Image SLES15-SP6-CHOST-BYOS-Aliyun Image SLES15-SP6-CHOST-BYOS-Azure Image SLES15-SP6-CHOST-BYOS-EC2 Image SLES15-SP6-CHOST-BYOS-GCE Image SLES15-SP6-CHOST-BYOS-GDC Image SLES15-SP6-CHOST-BYOS-SAP-CCloud Image SLES15-SP6-EC2 Image SLES15-SP6-EC2-ECS-HVM Image SLES15-SP6-GCE Image SLES15-SP6-HPC-BYOS Image SLES15-SP6-HPC-BYOS-Azure Image SLES15-SP6-HPC-BYOS-EC2 Image SLES15-SP6-HPC-BYOS-GCE Image SLES15-SP6-HPC-EC2 Image SLES15-SP6-HPC-GCE Image SLES15-SP6-Hardened-BYOS Image SLES15-SP6-Hardened-BYOS-Azure Image SLES15-SP6-Hardened-BYOS-EC2 Image SLES15-SP6-Hardened-BYOS-GCE Image SLES15-SP6-SAP Image SLES15-SP6-SAP-Azure Image SLES15-SP6-SAP-EC2 Image SLES15-SP6-SAP-GCE Image SLES15-SP6-SAPCAL Image SLES15-SP6-SAPCAL-Azure Image SLES15-SP6-SAPCAL-EC2 Image SLES15-SP6-SAPCAL-GCE Affected
Container suse/sl-micro/6.0/baremetal-os-container:latest Affected
Container suse/sl-micro/6.0/base-os-container:2.1.3-7.65 Affected
Container suse/sl-micro/6.0/kvm-os-container:2.1.3-6.88 Affected
Container suse/sl-micro/6.0/rt-os-container:2.1.3-7.105 Affected

Share

CVE-2025-40018 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy