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

High 7.8 Published Updated

A negative bit offset in the mlx5 HWS definer macro causes a shift-out-of-bounds error, potentially leading to a kernel crash or denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-21800?

CVE-2025-21800 is a high-severity vulnerability in Linux kernel, published on 27 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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

Which versions are affected by CVE-2025-21800?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21800?

Apply the vendor's patch.

Is CVE-2025-21800 being exploited?

There is no known exploitation of CVE-2025-21800 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21800, DEBIAN-CVE-2025-21800, GHSA-5r9q-cj6r-c6jj, UBUNTU-CVE-2025-21800.

Is CVE-2025-21800 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free