{"id":"CVE-2026-23319","aliases":["CVE-2026-23319"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Fix a UAF issue in bpf_trampoline_link_cgroup_shim","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix a UAF issue in bpf_trampoline_link_cgroup_shim\n\nThe root cause of this bug is that when 'bpf_link_put' reduces the\nrefcount of 'shim_link->link.link' to zero, the resource is considered\nreleased but may still be referenced via 'tr->progs_hlist' in\n'cgroup_shim_find'. The actual cleanup of 'tr->progs_hlist' in\n'bpf_shim_tramp_link_release' is deferred. During this window, another\nprocess can cause a use-after-free via 'bpf_trampoline_link_cgroup_shim'.\n\nBased on Martin KaFai Lau's suggestions, I have created a simple patch.\n\nTo fix this:\n   Add an atomic non-zero check in 'bpf_trampoline_link_cgroup_shim'.\n   Only increment the refcount if it is not already zero.\n\nTesting:\n   I verified the fix by adding a delay in\n   'bpf_shim_tramp_link_release' to make the bug easier to trigger:\n\nstatic void bpf_shim_tramp_link_release(struct bpf_link *link)\n{\n\t/* ... */\n\tif (!shim_link->trampoline)\n\t\treturn;\n\n+\tmsleep(100);\n\tWARN_ON_ONCE(bpf_trampoline_unlink_prog(&shim_link->link,\n\t\tshim_link->trampoline, NULL));\n\tbpf_trampoline_put(shim_link->trampoline);\n}\n\nBefore the patch, running a PoC easily reproduced the crash(almost 100%)\nwith a call trace similar to KaiyanM's report.\nAfter the patch, the bug no longer occurs even after millions of\niterations.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix a UAF issue in bpf_trampoline_link_cgroup_shim\n\nThe root cause of this bug is that when 'bpf_link_put' reduces the\nrefcount of 'shim_link->link.link' to zero, the resource is considered\nreleased but may still be referenced via 'tr->progs_hlist' in\n'cgroup_shim_find'. The actual cleanup of 'tr->progs_hlist' in\n'bpf_shim_tramp_link_release' is deferred. During this window, another\nprocess can cause a use-after-free via 'bpf_trampoline_link_cgroup_shim'.\n\nBased on Martin KaFai Lau's suggestions, I have created a simple patch.\n\nTo fix this:\n   Add an atomic non-zero check in 'bpf_trampoline_link_cgroup_shim'.\n   Only increment the refcount if it is not already zero.\n\nTesting:\n   I verified the fix by adding a delay in\n   'bpf_shim_tramp_link_release' to make the bug easier to trigger:\n\nstatic void bpf_shim_tramp_link_release(struct bpf_link *link)\n{\n\t/* ... */\n\tif (!shim_link->trampoline)\n\t\treturn;\n\n+\tmsleep(100);\n\tWARN_ON_ONCE(bpf_trampoline_unlink_prog(&shim_link->link,\n\t\tshim_link->trampoline, NULL));\n\tbpf_trampoline_put(shim_link->trampoline);\n}\n\nBefore the patch, running a PoC easily reproduced the crash(almost 100%)\nwith a call trace similar to KaiyanM's report.\nAfter the patch, the bug no longer occurs even after millions of\niterations.","source":"cvelist"},{"lang":"es","text":"En el núcleo de Linux, se ha solucionado la siguiente vulnerabilidad: bpf: Corrección de un problema de UAF en bpf_trampoline_link_cgroup_shim. La causa principal de este error es que, cuando «bpf_link_put» reduce a cero el contador de referencias de «shim_link-&gt;link.link», el recurso se considera liberado, pero aún puede ser referenciado a través de «tr-&gt;progs_hlist» en «cgroup_shim_find». La limpieza real de «tr-&gt;progs_hlist» en «bpf_shim_tramp_link_release» se aplaza. Durante este intervalo, otro proceso puede provocar un uso después de la liberación a través de «bpf_trampoline_link_cgroup_shim». Basándome en las sugerencias de Martin KaFai Lau, he creado un parche sencillo. Para solucionar esto: añadir una comprobación atómica de que no sea cero en «bpf_trampoline_link_cgroup_shim». Solo incrementar el contador de referencias si aún no es cero. Pruebas: He verificado la corrección añadiendo un retraso en «bpf_shim_tramp_link_release» para que el error sea más fácil de provocar: static void bpf_shim_tramp_link_release(struct bpf_link *link) { /* ... */ if (!shim_link-&gt;trampoline) return; + msleep(100); WARN_ON_ONCE(bpf_trampoline_unlink_prog(&amp;shim_link-&gt;link, shim_link-&gt;trampoline, NULL)); bpf_trampoline_put(shim_link-&gt;trampoline); } Antes del parche, al ejecutar un PoC se reproducía fácilmente el bloqueo (casi al 100 %) con un seguimiento de llamadas similar al del informe de KaiyanM. Tras el parche, el error ya no se produce ni siquiera tras millones de iteraciones.","source":"nvd"}],"published":"2026-03-25T10:27:13.678Z","modified":"2026-11-10T13:18:40.110Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e","fixed":"529e685e522b9d7fb379dbe6929dcdf520e34c8c","status":"affected"},{"type":"git","introduced":"69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e","fixed":"9b02c5c4147f8af8ed783c8deb5df927a55c3951","status":"affected"},{"type":"git","introduced":"69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e","fixed":"cfcfa0ca0212162aa472551266038e8fd6768cff","status":"affected"},{"type":"git","introduced":"69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e","fixed":"3eeddb80191f7626ec1ef742bfff51ec3b0fa5c2","status":"affected"},{"type":"git","introduced":"69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e","fixed":"4e8a0005d633a4adc98e3b65d5080f93b90d356b","status":"affected"},{"type":"git","introduced":"69fd337a975c7e690dfe49d9cb4fe5ba1e6db44e","fixed":"56145d237385ca0e7ca9ff7b226aaf2eb8ef368b","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.0","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.0","status":"unaffected"},{"type":"semver","introduced":"6.1.167","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.130","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.77","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.17","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.7","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.0.1","fixed":"6.1.167"},{"status":"affected","introduced":"6.2","fixed":"6.6.130"},{"status":"affected","introduced":"6.7","fixed":"6.12.77"},{"status":"affected","introduced":"6.13","fixed":"6.18.17"},{"status":"affected","introduced":"6.19","fixed":"6.19.7"},{"status":"affected","version":"6.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/529e685e522b9d7fb379dbe6929dcdf520e34c8c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9b02c5c4147f8af8ed783c8deb5df927a55c3951","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cfcfa0ca0212162aa472551266038e8fd6768cff","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3eeddb80191f7626ec1ef742bfff51ec3b0fa5c2","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4e8a0005d633a4adc98e3b65d5080f93b90d356b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/56145d237385ca0e7ca9ff7b226aaf2eb8ef368b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-23319","url":"https://www.cve.org/CVERecord?id=CVE-2026-23319","licence":"CVE Terms of Use","modified":"2026-11-10T12:42:30.476Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-23319","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23319","licence":"Public domain","modified":"2026-11-10T13:18:40.110Z"}],"updatedAt":"2026-11-25T22:59:16.668Z","epss":{"score":0.00207,"percentile":0.06137,"date":"2026-11-30T12:00:22.000Z"}}