# CVE-2025-21800: net/mlx5: HWS, fix definer's HWS_SET32 macro for negative offset

- 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.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2025-02-27T20:00:54.884Z
- Modified: 2026-06-17T08:44:18.730Z
- Assigned by: Linux

## Description

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

net/mlx5: HWS, fix definer's HWS_SET32 macro for negative offset

When bit offset for HWS_SET32 macro is negative,
UBSAN complains about the shift-out-of-bounds:

  UBSAN: shift-out-of-bounds in
  drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c:177:2
  shift exponent -8 is negative

(As written by CVE List.)

## Affected

- Linux Linux: from 74a778b4a63faef9ff02aad0d332b209835f93e1 before 92cff996624c4757d5bbace3dfa3f1567ba94143; from 74a778b4a63faef9ff02aad0d332b209835f93e1 before 69c676c0ded472713e6d1b3a456b3c4f52f66f0e; from 74a778b4a63faef9ff02aad0d332b209835f93e1 before be482f1d10da781db9445d2753c1e3f1fd82babf; 6.12 (not affected: before 6.12; from 6.12.13 up to 6.12.*; from 6.13.2 up to 6.13.*; from 6.14 up to *)
- linux linux_kernel: from 6.12 before 6.12.13; from 6.13 before 6.13.2

## References

- <https://git.kernel.org/stable/c/92cff996624c4757d5bbace3dfa3f1567ba94143> (patch)
- <https://git.kernel.org/stable/c/69c676c0ded472713e6d1b3a456b3c4f52f66f0e> (patch)
- <https://git.kernel.org/stable/c/be482f1d10da781db9445d2753c1e3f1fd82babf> (patch)

## Sources

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

---

Page: https://cve.day/CVE-2025-21800 · Whole record: https://cve.day/CVE-2025-21800.json · Rebuilt by cve.day 2026-11-25T22:58:54.603Z
