Skip to content
OpenAdvisories
Unscored CVE-2023-53591 EUVD-2025-32308GHSA-8qq6-88xp-8ghp

net/mlx5e: Fix deadlock in tc route query code

Published Oct 4, 2025 · Updated Nov 5, 2026 · Assigned by Linux

Vendor: Linux Product: Linux 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.2 Package: linux-aws-6.5 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.2 Package: linux-azure-6.5 Package: linux-azure-edge Package: linux-azure-fde Package: linux-azure-fde-5.19 Package: linux-azure-fde-6.2 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.2 Package: linux-gcp-6.5 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.2 Package: linux-hwe-6.5 Package: linux-hwe-edge Package: linux-ibm Package: linux-ibm-5.15 Package: linux-intel 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-nvidia Package: linux-nvidia-6.2 Package: linux-nvidia-6.5 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.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.5 Package: linux-raspi Package: linux-raspi-realtime Package: linux-raspi2 Package: linux-realtime 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.5 Package: linux-starfive-5.19 Package: linux-starfive-6.2 Package: linux-starfive-6.5 Package: linux-vmware Package: linux-xilinx-zynqmp Platform: Linux Ecosystem: Debian Ecosystem: Ubuntu

Description

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

net/mlx5e: Fix deadlock in tc route query code

Cited commit causes ABBA deadlock[0] when peer flows are created while
holding the devcom rw semaphore. Due to peer flows offload implementation
the lock is taken much higher up the call chain and there is no obvious way
to easily fix the deadlock. Instead, since tc route query code needs the
peer eswitch structure only to perform a lookup in xarray and doesn't
perform any sleeping operations with it, refactor the code for lockless
execution in following ways:

- RCUify the devcom 'data' pointer. When resetting the pointer
synchronously wait for RCU grace period before returning. This is fine
since devcom is currently only used for synchronization of
pairing/unpairing of eswitches which is rare and already expensive as-is.

- Wrap all usages of 'paired' boolean in {READ|WRITE}_ONCE(). The flag has
already been used in some unlocked contexts without proper
annotations (e.g. users of mlx5_devcom_is_paired() function), but it wasn't
an issue since all relevant code paths checked it again after obtaining the
devcom semaphore. Now it is also used by mlx5_devcom_get_peer_data_rcu() as
"best effort" check to return NULL when devcom is being unpaired. Note that
while RCU read lock doesn't prevent the unpaired flag from being changed
concurrently it still guarantees that reader can continue to use 'data'.

- Refactor mlx5e_tc_query_route_vport() function to use new
mlx5_devcom_get_peer_data_rcu() API which fixes the deadlock.

[0]:

[ 164.599612] ======================================================
[ 164.600142] WARNING: possible circular locking dependency detected
[ 164.600667] 6.3.0-rc3+ #1 Not tainted
[ 164.601021] ------------------------------------------------------
[ 164.601557] handler1/3456 is trying to acquire lock:
[ 164.601998] ffff88811f1714b0 (&esw->offloads.encap_tbl_lock){+.+.}-{3:3}, at: mlx5e_attach_encap+0xd8/0x8b0 [mlx5_core]
[ 164.603078]
but task is already holding lock:
[ 164.603617] ffff88810137fc98 (&comp->sem){++++}-{3:3}, at: mlx5_devcom_get_peer_data+0x37/0x80 [mlx5_core]
[ 164.604459]
which lock already depends on the new lock.

[ 164.605190]
the existing dependency chain (in reverse order) is:
[ 164.605848]
-> #1 (&comp->sem){++++}-{3:3}:
[ 164.606380] down_read+0x39/0x50
[ 164.606772] mlx5_devcom_get_peer_data+0x37/0x80 [mlx5_core]
[ 164.607336] mlx5e_tc_query_route_vport+0x86/0xc0 [mlx5_core]
[ 164.607914] mlx5e_tc_tun_route_lookup+0x1a4/0x1d0 [mlx5_core]
[ 164.608495] mlx5e_attach_decap_route+0xc6/0x1e0 [mlx5_core]
[ 164.609063] mlx5e_tc_add_fdb_flow+0x1ea/0x360 [mlx5_core]
[ 164.609627] __mlx5e_add_fdb_flow+0x2d2/0x430 [mlx5_core]
[ 164.610175] mlx5e_configure_flower+0x952/0x1a20 [mlx5_core]
[ 164.610741] tc_setup_cb_add+0xd4/0x200
[ 164.611146] fl_hw_replace_filter+0x14c/0x1f0 [cls_flower]
[ 164.611661] fl_change+0xc95/0x18a0 [cls_flower]
[ 164.612116] tc_new_tfilter+0x3fc/0xd20
[ 164.612516] rtnetlink_rcv_msg+0x418/0x5b0
[ 164.612936] netlink_rcv_skb+0x54/0x100
[ 164.613339] netlink_unicast+0x190/0x250
[ 164.613746] netlink_sendmsg+0x245/0x4a0
[ 164.614150] sock_sendmsg+0x38/0x60
[ 164.614522] ____sys_sendmsg+0x1d0/0x1e0
[ 164.614934] ___sys_sendmsg+0x80/0xc0
[ 164.615320] __sys_sendmsg+0x51/0x90
[ 164.615701] do_syscall_64+0x3d/0x90
[ 164.616083] entry_SYSCALL_64_after_hwframe+0x46/0xb0
[ 164.616568]
-> #0 (&esw->offloads.encap_tbl_lock){+.+.}-{3:3}:
[ 164.617210] __lock_acquire+0x159e/0x26e0
[ 164.617638] lock_acquire+0xc2/0x2a0
[ 164.618018] __mutex_lock+0x92/0xcd0
[ 164.618401] mlx5e_attach_encap+0xd8/0x8b0 [mlx5_core]
[ 164.618943] post_process_attr+0x153/0x2d0 [
---truncated---

Affected products

VendorProductAffectedFixed
Linux Linux 5.13.17 – < 5.14, 5.14.4 – < 5.15, 5.15 5.14

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.3.7-1 —
Debian 13 linux 6.3.7-1 —
Debian 12 linux 6.1.37-1 —
ReleasePackageFixed inAdvisory
Ubuntu Nvidia-BlueField 22.04 LTS linux-bluefield 5.15.0-1023.25 —
Ubuntu 24.04 LTS linux-intel +9 No fix yet —
Ubuntu 22.04 LTS linux +1 5.15.0-83.92 —
Ubuntu 22.04 LTS linux-aws 5.15.0-1044.49 —
Ubuntu 22.04 LTS linux-azure 5.15.0-1046.53 —
Ubuntu 22.04 LTS linux-azure-fde 5.15.0-1046.53.1 —
Ubuntu 22.04 LTS linux-gcp 5.15.0-1041.49 —
Ubuntu 22.04 LTS linux-gke +1 5.15.0-1041.46 —
Ubuntu 22.04 LTS linux-gkeop 5.15.0-1027.32 —
Ubuntu 22.04 LTS linux-ibm +1 5.15.0-1037.40 —
Ubuntu 22.04 LTS linux-intel-iotg 5.15.0-1039.45 —
Ubuntu 22.04 LTS linux-nvidia 5.15.0-1032.32 —
Ubuntu 22.04 LTS linux-nvidia-tegra 5.15.0-1017.17 —
Ubuntu 22.04 LTS linux-nvidia-tegra-igx 5.15.0-1004.4 —
Ubuntu 22.04 LTS linux-oracle 5.15.0-1042.48 —
Ubuntu 22.04 LTS linux-riscv +32 No fix yet —
Ubuntu 22.04 LTS linux-xilinx-zynqmp 5.15.0-1025.29 —
Ubuntu 20.04 LTS linux-aws-5.15 5.15.0-1044.49~20.04.1 —
Ubuntu 20.04 LTS linux-azure-5.15 5.15.0-1046.53~20.04.1 —
Ubuntu 20.04 LTS linux-gcp-5.15 5.15.0-1041.49~20.04.1 —
Ubuntu 20.04 LTS linux-gke +28 No fix yet —
Ubuntu 20.04 LTS linux-hwe-5.15 +1 5.15.0-83.92~20.04.1 —
Ubuntu 20.04 LTS linux-ibm-5.15 5.15.0-1037.40~20.04.1 —
Ubuntu 20.04 LTS linux-intel-iotg-5.15 5.15.0-1040.46~20.04.1 —
Ubuntu 20.04 LTS linux-nvidia-tegra-5.15 5.15.0-1017.17~20.04.1 —
Ubuntu 20.04 LTS linux-oracle-5.15 5.15.0-1042.48~20.04.1 —
Ubuntu 20.04 LTS linux-riscv-5.15 5.15.0-1040.44~20.04.3 —
Ubuntu 18.04 LTS linux-gcp +14 No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS linux-hwe-edge No fix yet —
Ubuntu Pro Realtime 22.04 LTS linux-intel-iot-realtime 5.15.0-1038.40 —
Ubuntu Pro Realtime 22.04 LTS linux-realtime 5.15.0-1045.50 —
Ubuntu Pro FIPS-preview 22.04 LTS linux-fips No fix yet —
ReleasePackageFixed inAdvisory
RHEL 9 bpftool 7.2.0-362.8.1.el9_3 RHSA-2023:6583
RHEL 9 rv +64 5.14.0-362.8.1.el9_3 RHSA-2023:6583
RHEL 8 perf +26 4.18.0-513.5.1.el8_9 RHSA-2023:7077
ReleasePackageFixed inAdvisory
SLES 15 SP5 kernel-64kb +6 5.14.21-150500.55.127.1 SUSE-SU-2025:4320-1
SLES 15 SP5 kernel-default-base 5.14.21-150500.55.127.1.150500.6.61.1 SUSE-SU-2025:4320-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP5 kernel-default-base 5.14.21-150500.55.127.1.150500.6.61.1 SUSE-SU-2025:4320-1
SLES for SAP 15 SP5 kernel-docs +4 5.14.21-150500.55.127.1 SUSE-SU-2025:4320-1
SLE Micro 5.5 kernel-default-base 5.14.21-150500.55.127.1.150500.6.61.1 SUSE-SU-2025:4320-1
SLE Micro 5.5 kernel-rt +1 5.14.21-150500.13.112.1 SUSE-SU-2025:4149-1
SLE Micro 5.5 kernel-source +1 5.14.21-150500.55.127.1 SUSE-SU-2025:4320-1
SLE Live Patching 15 SP5 kernel-default 5.14.21-150500.55.127.1 SUSE-SU-2025:4320-1
SLE Live Patching 15 SP5 kernel-livepatch-SLE15-SP5_Update_32 1-150500.11.3.1 SUSE-SU-2025:4320-1
SLE HPC 15 SP5 kernel-64kb +5 5.14.21-150500.55.127.1 SUSE-SU-2025:4320-1
SLE HPC 15 SP5 kernel-default-base 5.14.21-150500.55.127.1.150500.6.61.1 SUSE-SU-2025:4320-1

Advisories 5

References