CVE-2023-54238 mlx5: fix skb leak while fifo resync and push

High 7.8 Published Updated

A memory leak in the mlx5 network driver can lead to resource exhaustion and denial of service during PTP resync operations.

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-2023-54238?

CVE-2023-54238 is a high-severity denial of service vulnerability in Linux, published on 30 Dec 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:

mlx5: fix skb leak while fifo resync and push

During ptp resync operation SKBs were poped from the fifo but were never freed neither by napi_consume nor by dev_kfree_skb_any. Add call to napi_consume_skb to properly free SKBs.

Another leak was happening because mlx5e_skb_fifo_has_room() had an error in the check. Comparing free running counters works well unless C promotes the types to something wider than the counter. In this case counters are u16 but the result of the substraction is promouted to int and it causes wrong result (negative value) of the check when producer have already overlapped but consumer haven't yet. Explicit cast to u16 fixes the issue.

Which versions are affected by CVE-2023-54238?

How do I fix CVE-2023-54238?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2023-54238 being exploited?

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

Sources

Also known as BELL-CVE-2023-54238, DEBIAN-CVE-2023-54238, GHSA-48xp-xhc9-g2gm, UBUNTU-CVE-2023-54238.

Is CVE-2023-54238 in your software?

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

Check your SBOMs for free