CVE-2024-58237CWE-476

CVE-2024-58237

High · published May 5, 2025

CVSS v3.1
7.8
EPSS
0%
Percentile
8.8
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00196 · 8.8th percentile
Weakness
CWE-476 · NULL Pointer Dereference
Published
2025-05-05T19:15Z
Affected products (4)
ProductVersionsFixed in
linux/linux_kernel≥ 5.6, < 6.6.906.6.90
linux/linux_kernel≥ 6.7, < 6.12.96.12.9
linux/linux_kernelall versions—
linux/linux_kernelall versions—
References (3)
EPSS history
Timeline
  • 05 MAY 14:53Z
    bpf: consider that tail calls invalidate packet pointers
    cvelistv5