# CVE-2025-39834: net/mlx5: HWS, Fix memory leak in hws_action_get_shared_stc_nic error flow

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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.19%, higher than 9% of CVEs (2026-12-01)
- Published: 2025-09-16T13:08:50.896Z
- Modified: 2026-10-21T13:18:14.880Z
- Weaknesses: CWE-401
- 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: HWS, Fix memory leak in hws_action_get_shared_stc_nic error flow

When an invalid stc_type is provided, the function allocates memory for
shared_stc but jumps to unlock_and_out without freeing it, causing a
memory leak.

Fix by jumping to free_shared_stc label instead to ensure proper cleanup.

(As written by CVE List.)

## Affected

- Linux Linux: from 504e536d90104c850731840d3fbc95acf251f11b before a2751e1af5dc8b1a64cfd463576c58617c2573ac; from 504e536d90104c850731840d3fbc95acf251f11b before 051fd8576a2e4e95d5870c5c9f8679c5b16882e4; from 504e536d90104c850731840d3fbc95acf251f11b before a630f83592cdad1253523a1b760cfe78fef6cd9c; 6.12 (not affected: before 6.12; from 6.12.114 up to 6.12.*; from 6.16.5 up to 6.16.*; from 6.17 up to *)
- linux linux_kernel: from 6.12 before 6.16.5; 6.17

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/a2751e1af5dc8b1a64cfd463576c58617c2573ac>
- <https://git.kernel.org/stable/c/051fd8576a2e4e95d5870c5c9f8679c5b16882e4> (patch)
- <https://git.kernel.org/stable/c/a630f83592cdad1253523a1b760cfe78fef6cd9c> (patch)

## Sources

- CVE List: [CVE-2025-39834](https://www.cve.org/CVERecord?id=CVE-2025-39834), CVE Terms of Use, modified 2026-10-21
- NVD: [CVE-2025-39834](https://nvd.nist.gov/vuln/detail/CVE-2025-39834), Public domain, modified 2026-10-21

---

Page: https://cve.day/CVE-2025-39834 · Whole record: https://cve.day/CVE-2025-39834.json · Rebuilt by cve.day 2026-11-25T22:59:04.739Z
