Skip to contentSkip to conversation

CVE-2025-37939: libbpf: Fix accessing BTF.ext core_relo header

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 20, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

libbpf: Fix accessing BTF.ext core_relo header

Update btf_ext_parse_info() to ensure the core_relo header is present before reading its fields. This avoids a potential buffer read overflow reported by the OSS Fuzz project.

The Linux kernel CVE team has assigned CVE-2025-37939 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.13 with commit cf579164e9ea9cd41c7c1da931683a319d224890 and fixed in 6.13.11 with commit d529411ec44535308c5d59cbeff74be6fe14b479
	Issue introduced in 6.13 with commit cf579164e9ea9cd41c7c1da931683a319d224890 and fixed in 6.14.2 with commit 3a67f60f0a8be10cea7a884a1a00e9feb6645657
	Issue introduced in 6.13 with commit cf579164e9ea9cd41c7c1da931683a319d224890 and fixed in 6.15-rc1 with commit 0a7c2a84359612e54328aa52030eb202093da6e2

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2025-37939

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
tools/lib/bpf/btf.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/d529411ec44535308c5d59cbeff74be6fe14b479
	https://git.kernel.org/stable/c/3a67f60f0a8be10cea7a884a1a00e9feb6645657
	https://git.kernel.org/stable/c/0a7c2a84359612e54328aa52030eb202093da6e2