CVE-2026-143349: net/mlx5: macsec: free struct mlx5_fs_id after an RCU grace period

Published Dec 3, 2026
·
Updated

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

6 affected componentsFixes available
Linux Linux kernel
linux/kernel>=6.6.0<6.12.120
6.12.120
linux/kernel>=6.13.0<6.18.66
6.18.66
linux/kernel>=6.19.0<7.3.7
7.3.7
debian/linux*
debian/linux*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.120
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.66
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.7
  4. Compensating control

    Add an rcu_head to struct mlx5_fs_id and free it with kfree_rcu() so it remains valid through an RCU grace period.

Event History

Dec 3, 2026
CVE Published
via MITRE·09:22 AM
Data Sourced
via MITRE·09:22 AM
Description
Data Sourced
via OSV·09:22 AM
DescriptionAffected Software
Data Sourced
via NVD·10:18 AM
Description

Frequently Asked Questions

1

Which systems are exposed to this race condition?

Systems using the Linux kernel mlx5 MACsec transmit path are exposed when a MACsec SCI table entry can be removed while transmit processing is concurrently looking it up. The race involves lockless RCU-protected lookups of struct mlx5_fs_id entries.

2

How can I determine whether my kernel contains the vulnerable behavior?

Inspect macsec_fs_id_del() in the mlx5 MACsec code. The vulnerable implementation removes an entry with rhashtable_remove_fast() and immediately calls kfree(); the corrected implementation adds an rcu_head to struct mlx5_fs_id and frees the entry with kfree_rcu().

3

What should be changed to remediate the issue?

Use a kernel containing the referenced fixes, or apply the equivalent change to defer freeing struct mlx5_fs_id until after an RCU grace period with kfree_rcu(). This prevents transmit-path readers that obtained the entry before removal from dereferencing freed memory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203