CVE-2025-38109
net/mlx5: Fix ECVF vports unload on shutdown flow
Check your servers for CVE-2025-38109
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-38109 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Fix ECVF vports unload on shutdown flow
Fix shutdown flow UAF when a virtual function is created on the embedded chip (ECVF) of a BlueField device. In such case the vport acl ingress table is not properly destroyed.
ECVF functionality is independent of ecpf_vport_exists capability and thus functions mlx5_eswitch_(enable|disable)_pf_vf_vports() should not test it when enabling/disabling ECVF vports.
kernel log: [] refcount_t: underflow; use-after-free. [] WARNING: CPU: 3 PID: 1 at lib/refcount.c:28 refcount_warn_saturate+0x124/0x220 ---------------- [] Call trace: [] refcount_warn_saturate+0x124/0x220 [] tree_put_node+0x164/0x1e0 [mlx5_core] [] mlx5_destroy_flow_table+0x98/0x2c0 [mlx5_core] [] esw_acl_ingress_table_destroy+0x28/0x40 [mlx5_core] [] esw_acl_ingress_lgcy_cleanup+0x80/0xf4 [mlx5_core] [] esw_legacy_vport_acl_cleanup+0x44/0x60 [mlx5_core] [] esw_vport_cleanup+0x64/0x90 [mlx5_core] [] mlx5_esw_vport_disable+0xc0/0x1d0 [mlx5_core] [] mlx5_eswitch_unload_ec_vf_vports+0xcc/0x150 [mlx5_core] [] mlx5_eswitch_disable_sriov+0x198/0x2a0 [mlx5_core] [] mlx5_device_disable_sriov+0xb8/0x1e0 [mlx5_core] [] mlx5_sriov_detach+0x40/0x50 [mlx5_core] [] mlx5_unload+0x40/0xc4 [mlx5_core] [] mlx5_unload_one_devl_locked+0x6c/0xe4 [mlx5_core] [] mlx5_unload_one+0x3c/0x60 [mlx5_core] [] shutdown+0x7c/0xa4 [mlx5_core] [] pci_device_shutdown+0x3c/0xa0 [] device_shutdown+0x170/0x340 [] __do_sys_reboot+0x1f4/0x2a0 [] __arm64_sys_reboot+0x2c/0x40 [] invoke_syscall+0x78/0x100 [] el0_svc_common.constprop.0+0x54/0x184 [] do_el0_svc+0x30/0xac [] el0_svc+0x48/0x160 [] el0t_64_sync_handler+0xa4/0x12c [] el0t_64_sync+0x1a4/0x1a8 [] --[ end trace 9c4601d68c70030e ]---
Exploitation
EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 11.4% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 10 Jun 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from a7719b29a82199b90ebbf355d3332e0fbfbf6045, before 5953ae44dfe5dbad374318875be834c3b7b71ee6 affected from a7719b29a82199b90ebbf355d3332e0fbfbf6045, before da15ca0553325acf68039015f2f4db750c8e2b96 affected from a7719b29a82199b90ebbf355d3332e0fbfbf6045, before 24db585d369f949f698e03d7d8017e5ae19d0497 affected from a7719b29a82199b90ebbf355d3332e0fbfbf6045, before 687560d8a9a2d654829ad0da1ec24242f1de711d
Other versions: unaffected
|
| Linux |
affected 6.5 unaffected before 6.5 unaffected from 6.6.94 up to and including 6.6.* unaffected from 6.12.34 up to and including 6.12.* unaffected from 6.15.3 up to and including 6.15.* unaffected 6.16 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-38109 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-38109
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-38109
trivy image --scanners vuln IMAGE | grep CVE-2025-38109
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/5953ae44dfe5dbad374318875be834c3b7b71ee6 git.kernel.org
- https://git.kernel.org/stable/c/da15ca0553325acf68039015f2f4db750c8e2b96 git.kernel.org
- https://git.kernel.org/stable/c/24db585d369f949f698e03d7d8017e5ae19d0497 git.kernel.org
- https://git.kernel.org/stable/c/687560d8a9a2d654829ad0da1ec24242f1de711d git.kernel.org
Source: the record CVE-2025-38109 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse