bpf: Skip detached progs in trampoline images that are still in use
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: ? 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 p
CVE-2026-98799
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-98799
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "e21aa341785c679dd409c8cb71f864c00fe6c463",
"lessThan": "967566ad325b42150483e81acb09ea9d800c00b8",
"versionType": "git"
},
{
"status": "affected",
"version": "e21aa341785c679dd409c8cb71f864c00fe6c463",
"lessThan": "17637e1a581a22466ac3620a91e099683ff9cc6f",
"versionType": "git"
},
{
"status": "affected",
"version": "e21d2b92354b3cd25dd774ebb0f0e52ff04a7861",
"versionType": "git"
},
{
"status": "affected",
"version": "85d177f56e5256e14b74a65940f981f6e3e8bb32",
"versionType": "git"
},
{
"status": "affected",
"version": "5.10.28",
"lessThan": "5.11",
"versionType": "semver"
},
{
"status": "affected",
"version": "5.11.11",
"lessThan": "5.12",
"versionType": "semver"
}
],
"programFiles": [
"arch/arm64/net/bpf_jit_comp.c",
"arch/loongarch/net/bpf_jit.c",
"arch/powerpc/net/bpf_jit_comp.c",
"arch/riscv/net/bpf_jit_comp64.c",
"arch/s390/net/bpf_jit_comp.c",
"arch/x86/net/bpf_jit_comp.c",
"include/linux/bpf.h",
"kernel/bpf/trampoline.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "5.12"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "5.12",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "7.2.10",
"versionType": "semver",
"lessThanOrEqual": "7.2.*"
},
{
"status": "unaffected",
"version": "7.3",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"arch/arm64/net/bpf_jit_comp.c",
"arch/loongarch/net/bpf_jit.c",
"arch/powerpc/net/bpf_jit_comp.c",
"arch/riscv/net/bpf_jit_comp64.c",
"arch/s390/net/bpf_jit_comp.c",
"arch/x86/net/bpf_jit_comp.c",
"include/linux/bpf.h",
"kernel/bpf/trampoline.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-98799
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #38723 · Revision 1
- Added to Heist Feed
- Publisher date