data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2024-58100 in the interactive tracker

CVE-2024-58100

bpf: check changes_pkt_data property for extension programs

7.8 EPSS 0.2% AV:L

Published 2025-05-05 (17 months ago) by the Linux kernel CNA. Subsystem include/linux. Debian urgency: not yet assigned.

What to do, per Debian release

Debian's own status for CVE-2024-58100 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source

ReleaseStatus VersionWhat this means
Debian 12bookwormvulnerable6.1.190-1No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication.
Debian 13trixiefixed6.12.25-1Update the kernel and reboot. Fixed in 6.12.25-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.12.25-1Update the kernel and reboot. Fixed in 6.12.25-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.12.25-1Update the kernel and reboot. Fixed in 6.12.25-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

When processing calls to global sub-programs, verifier decides whether to invalidate all packet pointers in current state depending on the changes_pkt_data property of the global sub-program. Because of this, an extension program replacing a global sub-program must be compatible with changes_pkt_data property of the sub-program being replaced. This commit: - adds changes_pkt_data flag to struct bpf_prog_aux: - this flag is set in check_cfg() for main sub-program; - in jit_subprogs() for other sub-programs; - modifies bpf_check_attach_btf_id() to check changes_pkt_data flag; - moves call to check_attach_btf_id() after the call to check_cfg(), because it needs changes_pkt_data flag to be set: bpf_check: ... ... - check_attach_btf_id resolve_pseudo_ldimm64 resolve_pseudo_ldimm64 --> bpf_prog_is_offloaded bpf_prog_is_offloaded check_cfg check_cfg + check_attach_btf_id ... ... The following fields are set by check_attach_btf_id(): - env->ops - prog->aux->attach_btf_trace - prog->aux->attach_func_name - prog->aux->attach_func_proto - prog->aux->dst_trampoline - prog->aux->mod - prog->aux->saved_dst_attach_type - prog->aux->saved_dst_prog_type - prog->expected_attach_type Neither of these fields are used by resolve_pseudo_ldimm64() or bpf_prog_offload_verifier_prep() (for netronome and netdevsim drivers), so the reordering is safe.

Where it lives

The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.

include/linux/bpf.h
kernel/bpf/verifier.c

What this is
BPF [CORE]MAINTAINERS section matched on include/linux/bpf* · bpf@vger.kernel.org · Maintained

Check it on the machine

grep -wE 'CONFIG_BPF|CONFIG_BPF_SYSCALL' /boot/config-$(uname -r)

Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.

Show whether Debian builds this, per release

Debian builds this code. Every release below compiles the affected file into the kernels it ships.

  • bookworm, trixie, forky, sidy
y
built into the kernel image on every flavour - only a patch removes it
Build switches
CONFIG_BPF, CONFIG_BPF_SYSCALL
Reads as
all on means the file is compiled; any one off means it is not.

From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages

Signals

Published
2025-05-05 (17 months ago)source
CVSS
7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it
Attack vector
local (AV:L)source
EPSS
0.20%, higher than 8.7% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
not yet assignedsource
Subsystem
include/linux

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
5.66.6.907197fc4acdf2
5.66.12.253846e2bea565
5.66.1381f6d0530ba0

Why the CNA scored it this way

Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source

AV:LAttack vector, local
The attack requires loading a tc/XDP program and an freplace extension program through the local bpf() syscall; a remote peer cannot supply BPF bytecode. Although the corrupting store fires when a packet traverses the tc/XDP hook, the vulnerable path is entered locally.
AC:LAttack complexity, low
Exploitation is fully deterministic — load a global subprog that does not touch packet data, replace it via freplace with one calling bpf_skb_pull_data(), and the caller's stale packet pointer is used unconditionally on the next packet. No race and no uncontrolled memory-layout condition is involved.
PR:LPrivileges required, low
BPF_PROG_TYPE_EXT is a net-admin prog type requiring CAP_BPF+CAP_NET_ADMIN, but these are routinely delegated into user namespaces via BPF tokens (BPF_F_TOKEN_FD) and are held by ordinary eBPF-based container networking workloads, so the attacker need not be root on the host.
UI:NUser interaction, none
The attacker loads and attaches both programs and can generate the triggering packet themselves (e.g. over loopback). No victim action is required.
S:UScope, unchanged
The corrupted memory is kernel heap belonging to the same kernel security authority; this is a standard local privilege escalation, not a VM/IOMMU boundary crossing.
C:HConfidentiality impact, high
The stale packet pointer reads freed/reallocated slab memory beyond the packet, and the BPF program can copy that data into a map readable from userspace, giving an arbitrary kernel-heap disclosure primitive.
I:HIntegrity impact, high
Direct packet stores through the stale pointer become use-after-free (or out-of-bounds, with skb_change_tail/xdp_adjust_tail) writes at an attacker-chosen offset with an attacker-chosen value — an arbitrary kernel write suitable for control-flow hijacking and privilege escalation.
A:HAvailability impact, high
Writing into a freed skb head corrupts slab metadata and neighbouring objects, reliably producing kernel oops/panic even when full exploitation is not achieved.