LinuxのLinux Kernelにおける有効期限後のメモリの解放の欠如に関する脆弱性
タイトル LinuxのLinux Kernelにおける有効期限後のメモリの解放の欠如に関する脆弱性
概要

Linuxカーネルにおいて、以下の脆弱性が修正されました。net: skbにおけるKFENCEで割り当てられたskbヘッドのクロスキャッシュ解放の問題が修正されています。SKB_SMALL_HEAD_CACHE_SIZEは、一般的なkmallocバケットサイズと衝突を避けるために意図的に2の累乗ではない値(例えばx86_64では704)に設定されています。この設定により、skb_kfree_head()はskb_end_offsetを使用し、skb_small_head_cacheから割り当てられたskbヘッドと一般的なkmallocキャッシュから割り当てられたskbヘッドを確実に区別できるようになっています。しかし、KFENCEが有効な場合、kfence_ksize()はスラブバケットサイズではなく正確な要求サイズを返します。呼び出し元(例えばbpf_test_init)がkzalloc()を使ってskbヘッドデータを割り当て、要求サイズがSKB_SMALL_HEAD_CACHE_SIZEと一致した場合、slab_build_skb() - ksize()はその正確な値を返します。skb_shared_infoのオーバーヘッドを差し引くとskb_end_offsetがSKB_SMALL_HEAD_HEADROOMと一致し、skb_kfree_head()が誤ってオブジェクトを元のkmallocキャッシュではなくskb_small_head_cacheに解放します。このためスラブのクロスキャッシュ解放が発生します。現象の例として、kmem_cache_free(skbuff_small_head): Wrong slab cache. Expected skbuff_small_head but got kmalloc-1kというエラーが発生します。この問題はskb_kfree_head()で常にkfree(head)を呼び出すことで修正されました。これにより解放パスは汎用的になり、KFENCEオブジェクトに対するアロケータ固有の誤分類を回避できます。

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

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

公表日 2026年4月20日0:00
登録日 2026年5月22日10:55
最終更新日 2026年5月22日10:55
CVSS3.0 : 警告
スコア 5.5
ベクター CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
Linux
Linux Kernel 6.13 以上 6.18.23 未満
Linux Kernel 6.19 以上 6.19.13 未満
Linux Kernel 6.3 以上 6.6.136 未満
Linux Kernel 6.7 以上 6.12.82 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年05月22日]
  掲載
2026年5月22日10:55

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

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

net: skb: fix cross-cache free of KFENCE-allocated skb head

SKB_SMALL_HEAD_CACHE_SIZE is intentionally set to a non-power-of-2
value (e.g. 704 on x86_64) to avoid collisions with generic kmalloc
bucket sizes. This ensures that skb_kfree_head() can reliably use
skb_end_offset to distinguish skb heads allocated from
skb_small_head_cache vs. generic kmalloc caches.

However, when KFENCE is enabled, kfence_ksize() returns the exact
requested allocation size instead of the slab bucket size. If a caller
(e.g. bpf_test_init) allocates skb head data via kzalloc() and the
requested size happens to equal SKB_SMALL_HEAD_CACHE_SIZE, then
slab_build_skb() -> ksize() returns that exact value. After subtracting
skb_shared_info overhead, skb_end_offset ends up matching
SKB_SMALL_HEAD_HEADROOM, causing skb_kfree_head() to incorrectly free
the object to skb_small_head_cache instead of back to the original
kmalloc cache, resulting in a slab cross-cache free:

kmem_cache_free(skbuff_small_head): Wrong slab cache. Expected
skbuff_small_head but got kmalloc-1k

Fix this by always calling kfree(head) in skb_kfree_head(). This keeps
the free path generic and avoids allocator-specific misclassification
for KFENCE objects.

公表日 2026年4月20日19:16
登録日 2026年4月21日4:09
最終更新日 2026年4月27日23:16
関連情報、対策とツール
共通脆弱性一覧