CVE-2026-98799
Received Received - Intake

Use-After-Free in Linux Kernel BPF Trampoline

Vulnerability report for CVE-2026-98799, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-18

Last updated on: 2026-10-18

Assigner: kernel.org

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Skip detached progs in trampoline images that are still in use bpf_tramp_image_put() makes sure a trampoline image is not freed while a task may still be running in it, but nothing similar is done for the progs called by that image. Detach drops the last prog reference right away and the prog is freed after grace periods, on the basis that a task still in the traced function skips the fexit progs once the nop at ip_after_call is patched to a jump. That leaves out a task sleeping in a sleepable prog that runs before the detached one, which no grace period waits for: CPU 0 CPU 1 in image I, sleeping in prog S detach P from I's trampoline -> new image, bpf_tramp_image_put(I) bpf_prog_put(P), last ref grace periods, P freed back from S __bpf_prog_enter(P) call P->bpf_func If S and P are fexit progs the task is already past the patched jump, and fentry only images don't have one. On x86 this is an int3 in poisoned bpf_prog_pack memory: Oops: int3: 0000 [#1] SMP NOPTI CPU: 18 UID: 0 PID: 94573 Comm: x169 Not tainted 6.18.44 #1 PREEMPT(lazy) RIP: 0010:0xffffffffc0601d8d Call Trace: <TASK> ? bpf_trampoline_6442515411+0x1a4/0x21b bpf_lsm_bprm_committed_creds+0x5/0x10 security_bprm_committed_creds+0x5f/0x70 begin_new_exec+0x2d6/0x410 ... We hit this in production when progs attached through trampolines got detached while their hooks were busy, and it was independently found with a fuzzer and KASAN. Have the JITs emit a patchable nop in front of each prog call sequence and record it in the image. When a prog is detached, patch its nop to a jump over the call sequence. Progs that stay attached keep running for the tasks that are in the image, and ip_after_call isn't needed anymore. The task can be in any image that isn't freed yet, not only in the current one. It sleeps in image I1 that calls S, P and Q, then P is detached and the trampoline moves to image I2, then Q is detached and its call is still in I1. So the trampoline keeps a list of its images until they are freed, and detaching a prog patches its nop in all of them. Images hold a reference on the trampoline for that long. On riscv and loongarch a jump of any range takes several instructions, and a task preempted in the middle of them could resume into half of the new sequence. The nop is a single instruction there, patched to a near branch through arch_bpf_trampoline_skip(). With the extra nops, BPF_MAX_TRAMP_LINKS progs no longer fit in a page on x86 and arm64 (and already didn't on powerpc), so lower the limit there like s390 does.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-18
Last Modified
2026-10-18
Generated
2026-10-18
AI Q&A
2026-10-18
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 7 associated CPEs
Vendor Product Version / Range
Linux Linux e21aa341785c679dd409c8cb71f864c00fe6c463
Linux Linux e21aa341785c679dd409c8cb71f864c00fe6c463
Linux Linux e21d2b92354b3cd25dd774ebb0f0e52ff04a7861
Linux Linux 85d177f56e5256e14b74a65940f981f6e3e8bb32
Linux Linux 5.10.28
Linux Linux 5.11.11
Linux Linux 5.12

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability in the Linux kernel involves a race condition in BPF (Berkeley Packet Filter) trampoline images. When a BPF program is detached from a trampoline while a task is still executing within it, the program may be freed prematurely. This can lead to a use-after-free scenario where the task attempts to execute code in freed memory, causing a kernel crash (oops). The issue arises because detached programs are not properly tracked for ongoing tasks, especially when tasks are sleeping in sleepable programs.

Detection Guidance

This vulnerability is specific to the Linux kernel's BPF (Berkeley Packet Filter) subsystem and requires kernel-level inspection. Detection involves checking for kernel oops or crashes related to BPF trampoline usage, particularly when BPF programs are detached while tasks are still executing in them. Monitor kernel logs for INT3 (breakpoint) errors or crashes in BPF-related functions.

Impact Analysis

This vulnerability can cause system instability, including kernel crashes (oops) and potential denial-of-service conditions. If exploited, it may allow an attacker to trigger a crash by manipulating BPF programs attached to trampolines. Systems relying on BPF for security or monitoring could be affected, leading to disruptions in critical services.

Mitigation Strategies

Apply the kernel patch that introduces patchable nops before BPF program call sequences and ensures proper cleanup when programs are detached. Update to a fixed kernel version where this issue is resolved. Avoid detaching BPF programs while tasks are actively using them to prevent crashes.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-98799. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart