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

Linuxカーネルにおいて、以下の脆弱性が修正されました。vfio/cdxでは、デバイスごとのミューテックスでVFIO_DEVICE_SET_IRQSをシリアライズします。vfio_cdx_set_msi_trigger()はvdev-config_msiを読み、その値に基づいてvdev-cdx_irqs配列を操作しますが、並行するVFIO_DEVICE_SET_IRQS ioctlに対するシリアライズがされていませんでした。二つの呼び出し元が競合し、一方がconfig_msiをセットされた状態と認識し、もう一方がそれをクリアしてvfio_cdx_msi_disable()を介してcdx_irqsを解放します。その結果、cdx_irqs配列のuse-after-freeが発生していました。struct vfio_cdx_deviceにcdx_irqs_lockミューテックスを追加し、vfio_cdx_set_msi_trigger()内でそれを取得するようにしました。この関数はconfig_msi、cdx_irqs、およびmsi_countのすべての更新を単一のチョークポイントで処理し、ioctl経路とデバイスクローズ時のクリーンアップ経路の両方をカバーします。これにより、config_msiのテストがその後の有効化、無効化、トリガー操作と原子的に保たれるようになりました。さらに、vfio_cdx_irqs_cleanup()から事前呼び出し時の!cdx_irqsテストを削除しました。この変更の一部として、この最適化はvfio_cdx_msi_disable()内の!config_msiによる早期リターンと重複しているため、テストを残すと新しいロックで保護される状態の非同期読み取りとなってしまうためです。

想定される影響 ・当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアが完全に停止する可能性があります。 
対策

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

公表日 2026年5月27日0:00
登録日 2026年6月17日15:40
最終更新日 2026年6月17日15:40
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.10 以上 6.12.86 未満
Linux Kernel 6.13 以上 6.18.27 未満
Linux Kernel 6.19 以上 7.0.4 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年06月17日]
  掲載
2026年6月17日15:40

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

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

vfio/cdx: Serialize VFIO_DEVICE_SET_IRQS with a per-device mutex

vfio_cdx_set_msi_trigger() reads vdev->config_msi and operates on the
vdev->cdx_irqs array based on its value, but provides no serialization
against concurrent VFIO_DEVICE_SET_IRQS ioctls. Two callers can race
such that one observes config_msi as set while another clears it and
frees cdx_irqs via vfio_cdx_msi_disable(), resulting in a use-after-free
of the cdx_irqs array.

Add a cdx_irqs_lock mutex to struct vfio_cdx_device and acquire it in
vfio_cdx_set_msi_trigger(), which is the single chokepoint through
which all updates to config_msi, cdx_irqs, and msi_count flow, covering
both the ioctl path and the close-device cleanup path. This keeps the
test of config_msi atomic with the subsequent enable, disable, or
trigger operations.

Drop the pre-call !cdx_irqs test from vfio_cdx_irqs_cleanup() as part
of this change: the optimization it provided is redundant with the
!config_msi early-return inside vfio_cdx_msi_disable(), and leaving the
test in place would be an unsynchronized read of state the new lock is
meant to protect.

公表日 2026年5月27日23:17
登録日 2026年5月28日4:13
最終更新日 2026年5月30日20:17
関連情報、対策とツール
共通脆弱性一覧