PCIデバイスのランタイムパワーマネジメント処理における競合状態が原因でカーネルがクラッシュする可能性がある脆弱性
タイトル PCIデバイスのランタイムパワーマネジメント処理における競合状態が原因でカーネルがクラッシュする可能性がある脆弱性
概要

LinuxカーネルのPCIデバイスにおけるランタイムPM処理で、.runtime_idle()コールバックとドライバ削除が競合し、カーネルがクラッシュする場合がありました。この問題は、pm_runtime_get_sync()呼び出しの後にpm_runtime_barrier()を実行することで、.runtime_idle()の同時実行を防止して解決されました。今後は、ドライバ削除前にpm_runtime_get_sync()とpm_runtime_barrier()を連続して呼び出すことで、競合状態を防止できます。

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

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

公表日 2024年5月17日0:00
登録日 2025年12月25日17:01
最終更新日 2025年12月25日17:01
CVSS3.0 : 警告
スコア 4.7
ベクター CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
Debian
Debian GNU/Linux 10.0
Linux
Linux Kernel 4.19.312 未満
Linux Kernel 4.20 から 5.4.274 未満
Linux Kernel 5.11 から 5.15.154 未満
Linux Kernel 5.16 から 6.1.84 未満
Linux Kernel 5.5 から 5.10.215 未満
Linux Kernel 6.2 から 6.6.24 未満
Linux Kernel 6.7 から 6.7.12 未満
Linux Kernel 6.8 から 6.8.3 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2025年12月25日]
  掲載
2025年12月25日17:01

NVD脆弱性情報
CVE-2024-35809
概要

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

PCI/PM: Drain runtime-idle callbacks before driver removal

A race condition between the .runtime_idle() callback and the .remove()
callback in the rtsx_pcr PCI driver leads to a kernel crash due to an
unhandled page fault [1].

The problem is that rtsx_pci_runtime_idle() is not expected to be running
after pm_runtime_get_sync() has been called, but the latter doesn't really
guarantee that. It only guarantees that the suspend and resume callbacks
will not be running when it returns.

However, if a .runtime_idle() callback is already running when
pm_runtime_get_sync() is called, the latter will notice that the runtime PM
status of the device is RPM_ACTIVE and it will return right away without
waiting for the former to complete. In fact, it cannot wait for
.runtime_idle() to complete because it may be called from that callback (it
arguably does not make much sense to do that, but it is not strictly
prohibited).

Thus in general, whoever is providing a .runtime_idle() callback needs
to protect it from running in parallel with whatever code runs after
pm_runtime_get_sync(). [Note that .runtime_idle() will not start after
pm_runtime_get_sync() has returned, but it may continue running then if it
has started earlier.]

One way to address that race condition is to call pm_runtime_barrier()
after pm_runtime_get_sync() (not before it, because a nonzero value of the
runtime PM usage counter is necessary to prevent runtime PM callbacks from
being invoked) to wait for the .runtime_idle() callback to complete should
it be running at that point. A suitable place for doing that is in
pci_device_remove() which calls pm_runtime_get_sync() before removing the
driver, so it may as well call pm_runtime_barrier() subsequently, which
will prevent the race in question from occurring, not just in the rtsx_pcr
driver, but in any PCI drivers providing .runtime_idle() callbacks.

公表日 2024年5月17日23:15
登録日 2024年5月18日10:01
最終更新日 2024年11月21日18:20
関連情報、対策とツール
共通脆弱性一覧