UBUNTU-CVE-2026-98378: Use After Free
In the Linux kernel, the following vulnerability has been resolved: bpf: Skip unsettled links in link iterator bpflinkprime() inserts a link into linkidr before anoninodegetfile() succeeds and before bpflinksettle() publishes the ID in link->id. bpflinkbyid() treats such an ID-zero link as unsettled, but the link iterator takes a reference without this check. If anoninodegetfile() then fails, the creator removes the ID and frees its still-private link directly. The iterator is left with a dangling reference and its next bpflinkput() accesses freed memory. Treat ID-zero entries as transient in bpflinkgetcurrornext(), just as bpflinkbyid() does. BUG: KASAN: slab-use-after-free in bpflinkput Write of size 8 by task exp/384 Call Trace: bpflinkput kernel/bpf/syscall.c:3372 bpflinkseqnext kernel/bpf/linkiter.c:33 bpfseqread kernel/bpf/bpfiter.c:158 vfsread fs/readwrite.c:572 ksysread fs/readwrite.c:716 dosyscall64 arch/x86/entry/syscall64.c:84 entrySYSCALL64afterhwframe arch/x86/entry/entry64.S:121 Kernel panic - not syncing: KASAN: paniconwarn set ...
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1
Event History
Frequently Asked Questions
What level of access is required to exploit this issue?
Exploitation requires local access and low privileges; no user interaction is required. The listed vector is AV:L/AC:L/PR:L/UI:N.
Which Ubuntu kernel package variants are listed as affected?
The affected software list includes ubuntu/linux-riscv, ubuntu/linux-realtime, ubuntu/linux-azure, ubuntu/linux-gcp, ubuntu/linux-azure-fde, ubuntu/linux-gke, ubuntu/linux-hwe-edge, and ubuntu/linux-gkeop.
What operational impact can result if the flaw is triggered?
The use-after-free can cause invalid memory access in bpf_link_put(). The supplied failure trace shows a KASAN slab-use-after-free followed by a kernel panic when panic_on_warn is set.
What evidence in system logs may indicate the issue has been triggered?
Look for KASAN reports identifying a slab-use-after-free in bpf_link_put, with stack frames including bpf_link_seq_next, bpf_seq_read, and vfs_read. A related kernel panic may be logged if KASAN panic_on_warn is enabled.