CVE-2024-58237

bpf: consider that tail calls invalidate packet pointers

MEDIUM
5.5
CVSS Score
Published: May 5, 2025 at 02:53 PM UTC
Updated: October 15, 2026 at 10:18 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: consider that tail calls invalidate packet pointers Tail-called programs could execute any of the helpers that invalidate packet pointers. Hence, conservatively assume that each tail call invalidates packet pointers. Making the change in bpf_helper_changes_pkt_data() automatically makes use of check_cfg() logic that computes 'changes_pkt_data' effect for global sub-programs, such that the following program could be rejected: int tail_call(struct __sk_buff *sk) { bpf_tail_call_static(sk, &jmp_table, 0); return 0; } SEC("tc") int not_safe(struct __sk_buff *sk) { int *p = (void *)(long)sk->data; ... make p valid ... tail_call(sk); *p = 42; /* this is unsafe */ ... } The tc_bpf2bpf.c:subprog_tc() needs change: mark it as a function that can invalidate packet pointers. Otherwise, it can't be freplaced with tailcall_freplace.c:entry_freplace() that does a tail call.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.6 ≤ v < 6.6.906.7 ≤ v < 6.12.951c39bb1d5d105a02e29aa7960f0a395086e63426.136.13 rc16.13 rc2
Vendor states this is fixed in 1a4607ffba35bf2a630aab299e34dd3f6e658d70 (fixed)
Vendor states this is fixed in 1c2244437f9ad3dd91215f920401a14f2542dbfc (fixed)
Vendor states this is fixed in f1692ee23dcaaddc24ba407b269707ee5df1301f (fixed)
Vendor states this is fixed in 5.6 (unaffected)
Vendor states this is fixed in 6.12.9 (unaffected)
Vendor states this is fixed in 6.13 (unaffected)
Vendor states this is fixed in 6.6.90 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1a4607ffba35bf2a630aab299e34dd3f6e658d70
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1c2244437f9ad3dd91215f920401a14f2542dbfc
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f1692ee23dcaaddc24ba407b269707ee5df1301f

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card