{"id":"CVE-2024-42151","summary":"bpf: mark bpf_dummy_struct_ops.test_1 parameter as nullable","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: mark bpf_dummy_struct_ops.test_1 parameter as nullable\n\nTest case dummy_st_ops/dummy_init_ret_value passes NULL as the first\nparameter of the test_1() function. Mark this parameter as nullable to\nmake verifier aware of such possibility.\nOtherwise, NULL check in the test_1() code:\n\n      SEC(\"struct_ops/test_1\")\n      int BPF_PROG(test_1, struct bpf_dummy_ops_state *state)\n      {\n            if (!state)\n                    return ...;\n\n            ... access state ...\n      }\n\nMight be removed by verifier, thus triggering NULL pointer dereference\nunder certain conditions.","modified":"2026-04-02T12:17:51.144098Z","published":"2024-07-30T07:46:43.969Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42151.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/1479eaff1f16983d8fda7c5a08a586c21891087d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7f79097b0de97a486b137b750d7dd7b20b519d23"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42151.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42151"},{"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":"2cd3e3772e41377f32d6eea643e0590774e9187c"},{"fixed":"7f79097b0de97a486b137b750d7dd7b20b519d23"},{"fixed":"1479eaff1f16983d8fda7c5a08a586c21891087d"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42151.json"}}],"schema_version":"1.7.5"}