AZL-118637: CVE-2026-143349 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: macsec: free struct mlx5fsid after an RCU grace period
macsecfsiddel() removes a struct mlx5fsid from its rhashtable with rhashtableremovefast() and then frees it with kfree() right away.
The TX (SCI) table is read locklessly from the transmit path: mlx5emacsechandletxskb() and mlx5emacsectxbuildeseg() call mlx5macsecfsgetfsidfromhashtable(), which does rhashtablelookup() under rcureadlock() and then reads mlx5fsid->id. A transmit that looked the entry up just before it was removed reads freed memory.
Before commit d4ece08f4b1d ("net/mlx5: Maintain fsid xarray per MACsec device inside macsec steering") the SCI table held struct mlx5emacsecsa directly, and mlx5emacsecdeltxsa() freed it with kfreercumightsleep(). That commit moved the table into macsecfs.c with the new struct mlx5fsid, but frees it with a plain kfree().
Add an rcuhead to struct mlx5fsid and free it with kfreercu().
The same issue was flagged by the Sashiko AI review as a pre-existing problem while reviewing the HW-GRO for PSP series.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the mlx5 MACsec code, add an rcu_head to struct mlx5_fs_id and free the structure with kfree_rcu() so lockless transmit-path readers cannot access freed memory.
Event History
Frequently Asked Questions
What conditions are required for this issue to occur?
The system must be using mlx5 MACsec transmit handling, with a transmit SCI table entry being removed while transmit traffic concurrently performs a lockless lookup of that entry. The race can cause the transmit path to read a struct mlx5_fs_id after it has been freed.
Is the receive path implicated?
The described race is in the MACsec transmit path, specifically TX SCI-table lookups used by mlx5e_macsec_handle_tx_skb() and mlx5e_macsec_tx_build_eseg(). The provided information does not identify a receive-path issue.
What code change resolves the lifetime problem?
The resolved implementation adds an rcu_head to struct mlx5_fs_id and defers freeing it with kfree_rcu() after removal from the rhashtable. This allows readers already holding an RCU read lock to finish before the object is released.