# CVE-2024-40940: net/mlx5: Fix tainted pointer delete is case of flow rules creation fail

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Published: 2024-07-12T12:25:15.808Z
- Modified: 2026-06-17T07:46:54.903Z
- Weaknesses: CWE-415
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

net/mlx5: Fix tainted pointer delete is case of flow rules creation fail

In case of flow rule creation fail in mlx5_lag_create_port_sel_table(),
instead of previously created rules, the tainted pointer is deleted
deveral times.
Fix this bug by using correct flow rules pointers.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

(As written by CVE List.)

## Affected

- Linux Linux: from 352899f384d4aefa77ede6310d08c1b515612a8f before 531eab2da27dd42d68dfb841d82e987f4a6738b8; from 352899f384d4aefa77ede6310d08c1b515612a8f before d857df86837ac1c30592e8a068204d16feac9930; from 352899f384d4aefa77ede6310d08c1b515612a8f before a03a3fa12769e25f4385bee587afe1445aee7f7a; from 352899f384d4aefa77ede6310d08c1b515612a8f before 229bedbf62b13af5aba6525ad10b62ad38d9ccb5; 5.19 (not affected: before 5.19; from 6.1.95 up to 6.1.*; from 6.6.35 up to 6.6.*; from 6.9.6 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: from 5.19 before 6.1.95; from 6.2 before 6.6.35; from 6.7 before 6.9.6; 6.10

## References

- <https://git.kernel.org/stable/c/531eab2da27dd42d68dfb841d82e987f4a6738b8> (patch)
- <https://git.kernel.org/stable/c/d857df86837ac1c30592e8a068204d16feac9930> (patch)
- <https://git.kernel.org/stable/c/a03a3fa12769e25f4385bee587afe1445aee7f7a> (patch)
- <https://git.kernel.org/stable/c/229bedbf62b13af5aba6525ad10b62ad38d9ccb5> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

- CVE List: [CVE-2024-40940](https://www.cve.org/CVERecord?id=CVE-2024-40940), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-40940](https://nvd.nist.gov/vuln/detail/CVE-2024-40940), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-40940 · Whole record: https://cve.day/CVE-2024-40940.json · Rebuilt by cve.day 2026-11-25T22:58:42.849Z
