CVE-2024-38574

Source
https://cve.org/CVERecord?id=CVE-2024-38574
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-38574.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-38574
Downstream
Published
2024-06-19T13:35:39.015Z
Modified
2026-03-14T12:34:33.973673Z
Summary
libbpf: Prevent null-pointer dereference when prog to load has no BTF
Details

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

libbpf: Prevent null-pointer dereference when prog to load has no BTF

In bpfobjecload_prog(), there's no guarantee that obj->btf is non-NULL when passing it to btffd(), and this function does not perform any check before dereferencing its argument (as bpf_objectbtf_fd() used to do). As a consequence, we get segmentation fault errors in bpftool (for example) when trying to load programs that come without BTF information.

v2: Keep btffd() in the fix instead of reverting to bpf_objectbtf_fd().

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/38xxx/CVE-2024-38574.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
df7c3f7d3a3ddab31ca8cfa9b86a8729ec43fd2e
Fixed
ef80b59acfa4dee4b5eaccb15572b69248831104
Fixed
1fd91360a75833b7110af9834ae26c977e1273e0
Fixed
9bf48fa19a4b1d186e08b20bf7e5de26a15644fb

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-38574.json"