{"id":"CVE-2024-58237","published":"2025-05-05T14:53:34Z","modified":"2026-10-15T21:51:51Z","title":"bpf: consider that tail calls invalidate packet pointers","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: consider that tail calls invalidate packet pointers\n\nTail-called programs could execute any of the helpers that invalidate\npacket pointers. Hence, conservatively assume that each tail call\ninvalidates packet pointers.\n\nMaking the change in bpf_helper_changes_pkt_data() automatically makes\nuse of check_cfg() logic that computes 'changes_pkt_data' effect for\nglobal sub-programs, such that the following program could be\nrejected:\n\n    int tail_call(struct __sk_buff *sk)\n    {\n    \tbpf_tail_call_static(sk, &jmp_table, 0);\n    \treturn 0;\n    }\n\n    SEC(\"tc\")\n    int not_safe(struct __sk_buff *sk)\n    {\n    \tint *p = (void *)(long)sk->data;\n    \t... make p valid ...\n    \ttail_call(sk);\n    \t*p = 42; /* this is unsafe */\n    \t...\n    }\n\nThe tc_bpf2bpf.c:subprog_tc() needs change: mark it as a function that\ncan invalidate packet pointers. Otherwise, it can't be freplaced with\ntailcall_freplace.c:entry_freplace() that does a tail call.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00195,"percentile":0.09325,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/f1692ee23dcaaddc24ba407b269707ee5df1301f","tags":[]},{"url":"https://git.kernel.org/stable/c/1c2244437f9ad3dd91215f920401a14f2542dbfc","tags":[]},{"url":"https://git.kernel.org/stable/c/1a4607ffba35bf2a630aab299e34dd3f6e658d70","tags":[]}],"priority":{"score":7.3,"factors":[{"name":"EPSS percentile","points":1.86},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 51c39bb1d5d105a02e29aa7960f0a395086e6342, < f1692ee23dcaaddc24ba407b269707ee5df1301f",">= 51c39bb1d5d105a02e29aa7960f0a395086e6342, < 1c2244437f9ad3dd91215f920401a14f2542dbfc",">= 51c39bb1d5d105a02e29aa7960f0a395086e6342, < 1a4607ffba35bf2a630aab299e34dd3f6e658d70"]},{"vendor":"Linux","product":"Linux","versions":["5.6"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-10-15T21:42:22.906486Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-13373","exploited":false,"provenance":"source"}}