Linux Kernel Net MLX5E TC Use-After-Free Vulnerability in NIC Mode

Vulnerability

A use-after-free vulnerability has been identified in the Linux kernel's net/mlx5e TC (traffic control) component. This issue arises when the eswitch object mapping pool is used in NIC (network interface card) mode, where it has not been properly initialized. The vulnerability leads to a slab-use-after-free error, allowing a read of freed memory, which can potentially be exploited. The problem occurs in versions of the Linux kernel that include the vulnerable mlx5_core module, specifically in the context of traffic control actions.

Impact

Exploitation of this vulnerability causes a use-after-free condition, where freed memory is accessed, leading to potential memory corruption. In this case, it could be exploited to execute arbitrary code or cause a denial-of-service by crashing the system.

Reproduction

The vulnerability can be reproduced by enabling eswitch offloads in a Mellanox NIC that is set to NIC mode. This can be done using the 'devlink' command to set the eswitch mode to 'on', and then applying traffic control rules that trigger the flow offload actions. The use-after-free error can be observed in the kernel log, indicating that the vulnerability has been successfully exploited.

Remediation

Users can switch the eswitch mode to 'off' or avoid applying traffic control rules that trigger the vulnerable flow offload actions. Additionally, upgrading to a patched version of the Linux kernel is recommended.

Added: Dec 30, 2025, 3:38 PM
Updated: Dec 30, 2025, 3:38 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
3.8
remediation
7.7
relevance
1.6
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.