{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-38109","id":"CVE-2025-38109","title":"net/mlx5: Fix ECVF vports unload on shutdown flow","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: Fix ECVF vports unload on shutdown flow\n\nFix shutdown flow UAF when a virtual function is created on the embedded\nchip (ECVF) of a BlueField device. In such case the vport acl ingress\ntable is not properly destroyed.\n\nECVF functionality is independent of ecpf_vport_exists capability and\nthus functions mlx5_eswitch_(enab","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: Fix ECVF vports unload on shutdown flow\n\nFix shutdown flow UAF when a virtual function is created on the embedded\nchip (ECVF) of a BlueField device. In such case the vport acl ingress\ntable is not properly destroyed.\n\nECVF functionality is independent of ecpf_vport_exists capability and\nthus functions mlx5_eswitch_(enable|disable)_pf_vf_vports() should not\ntest it when enabling/disabling ECVF vports.\n\nkernel log:\n[] refcount_t: underflow; use-after-free.\n[] WARNING: CPU: 3 PID: 1 at lib/refcount.c:28\n   refcount_warn_saturate+0x124/0x220\n----------------\n[] Call trace:\n[] refcount_warn_saturate+0x124/0x220\n[] tree_put_node+0x164/0x1e0 [mlx5_core]\n[] mlx5_destroy_flow_table+0x98/0x2c0 [mlx5_core]\n[] esw_acl_ingress_table_destroy+0x28/0x40 [mlx5_core]\n[] esw_acl_ingress_lgcy_cleanup+0x80/0xf4 [mlx5_core]\n[] esw_legacy_vport_acl_cleanup+0x44/0x60 [mlx5_core]\n[] esw_vport_cleanup+0x64/0x90 [mlx5_core]\n[] mlx5_esw_vport_disable+0xc0/0x1d0 [mlx5_core]\n[] mlx5_eswitch_unload_ec_vf_vports+0xcc/0x150 [mlx5_core]\n[] mlx5_eswitch_disable_sriov+0x198/0x2a0 [mlx5_core]\n[] mlx5_device_disable_sriov+0xb8/0x1e0 [mlx5_core]\n[] mlx5_sriov_detach+0x40/0x50 [mlx5_core]\n[] mlx5_unload+0x40/0xc4 [mlx5_core]\n[] mlx5_unload_one_devl_locked+0x6c/0xe4 [mlx5_core]\n[] mlx5_unload_one+0x3c/0x60 [mlx5_core]\n[] shutdown+0x7c/0xa4 [mlx5_core]\n[] pci_device_shutdown+0x3c/0xa0\n[] device_shutdown+0x170/0x340\n[] __do_sys_reboot+0x1f4/0x2a0\n[] __arm64_sys_reboot+0x2c/0x40\n[] invoke_syscall+0x78/0x100\n[] el0_svc_common.constprop.0+0x54/0x184\n[] do_el0_svc+0x30/0xac\n[] el0_svc+0x48/0x160\n[] el0t_64_sync_handler+0xa4/0x12c\n[] el0t_64_sync+0x1a4/0x1a8\n[] --[ end trace 9c4601d68c70030e ]---","published":"2025-07-03T08:35:19.240Z","updated":"2026-10-28T02:30:30.754731447Z","reserved":"2025-04-16T04:51:23.985Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a7719b29a82199b90ebbf355d3332e0fbfbf6045","lessThan":"5953ae44dfe5dbad374318875be834c3b7b71ee6","status":"affected","versionType":"git"},{"version":"a7719b29a82199b90ebbf355d3332e0fbfbf6045","lessThan":"da15ca0553325acf68039015f2f4db750c8e2b96","status":"affected","versionType":"git"},{"version":"a7719b29a82199b90ebbf355d3332e0fbfbf6045","lessThan":"24db585d369f949f698e03d7d8017e5ae19d0497","status":"affected","versionType":"git"},{"version":"a7719b29a82199b90ebbf355d3332e0fbfbf6045","lessThan":"687560d8a9a2d654829ad0da1ec24242f1de711d","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.5","status":"affected"},{"version":"0","lessThan":"6.5","status":"unaffected","versionType":"semver"},{"version":"6.6.94","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.34","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.15.3","lessThanOrEqual":"6.15.*","status":"unaffected","versionType":"semver"},{"version":"6.16","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-416"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/5953ae44dfe5dbad374318875be834c3b7b71ee6","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/da15ca0553325acf68039015f2f4db750c8e2b96","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/24db585d369f949f698e03d7d8017e5ae19d0497","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/687560d8a9a2d654829ad0da1ec24242f1de711d","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38109.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38109","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00198,"epssPercentile":0.09748,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-38109","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38109","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-38109","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-38109","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}