CVE-2026-98015: net/mlx5: E-Switch: fix use-after-free in mlx5_eswitch_termtbl_put

Published Sep 25, 2026
·
Updated

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

net/mlx5: E-Switch: fix use-after-free in mlx5eswitchtermtblput

In mlx5eswitchtermtblput(), the zero-ref cleanup check reads tt->refcount after termtblmutex has been released. Two concurrent callers on the same mlx5termtblhandle race: one decrements refcount to zero, removes the hash entry, and calls kfree(tt) while the other has already dropped the mutex and is about to evaluate if (!tt->refcount), producing a use-after-free.

Fix this by capturing the result of the decrement into a stack-local last variable before dropping the mutex. The cleanup decision is now made entirely under termtblmutex, and tt is not touched after kfree.

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 25, 2026
CVE Published
via MITRE·10:23 AM
Data Sourced
via MITRE·10:23 AM
Description

Frequently Asked Questions

1

What conditions are required to trigger the race?

Two concurrent callers must operate on the same mlx5_termtbl_handle in mlx5_eswitch_termtbl_put(). One caller can reduce the reference count to zero and free the term-table object while the other caller evaluates the reference count after releasing the mutex.

2

How can I determine whether a kernel includes the fix?

The corrected implementation stores the decrement result in a stack-local last variable before releasing termtbl_mutex, and bases cleanup on that saved result. The provided stable-kernel references identify commits containing the fix.

3

What is the immediate mitigation if a fixed kernel cannot be deployed?

No configuration workaround or operational mitigation is provided in the available information. Reducing or avoiding concurrent use of the same mlx5 term-table handle would address the described race condition, but the data does not specify a supported way to do so.

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