CVE-2024-46764 bpf: add check for invalid name in btf_name_valid_section()

High 7.3 Published Updated

An out-of-bounds read in the Linux kernel BPF subsystem allows attackers to disclose memory or cause a denial of service via crafted BTF names.

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

CVE-2024-46764 is a high-severity memory corruption vulnerability in Linux kernel, published on 18 Sep 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: add check for invalid name in btf_name_valid_section()

If the length of the name string is 1 and the value of name[0] is NULL byte, an OOB vulnerability occurs in btf_name_valid_section() and the return value is true, so the invalid name passes the check.

To solve this, you need to check if the first position is NULL byte and if the first character is printable.

Weakness: CWE-125

Which versions are affected by CVE-2024-46764?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-46764?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2024-46764 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-46764, DEBIAN-CVE-2024-46764, GHSA-324v-cwrv-qmqr, UBUNTU-CVE-2024-46764.

Is CVE-2024-46764 in your software?

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

Check your SBOMs for free