CVE-2024-56638 netfilter: nft_inner: incorrect percpu area handling under softirq

High 7.8 Published Updated

A race condition in Linux kernel netfilter allows softirqs to corrupt percpu data, potentially causing system crashes or instability.

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-2024-56638?

CVE-2024-56638 is a high-severity vulnerability in Linux kernel, published on 27 Dec 2024. 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:

netfilter: nft_inner: incorrect percpu area handling under softirq

Softirq can interrupt ongoing packet from process context that is walking over the percpu area that contains inner header offsets.

Disable bh and perform three checks before restoring the percpu inner header offsets to validate that the percpu area is valid for this skbuff:

1) If the NFT_PKTINFO_INNER_FULL flag is set on, then this skbuff has already been parsed before for inner header fetching to register.

2) Validate that the percpu area refers to this skbuff using the skbuff pointer as a cookie. If there is a cookie mismatch, then this skbuff needs to be parsed again.

3) Finally, validate if the percpu area refers to this tunnel type.

Only after these three checks the percpu area is restored to a on-stack copy and bh is enabled again.

After inner header fetching, the on-stack copy is stored back to the percpu area.

Which versions are affected by CVE-2024-56638?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-56638?

Apply the vendor's patch.

Is CVE-2024-56638 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-56638, DEBIAN-CVE-2024-56638, GHSA-7g3g-qg84-qxww, UBUNTU-CVE-2024-56638.

Is CVE-2024-56638 in your software?

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

Check your SBOMs for free