Skip to content
OpenAdvisories
High · 7.8 CVE-2025-40251 EUVD-2025-201206GHSA-4fxr-v6jm-9j9m

devlink: rate: Unset parent pointer in devl_rate_nodes_destroy

Published Dec 4, 2025 · Updated Aug 5, 2026 · Assigned by Linux

Vendor: Linux Product: Linux Package: kernel Package: linux Package: linux Package: linux-allwinner-5.19 Package: linux-aws Package: linux-aws-5.0 Package: linux-aws-5.11 Package: linux-aws-5.13 Package: linux-aws-5.15 Package: linux-aws-5.19 Package: linux-aws-5.3 Package: linux-aws-5.8 Package: linux-aws-6.14 Package: linux-aws-6.17 Package: linux-aws-6.2 Package: linux-aws-6.5 Package: linux-aws-6.8 Package: linux-aws-fips Package: linux-azure Package: linux-azure-5.11 Package: linux-azure-5.13 Package: linux-azure-5.15 Package: linux-azure-5.19 Package: linux-azure-5.3 Package: linux-azure-5.8 Package: linux-azure-6.11 Package: linux-azure-6.14 Package: linux-azure-6.17 Package: linux-azure-6.2 Package: linux-azure-6.5 Package: linux-azure-6.8 Package: linux-azure-edge Package: linux-azure-fde Package: linux-azure-fde-5.15 Package: linux-azure-fde-5.19 Package: linux-azure-fde-6.14 Package: linux-azure-fde-6.2 Package: linux-azure-fde-6.8 Package: linux-azure-fips Package: linux-azure-nvidia Package: linux-azure-nvidia-6.14 Package: linux-bluefield Package: linux-fips Package: linux-gcp Package: linux-gcp-5.11 Package: linux-gcp-5.13 Package: linux-gcp-5.15 Package: linux-gcp-5.19 Package: linux-gcp-5.3 Package: linux-gcp-5.8 Package: linux-gcp-6.11 Package: linux-gcp-6.14 Package: linux-gcp-6.17 Package: linux-gcp-6.2 Package: linux-gcp-6.5 Package: linux-gcp-6.8 Package: linux-gcp-fips Package: linux-gke Package: linux-gke-4.15 Package: linux-gke-5.15 Package: linux-gke-5.4 Package: linux-gkeop Package: linux-gkeop-5.15 Package: linux-gkeop-5.4 Package: linux-hwe Package: linux-hwe-5.11 Package: linux-hwe-5.13 Package: linux-hwe-5.15 Package: linux-hwe-5.19 Package: linux-hwe-5.8 Package: linux-hwe-6.11 Package: linux-hwe-6.14 Package: linux-hwe-6.17 Package: linux-hwe-6.2 Package: linux-hwe-6.5 Package: linux-hwe-6.8 Package: linux-hwe-edge Package: linux-ibm Package: linux-ibm-5.15 Package: linux-ibm-6.8 Package: linux-intel-5.13 Package: linux-intel-iot-realtime Package: linux-intel-iotg Package: linux-intel-iotg-5.15 Package: linux-kvm Package: linux-lowlatency Package: linux-lowlatency-hwe-5.15 Package: linux-lowlatency-hwe-5.19 Package: linux-lowlatency-hwe-6.11 Package: linux-lowlatency-hwe-6.2 Package: linux-lowlatency-hwe-6.5 Package: linux-lowlatency-hwe-6.8 Package: linux-nvidia Package: linux-nvidia-6.11 Package: linux-nvidia-6.17 Package: linux-nvidia-6.2 Package: linux-nvidia-6.5 Package: linux-nvidia-6.8 Package: linux-nvidia-lowlatency Package: linux-nvidia-tegra Package: linux-nvidia-tegra-5.15 Package: linux-nvidia-tegra-igx Package: linux-oem Package: linux-oem-5.10 Package: linux-oem-5.13 Package: linux-oem-5.14 Package: linux-oem-5.17 Package: linux-oem-5.6 Package: linux-oem-6.0 Package: linux-oem-6.1 Package: linux-oem-6.11 Package: linux-oem-6.14 Package: linux-oem-6.17 Package: linux-oem-6.5 Package: linux-oem-6.8 Package: linux-oracle Package: linux-oracle-5.0 Package: linux-oracle-5.11 Package: linux-oracle-5.13 Package: linux-oracle-5.15 Package: linux-oracle-5.3 Package: linux-oracle-5.8 Package: linux-oracle-6.14 Package: linux-oracle-6.17 Package: linux-oracle-6.5 Package: linux-oracle-6.8 Package: linux-raspi Package: linux-raspi-realtime Package: linux-raspi2 Package: linux-realtime Package: linux-realtime-6.14 Package: linux-realtime-6.17 Package: linux-realtime-6.8 Package: linux-riscv Package: linux-riscv-5.11 Package: linux-riscv-5.15 Package: linux-riscv-5.19 Package: linux-riscv-5.8 Package: linux-riscv-6.14 Package: linux-riscv-6.17 Package: linux-riscv-6.5 Package: linux-riscv-6.8 Package: linux-starfive-5.19 Package: linux-starfive-6.2 Package: linux-starfive-6.5 Package: linux-vmware Package: linux-xilinx Package: linux-xilinx-zynqmp Platform: Linux Ecosystem: Azure Linux Ecosystem: Debian Ecosystem: Ubuntu

Description

In the Linux kernel, the following vulnerability has been resolved:

devlink: rate: Unset parent pointer in devl_rate_nodes_destroy

The function devl_rate_nodes_destroy is documented to "Unset parent for
all rate objects". However, it was only calling the driver-specific
`rate_leaf_parent_set` or `rate_node_parent_set` ops and decrementing
the parent's refcount, without actually setting the
`devlink_rate->parent` pointer to NULL.

This leaves a dangling pointer in the `devlink_rate` struct, which cause
refcount error in netdevsim[1] and mlx5[2]. In addition, this is
inconsistent with the behavior of `devlink_nl_rate_parent_node_set`,
where the parent pointer is correctly cleared.

This patch fixes the issue by explicitly setting `devlink_rate->parent`
to NULL after notifying the driver, thus fulfilling the function's
documented behavior for all rate objects.

[1]
repro steps:
echo 1 > /sys/bus/netdevsim/new_device
devlink dev eswitch set netdevsim/netdevsim1 mode switchdev
echo 1 > /sys/bus/netdevsim/devices/netdevsim1/sriov_numvfs
devlink port function rate add netdevsim/netdevsim1/test_node
devlink port function rate set netdevsim/netdevsim1/128 parent test_node
echo 1 > /sys/bus/netdevsim/del_device

dmesg:
refcount_t: decrement hit 0; leaking memory.
WARNING: CPU: 8 PID: 1530 at lib/refcount.c:31 refcount_warn_saturate+0x42/0xe0
CPU: 8 UID: 0 PID: 1530 Comm: bash Not tainted 6.18.0-rc4+ #1 NONE
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
RIP: 0010:refcount_warn_saturate+0x42/0xe0
Call Trace:
<TASK>
devl_rate_leaf_destroy+0x8d/0x90
__nsim_dev_port_del+0x6c/0x70 [netdevsim]
nsim_dev_reload_destroy+0x11c/0x140 [netdevsim]
nsim_drv_remove+0x2b/0xb0 [netdevsim]
device_release_driver_internal+0x194/0x1f0
bus_remove_device+0xc6/0x130
device_del+0x159/0x3c0
device_unregister+0x1a/0x60
del_device_store+0x111/0x170 [netdevsim]
kernfs_fop_write_iter+0x12e/0x1e0
vfs_write+0x215/0x3d0
ksys_write+0x5f/0xd0
do_syscall_64+0x55/0x10f0
entry_SYSCALL_64_after_hwframe+0x4b/0x53

[2]
devlink dev eswitch set pci/0000:08:00.0 mode switchdev
devlink port add pci/0000:08:00.0 flavour pcisf pfnum 0 sfnum 1000
devlink port function rate add pci/0000:08:00.0/group1
devlink port function rate set pci/0000:08:00.0/32768 parent group1
modprobe -r mlx5_ib mlx5_fwctl mlx5_core

dmesg:
refcount_t: decrement hit 0; leaking memory.
WARNING: CPU: 7 PID: 16151 at lib/refcount.c:31 refcount_warn_saturate+0x42/0xe0
CPU: 7 UID: 0 PID: 16151 Comm: bash Not tainted 6.17.0-rc7_for_upstream_min_debug_2025_10_02_12_44 #1 NONE
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
RIP: 0010:refcount_warn_saturate+0x42/0xe0
Call Trace:
<TASK>
devl_rate_leaf_destroy+0x8d/0x90
mlx5_esw_offloads_devlink_port_unregister+0x33/0x60 [mlx5_core]
mlx5_esw_offloads_unload_rep+0x3f/0x50 [mlx5_core]
mlx5_eswitch_unload_sf_vport+0x40/0x90 [mlx5_core]
mlx5_sf_esw_event+0xc4/0x120 [mlx5_core]
notifier_call_chain+0x33/0xa0
blocking_notifier_call_chain+0x3b/0x50
mlx5_eswitch_disable_locked+0x50/0x110 [mlx5_core]
mlx5_eswitch_disable+0x63/0x90 [mlx5_core]
mlx5_unload+0x1d/0x170 [mlx5_core]
mlx5_uninit_one+0xa2/0x130 [mlx5_core]
remove_one+0x78/0xd0 [mlx5_core]
pci_device_remove+0x39/0xa0
device_release_driver_internal+0x194/0x1f0
unbind_store+0x99/0xa0
kernfs_fop_write_iter+0x12e/0x1e0
vfs_write+0x215/0x3d0
ksys_write+0x5f/0xd0
do_syscall_64+0x53/0x1f0
entry_SYSCALL_64_after_hwframe+0x4b/0x53

Affected products

VendorProductAffectedFixed
Linux Linux 5.14 6.1.164

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 6.17.10-1 —
Debian 13 linux 6.12.63-1 —
Debian 12 linux 6.1.164-1 DSA-6163-1
Debian 11 linux-6.1 6.1.164-1~deb11u1 DLA-4499-1
ReleasePackageFixed inAdvisory
Ubuntu Nvidia-BlueField 24.04 LTS linux-bluefield 6.8.0-1017.21 —
Ubuntu Nvidia-BlueField 22.04 LTS linux-bluefield No fix yet —
Ubuntu 25.10 linux 6.17.0-19.19 USN-8094-1
Ubuntu 25.10 linux-aws +2 6.17.0-1009.9 USN-8094-1
Ubuntu 25.10 linux-azure +1 6.17.0-1010.10 USN-8094-5, USN-8094-4
Ubuntu 25.10 linux-azure-fde No fix yet —
Ubuntu 25.10 linux-realtime 6.17.0-1008.9 USN-8094-2
Ubuntu 25.10 linux-riscv 6.17.0-19.19.1 —
Ubuntu 24.04 LTS linux 6.8.0-106.106 USN-8095-1
Ubuntu 24.04 LTS linux-aws 6.8.0-1050.53 USN-8095-1
Ubuntu 24.04 LTS linux-aws-6.17 6.17.0-1009.9~24.04.2 USN-8094-1
Ubuntu 24.04 LTS linux-azure 6.8.0-1051.57 USN-8125-1
Ubuntu 24.04 LTS linux-azure-6.17 6.17.0-1010.10~24.04.1 USN-8094-4
Ubuntu 24.04 LTS linux-azure-fde 6.8.0-1058.65 —
Ubuntu 24.04 LTS linux-azure-nvidia 6.8.0-1039.42 —
Ubuntu 24.04 LTS linux-gcp 6.8.0-1052.55 USN-8095-1
Ubuntu 24.04 LTS linux-gcp-6.17 6.17.0-1009.9~24.04.3 USN-8094-2
Ubuntu 24.04 LTS linux-gke 6.8.0-1048.53 USN-8095-1
Ubuntu 24.04 LTS linux-gkeop 6.8.0-1035.38 USN-8095-1
Ubuntu 24.04 LTS linux-hwe-6.17 6.17.0-19.19~24.04.2 USN-8094-1
Ubuntu 24.04 LTS linux-ibm 6.8.0-1049.49 USN-8095-1
Ubuntu 24.04 LTS linux-lowlatency 6.8.0-106.106.1 USN-8095-1
Ubuntu 24.04 LTS linux-nvidia 6.8.0-1049.52 USN-8100-1
Ubuntu 24.04 LTS linux-nvidia-6.17 6.17.0-1018.18 —
Ubuntu 24.04 LTS linux-nvidia-lowlatency 6.8.0-1049.52.1 USN-8100-1
Ubuntu 24.04 LTS linux-nvidia-tegra 6.8.0-1020.20 —
Ubuntu 24.04 LTS linux-oem-6.17 6.17.0-1017.17 USN-8152-1
Ubuntu 24.04 LTS linux-oracle 6.8.0-1047.48 USN-8095-1
Ubuntu 24.04 LTS linux-oracle-6.17 6.17.0-1009.9~24.04.1 USN-8094-1
Ubuntu 24.04 LTS linux-raspi 6.8.0-1050.54 USN-8095-5
Ubuntu 24.04 LTS linux-riscv +18 No fix yet —
Ubuntu 24.04 LTS linux-riscv-6.17 6.17.0-19.19.1~24.04.1 —
Ubuntu 24.04 LTS linux-xilinx 6.8.0-1028.29 USN-8261-1
Ubuntu 22.04 LTS linux +49 No fix yet —
Ubuntu 22.04 LTS linux-aws-6.8 6.8.0-1050.53~22.04.1 USN-8095-4
Ubuntu 22.04 LTS linux-azure-6.8 6.8.0-1051.57~22.04.1 USN-8126-1
Ubuntu 22.04 LTS linux-azure-fde-6.8 6.8.0-1058.65~22.04.1 —
Ubuntu 22.04 LTS linux-gcp-6.8 6.8.0-1052.55~22.04.1 USN-8095-1
Ubuntu 22.04 LTS linux-hwe-6.8 +1 6.8.0-106.106~22.04.1 USN-8095-1
Ubuntu 22.04 LTS linux-ibm-6.8 6.8.0-1049.49~22.04.1 USN-8095-1
Ubuntu 22.04 LTS linux-lowlatency-hwe-6.8 6.8.0-106.106.1~22.04.1 USN-8095-1
Ubuntu 22.04 LTS linux-nvidia-6.8 6.8.0-1049.52~22.04.1 USN-8100-1
Ubuntu 22.04 LTS linux-oracle-6.8 6.8.0-1047.48~22.04.1 USN-8095-1
Show 9 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS linux-gke +28 No fix yet —
Ubuntu 18.04 LTS linux-gcp +14 No fix yet —
Ubuntu 16.04 LTS linux-hwe-edge No fix yet —
Ubuntu Pro Realtime 24.04 LTS linux-raspi-realtime 6.8.0-2040.41 USN-8095-5
Ubuntu Pro Realtime 24.04 LTS linux-realtime 6.8.1-1045.46 USN-8095-3
Ubuntu Pro Realtime 24.04 LTS linux-realtime-6.14 No fix yet —
Ubuntu Pro Realtime 24.04 LTS linux-realtime-6.17 6.17.0-1008.9~24.04.1 USN-8094-3
Ubuntu Pro Realtime 22.04 LTS linux-realtime +1 No fix yet —
Ubuntu Pro Realtime 22.04 LTS linux-realtime-6.8 6.8.1-1045.46~22.04.1 USN-8095-3
Ubuntu Pro FIPS-updates 24.04 LTS linux-aws-fips 6.8.0-1050.53+fips1 USN-8095-2
Ubuntu Pro FIPS-updates 24.04 LTS linux-azure-fips 6.8.0-1052.58+fips1 USN-8165-1
Ubuntu Pro FIPS-updates 24.04 LTS linux-fips 6.8.0-106.106+fips1 USN-8095-2
Ubuntu Pro FIPS-updates 24.04 LTS linux-gcp-fips 6.8.0-1052.55+fips1 USN-8095-2
Ubuntu Pro FIPS-updates 22.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS-preview 22.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro 20.04 LTS linux-aws-5.15 +11 No fix yet —
ReleasePackageFixed inAdvisory
RHEL 10 rv +76 6.12.0-124.31.1.el10_1 RHSA-2026:1690
RHEL 9 rv +75 5.14.0-611.27.1.el9_7 RHSA-2026:1617
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 10.0 EUS rv +77 6.12.0-55.58.1.el10_0 RHSA-2026:1727
RHEL 9.6 EUS rv +77 5.14.0-570.81.1.el9_6 RHSA-2026:1194
RHEL 9.4 EUS bpftool 7.3.0-427.109.1.el9_4 RHSA-2026:1879
RHEL 9.4 EUS rv +64 5.14.0-427.109.1.el9_4 RHSA-2026:1879
RHEL 9.2 E4S bpftool 7.0.0-284.156.1.el9_2 RHSA-2026:2560
RHEL 9.2 E4S kernel-rt +14 5.14.0-284.156.1.rt14.441.el9_2 RHSA-2026:2583
RHEL 9.2 E4S perf +47 5.14.0-284.156.1.el9_2 RHSA-2026:2560
RHEL 9.0 E4S kernel-rt +12 5.14.0-70.165.1.rt21.237.el9_0 RHSA-2026:2577
RHEL 9.0 E4S perf +28 5.14.0-70.165.1.el9_0 RHSA-2026:2573

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 10 kernel-doc +1 6.12.0-124.31.1.el10_1 ALSA-2026:1690
AlmaLinux 9 rv +73 5.14.0-611.27.1.el9_7 ALSA-2026:1617

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 10 kernel 6.12.0-124.31.1.el10_1 RLSA-2026:1690
Rocky Linux 9 kernel 5.14.0-611.27.1.el9_7 RLSA-2026:1617
ReleasePackageFixed inAdvisory
SLES 15 SP7 kernel-64kb +6 6.4.0-150700.53.28.1 SUSE-SU-2026:0315-1
SLES 15 SP7 kernel-azure +2 6.4.0-150700.20.24.1 SUSE-SU-2026:0281-1
SLES 15 SP7 kernel-default-base 6.4.0-150700.53.28.1.150700.17.19.1 SUSE-SU-2026:0315-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 kernel-64kb +8 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SLES for SAP 16.0 kernel-default-base 6.12.0-160000.9.1.160000.2.6 SUSE-SU-2026:20220-1
SLES 16.0 kernel-64kb +8 6.12.0-160000.9.1 SUSE-SU-2026:20228-1, SUSE-SU-2026:20220-1
SLES 16.0 kernel-default-base 6.12.0-160000.9.1.160000.2.6 SUSE-SU-2026:20220-1
SLE Micro 6.2 kernel-default-base 6.12.0-160000.9.1.160000.2.6 SUSE-SU-2026:20207-1
SLE Micro 6.2 kernel-rt +5 6.12.0-160000.9.1 SUSE-SU-2026:20564-1, SUSE-SU-2026:20207-1
SLE Micro 6.1 kernel-default-base 6.4.0-39.1.21.16 SUSE-SU-2026:20498-1
SLE Micro 6.1 kernel-rt +1 6.4.0-40.1 SUSE-SU-2026:20876-1
SLE Micro 6.1 kernel-source +2 6.4.0-39.1 SUSE-SU-2026:20498-1
SLE Micro 6.0 kernel-default-base 6.4.0-39.1.21.16 SUSE-SU-2026:20477-1
SLE Micro 6.0 kernel-rt +1 6.4.0-40.1 SUSE-SU-2026:20845-1
SLE Micro 6.0 kernel-source +2 6.4.0-39.1 SUSE-SU-2026:20477-1
SLE Live Patching 15 SP7 kernel-default 6.4.0-150700.53.28.1 SUSE-SU-2026:0315-1
SLE Live Patching 15 SP7 kernel-livepatch-SLE15-SP7-RT_Update_8 1-150700.1.3.1 SUSE-SU-2026:0278-1
SLE Live Patching 15 SP7 kernel-livepatch-SLE15-SP7_Update_8 1-150700.15.3.1 SUSE-SU-2026:0315-1
SUSE Real Time Module 15 SP7 kernel-rt +2 6.4.0-150700.7.28.1 SUSE-SU-2026:0278-1
ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 kernel-default-base 6.12.0-160000.9.1.160000.2.6 openSUSE-SU-2026:20145-1
openSUSE Leap 16.0 kernel-rt +11 6.12.0-160000.9.1 openSUSE-SU-2026:20145-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 kernel-livepatch-6.12.63-84.121 +1 1:1.0-0.amzn2023 ALAS2023-2026-1491, ALAS2023-2026-1430
Amazon Linux 2023 perf +14 1:6.1.164-196.303.amzn2023 ALAS2023-2026-1491
Amazon Linux 2023 perf6.12 +14 1:6.12.63-84.121.amzn2023 ALAS2023-2026-1430

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 kernel 6.6.119.3-1 —
Azure Linux 2 (CBL-Mariner) kernel No fix yet —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 10 rv +29 6.12.0-124.31.1.el10_1 ELSA-2026-1690
Oracle Linux 9 kernel-uek +34 6.12.0-108.64.6.3.el10uek ELSA-2026-50112
Oracle Linux 9 rv +28 5.14.0-611.27.1.el9_7 ELSA-2026-1617

Advisories 50

References