LinuxのLinux Kernelにおける解放済みメモリの使用に関する脆弱性
タイトル LinuxのLinux Kernelにおける解放済みメモリの使用に関する脆弱性
概要

Linuxカーネルにおいて、以下の脆弱性が修正されました。bpf_trampoline_link_cgroup_shimにおけるUse-After-Free(UAF)問題が修正されました。このバグの根本原因は、'bpf_link_put'が'shim_link-link.link'の参照カウントをゼロに減らしたときにリソースを解放済みとみなす一方で、'cgroup_shim_find'内の'tr-progs_hlist'を介して依然として参照される可能性があることにあります。実際の'tr-progs_hlist'のクリーンアップは'bpf_shim_tramp_link_release'で遅延されます。この間に別のプロセスが'bpf_trampoline_link_cgroup_shim'を介してUse-After-Freeを引き起こす可能性があります。Martin KaFai Lauの提案に基づき、簡単なパッチが作成されました。修正内容は、'bpf_trampoline_link_cgroup_shim'で非ゼロの原子チェックを追加し、参照カウントがすでにゼロでない場合のみインクリメントすることです。テストでは、バグのトリガーを容易にするために'bpf_shim_tramp_link_release'に遅延(msleep(100))を挿入し、PoCを実行するとパッチ適用前はほぼ100%の確率でクラッシュが再現され、パッチ適用後は数百万回の反復実行後もバグが発生しなくなりました。

想定される影響 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
対策

リリース情報、またはパッチ情報が公開されています。参考情報を参照して適切な対策を実施してください。

公表日 2026年3月25日0:00
登録日 2026年4月27日11:26
最終更新日 2026年4月27日11:26
CVSS3.0 : 重要
スコア 7.8
ベクター CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
影響を受けるシステム
Linux
Linux Kernel 6.0
Linux Kernel 6.0.1 以上 6.1.167 未満
Linux Kernel 6.13 以上 6.18.17 未満
Linux Kernel 6.19 以上 6.19.7 未満
Linux Kernel 6.2 以上 6.6.130 未満
Linux Kernel 6.7 以上 6.12.77 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年04月27日]
  掲載
2026年4月27日11:26

NVD脆弱性情報
CVE-2026-23319
概要

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

bpf: Fix a UAF issue in bpf_trampoline_link_cgroup_shim

The root cause of this bug is that when 'bpf_link_put' reduces the
refcount of 'shim_link->link.link' to zero, the resource is considered
released but may still be referenced via 'tr->progs_hlist' in
'cgroup_shim_find'. The actual cleanup of 'tr->progs_hlist' in
'bpf_shim_tramp_link_release' is deferred. During this window, another
process can cause a use-after-free via 'bpf_trampoline_link_cgroup_shim'.

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

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

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

static void bpf_shim_tramp_link_release(struct bpf_link *link)
{
/* ... */
if (!shim_link->trampoline)
return;

+ msleep(100);
WARN_ON_ONCE(bpf_trampoline_unlink_prog(&shim_link->link,
shim_link->trampoline, NULL));
bpf_trampoline_put(shim_link->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.

概要

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->link.link», el recurso se considera liberado, pero aún puede ser referenciado a través de «tr->progs_hlist» en «cgroup_shim_find». La limpieza real de «tr->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->trampoline) return; + msleep(100); WARN_ON_ONCE(bpf_trampoline_unlink_prog(&shim_link->link, shim_link->trampoline, NULL)); bpf_trampoline_put(shim_link->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.

公表日 2026年3月25日20:16
登録日 2026年4月27日12:18
最終更新日 2026年4月24日6:05
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.0.1 6.1.167
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2 6.6.130
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 6.12.77
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.13 6.18.17
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.19 6.19.7
cpe:2.3:o:linux:linux_kernel:6.0:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:*
関連情報、対策とツール
共通脆弱性一覧