CVE-2026-23319

Source
https://cve.org/CVERecord?id=CVE-2026-23319
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-23319.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-23319
Downstream
Published
2026-03-25T10:27:13.678Z
Modified
2026-04-14T03:48:38.819195Z
Summary
bpf: Fix a UAF issue in bpf_trampoline_link_cgroup_shim
Details

In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix a UAF issue in bpftrampolinelinkcgroupshim

The root cause of this bug is that when 'bpflinkput' reduces the refcount of 'shimlink->link.link' to zero, the resource is considered released but may still be referenced via 'tr->progshlist' in 'cgroupshimfind'. The actual cleanup of 'tr->progshlist' in 'bpfshimtramplinkrelease' is deferred. During this window, another process can cause a use-after-free via 'bpftrampolinelinkcgroup_shim'.

Based on Martin KaFai Lau's suggestions, I have created a simple patch.

To fix this: Add an atomic non-zero check in 'bpftrampolinelinkcgroupshim'. Only increment the refcount if it is not already zero.

Testing: I verified the fix by adding a delay in 'bpfshimtramplinkrelease' to make the bug easier to trigger:

static void bpfshimtramplinkrelease(struct bpflink link) { / ... */ if (!shimlink->trampoline) return;

  • msleep(100); WARNONONCE(bpftrampolineunlinkprog(&shimlink->link, shimlink->trampoline, NULL)); bpftrampolineput(shimlink->trampoline); }

Before the patch, running a PoC easily reproduced the crash(almost 100%) with a call trace similar to KaiyanM's report. After the patch, the bug no longer occurs even after millions of iterations.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23319.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e
Fixed
529e685e522b9d7fb379dbe6929dcdf520e34c8c
Fixed
9b02c5c4147f8af8ed783c8deb5df927a55c3951
Fixed
cfcfa0ca0212162aa472551266038e8fd6768cff
Fixed
3eeddb80191f7626ec1ef742bfff51ec3b0fa5c2
Fixed
4e8a0005d633a4adc98e3b65d5080f93b90d356b
Fixed
56145d237385ca0e7ca9ff7b226aaf2eb8ef368b

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-23319.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.0.0
Fixed
6.1.167
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.130
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.77
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.17
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
6.19.7

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-23319.json"