CVE-2024-35905 bpf: Protect against int overflow for stack access size

High 7.8 Published Updated

An integer overflow in the Linux kernel BPF verifier allows out-of-bounds memory access, potentially leading to code execution or privilege escalation.

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

CVE-2024-35905 is a high-severity vulnerability in Debian Debian Linux, published on 19 May 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:

bpf: Protect against int overflow for stack access size

This patch re-introduces protection against the size of access to stack memory being negative; the access size can appear negative as a result of overflowing its signed int representation. This should not actually happen, as there are other protections along the way, but we should protect against it anyway. One code path was missing such protections (fixed in the previous patch in the series), causing out-of-bounds array accesses in check_stack_range_initialized(). This patch causes the verification of a program with such a non-sensical access size to fail.

This check used to exist in a more indirect way, but was inadvertendly removed in a833a17aeac7.

Weakness: CWE-190, CWE-129

Which versions are affected by CVE-2024-35905?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2024-35905?

Apply the vendor's patch.

Is CVE-2024-35905 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as BELL-CVE-2024-35905, DEBIAN-CVE-2024-35905, GHSA-2m8j-fx85-xvhm, UBUNTU-CVE-2024-35905.

Is CVE-2024-35905 in your software?

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

Check your SBOMs for free