Linuxカーネルのperfサンプル取得処理順序に起因するMMIOアクセス時クラッシュの脆弱性
タイトル Linuxカーネルのperfサンプル取得処理順序に起因するMMIOアクセス時クラッシュの脆弱性
概要

Linuxカーネルでは、perfのサンプル取得とdo_exit()の処理順序が修正されました。ARM64で発生したクラッシュにより、同期的な外部アボートが判明しています。これはMMIOへの不適切なアクセスが原因であると推測されています。原因調査の結果、退出処理時にアクセスアドレス空間が解放されるタイミングでperfが停止されていないことが問題であると確認されました。ユーザ空間にアクセスするperfの挙動を考慮し、do_exit()内でperfの停止処理をmmの破棄前へ移動しています。また、PERF_SAMPLE_CALLCHAINやPERF_SAMPLE_STACK_USERについても、カレントタスクがmmを保持していない場合にはアボートする処理を追加し、同様の問題を発生させないようにしています。

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

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

公表日 2025年7月25日0:00
登録日 2025年12月25日16:58
最終更新日 2025年12月25日16:58
CVSS3.0 : 警告
スコア 5.5
ベクター CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
Debian
Debian GNU/Linux 11.0
Linux
Linux Kernel 3.7 から 5.4.295 未満
Linux Kernel 5.11 から 5.15.186 未満
Linux Kernel 5.16 から 6.1.142 未満
Linux Kernel 5.5 から 5.10.239 未満
Linux Kernel 6.13 から 6.15.4 未満
Linux Kernel 6.16
Linux Kernel 6.2 から 6.6.95 未満
Linux Kernel 6.7 から 6.12.35 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2025年12月25日]
  掲載
2025年12月25日16:58

NVD脆弱性情報
CVE-2025-38424
概要

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

perf: Fix sample vs do_exit()

Baisheng Gao reported an ARM64 crash, which Mark decoded as being a
synchronous external abort -- most likely due to trying to access
MMIO in bad ways.

The crash further shows perf trying to do a user stack sample while in
exit_mmap()'s tlb_finish_mmu() -- i.e. while tearing down the address
space it is trying to access.

It turns out that we stop perf after we tear down the userspace mm; a
receipie for disaster, since perf likes to access userspace for
various reasons.

Flip this order by moving up where we stop perf in do_exit().

Additionally, harden PERF_SAMPLE_CALLCHAIN and PERF_SAMPLE_STACK_USER
to abort when the current task does not have an mm (exit_mm() makes
sure to set current->mm = NULL; before commencing with the actual
teardown). Such that CPU wide events don't trip on this same problem.

公表日 2025年7月26日0:15
登録日 2025年7月26日4:00
最終更新日 2025年7月26日0:15
関連情報、対策とツール
共通脆弱性一覧