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

Linuxカーネルにおいて、以下の脆弱性が修正されました。power: supply: bq25980に関するpower_supply_changed()内のuse-after-freeの問題を修正しました。IRQを要求するための`devm_`バリアントを、`power_supply`ハンドルを割り当て・登録するための`devm_`バリアントの前に使用すると、`power_supply`ハンドルが割り当て解除・登録解除される前に割り込みハンドラが実行されてしまいます(`devm_`は自然に割り当ての逆順で解放します)。これにより削除処理中に、`power_supply`ハンドルが解放された直後かつ対応するIRQハンドラの登録解除処理が実行される前に割り込みが発生する競合状態が生じます。その結果、IRQハンドラは解放済みの`power_supply`ハンドルを使用して`power_supply_changed()`を呼び出し、通常はシステムクラッシュやメモリの不正な破損を引き起こします。なお、`probe()`中にも類似の状況が発生する可能性があり、その場合は`power_supply`ハンドルが登録される前に割り込みが発生します。この場合、初期化されていない`power_supply`ハンドルを`power_supply_changed()`で使用するという深刻な問題となります。この競合によるuse-after-freeを修正するため、IRQの要求を`power_supply`ハンドルの登録後に行うようにしました。

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

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

公表日 2026年5月27日0:00
登録日 2026年6月26日12:00
最終更新日 2026年6月26日12:00
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 5.10 以上 5.10.252 未満
Linux Kernel 5.11 以上 5.15.202 未満
Linux Kernel 5.16 以上 6.1.165 未満
Linux Kernel 6.13 以上 6.18.14 未満
Linux Kernel 6.19 以上 6.19.4 未満
Linux Kernel 6.2 以上 6.6.128 未満
Linux Kernel 6.7 以上 6.12.75 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年06月26日]
  掲載
2026年6月26日12:00

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

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

power: supply: bq25980: Fix use-after-free in power_supply_changed()

Using the `devm_` variant for requesting IRQ _before_ the `devm_`
variant for allocating/registering the `power_supply` handle, means that
the `power_supply` handle will be deallocated/unregistered _before_ the
interrupt handler (since `devm_` naturally deallocates in reverse
allocation order). This means that during removal, there is a race
condition where an interrupt can fire just _after_ the `power_supply`
handle has been freed, *but* just _before_ the corresponding
unregistration of the IRQ handler has run.

This will lead to the IRQ handler calling `power_supply_changed()` with
a freed `power_supply` handle. Which usually crashes the system or
otherwise silently corrupts the memory...

Note that there is a similar situation which can also happen during
`probe()`; the possibility of an interrupt firing _before_ registering
the `power_supply` handle. This would then lead to the nasty situation
of using the `power_supply` handle *uninitialized* in
`power_supply_changed()`.

Fix this racy use-after-free by making sure the IRQ is requested _after_
the registration of the `power_supply` handle.

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