{"id":"CVE-2024-38574","summary":"libbpf: Prevent null-pointer dereference when prog to load has no BTF","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nlibbpf: Prevent null-pointer dereference when prog to load has no BTF\n\nIn bpf_objec_load_prog(), there's no guarantee that obj-\u003ebtf is non-NULL\nwhen passing it to btf__fd(), and this function does not perform any\ncheck before dereferencing its argument (as bpf_object__btf_fd() used to\ndo). As a consequence, we get segmentation fault errors in bpftool (for\nexample) when trying to load programs that come without BTF information.\n\nv2: Keep btf__fd() in the fix instead of reverting to bpf_object__btf_fd().","modified":"2026-04-02T12:16:52.292732Z","published":"2024-06-19T13:35:39.015Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/38xxx/CVE-2024-38574.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/1fd91360a75833b7110af9834ae26c977e1273e0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9bf48fa19a4b1d186e08b20bf7e5de26a15644fb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ef80b59acfa4dee4b5eaccb15572b69248831104"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/38xxx/CVE-2024-38574.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-38574"},{"type":"PACKAGE","url":"https://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"}}],"schema_version":"1.7.5"}