CVE-2023-52997 ipv4: prevent potential spectre v1 gadget in ip_metrics_convert()

Medium 5.5 Published Updated

A Spectre v1 gadget in the Linux kernel IPv4 metrics conversion allows attackers to leak kernel memory content via speculative execution.

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-52997?

CVE-2023-52997 is a medium-severity vulnerability in Linux kernel, published on 27 Mar 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:

ipv4: prevent potential spectre v1 gadget in ip_metrics_convert()

if (!type) continue; if (type > RTAX_MAX) return -EINVAL; ... metrics[type - 1] = val;

@type being used as an array index, we need to prevent cpu speculation or risk leaking kernel memory content.

Which versions are affected by CVE-2023-52997?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52997?

Apply the vendor's patch.

Is CVE-2023-52997 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52997, DEBIAN-CVE-2023-52997, GHSA-f436-rh44-wfp7, UBUNTU-CVE-2023-52997.

Is CVE-2023-52997 in your software?

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

Check your SBOMs for free