CVE-2025-21800·Kernel vulnerability
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
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.13.2
- Published
- 2025-02-27
Affected versions
From: 6.13
Until: 6.13.2
Fixed in: 6.13.2
How to fix this CVE
Update your Linux kernel to version 6.13.2 or later to fix a definer macro calculation error in the Mellanox MLX5 steering hardware offload subsystem that caused undefined behavior during shift operations. This vulnerability affects only systems with Mellanox ConnectX network adapters running affected kernel versions. Apply the kernel update through your distribution's package manager and reboot your system to activate the fix.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your kernel version: uname -r — if the output is between 6.13 and 6.13.2, your system is vulnerable
- Verify if MLX5 hardware offload is enabled: lsmod | grep mlx5 — if no output, the vulnerable component is not loaded
- Search kernel logs for UBSAN warnings related to HWS_SET32: dmesg | grep -i 'shift-out-of-bounds' or journalctl -k | grep -i 'ubsan'
- Confirm the fix was applied by running uname -r again after reboot — the version should be 6.13.2 or higher
FAQ
What is CVE-2025-21800?
CVE-2025-21800 is a kernel defect in Mellanox MLX5 driver's HWS_SET32 macro where negative bit offsets trigger undefined shift behavior, detected by UBSAN (Undefined Behavior Sanitizer) and potentially causing system instability in network steering operations.
Is CVE-2025-21800 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are available. This is a low-risk code defect rather than an active security threat.
What versions of Kernel are affected by CVE-2025-21800?
Linux kernel versions 6.13 through 6.13.1 are affected; version 6.13.2 and later contain the fix.
How do I check if my server is vulnerable to CVE-2025-21800?
Run uname -r and check if the version is 6.13.0 or 6.13.1, then verify Mellanox driver is present with lsmod | grep mlx5. If both conditions are true, your system is vulnerable.
Does Defensia detect CVE-2025-21800?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2025-21800 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-21800. Free for 1 server.
Get started free