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

Linuxカーネルにおいて、以下の脆弱性が修正されました。gpio: gpiochip_add_data_with_key()のエラー時のリソースリークを修正しました。コミットaab5c6f20023(「gpio: set device type for GPIO chips」)以降、`gdev-dev.release`が未設定の状態となっています。その結果、エラー処理経路で`gdev-dev`の参照カウントが減少しません。エラー発生時に参照を破棄するように修正しました。また、エラー処理を簡潔にするために処理の順序を変更しました。現在、gpiochip_add_data_with_key()は以下のような処理手順で実行されます。 いくつかのメモリ割り当てを行います。エラー時はERRゾーン1へ移動します。 device_initialize()を呼び出します。gpiodev_release()が`gdev-dev`のリソース解放の責任を引き継ぎます。以降のエラー処理経路は、二重解放を防ぐためにERRゾーン1を再度通過しません。 主に`gdev`上の初期化を行います。 残りの初期化を実行します。エラー時はERRゾーン2へ移動します。 チップ登録が成功し処理が終了します。 ERRゾーン2ではgpio_device_put()を実行して処理を終了します。 ERRゾーン1の処理を行います。

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

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

公表日 2026年5月1日0:00
登録日 2026年5月11日11:00
最終更新日 2026年5月11日11:00
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.19 以上 6.19.12 未満
Linux Kernel 6.9 以上 6.18.22 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年05月11日]
  掲載
2026年5月11日11:00

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

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

gpio: Fix resource leaks on errors in gpiochip_add_data_with_key()

Since commit aab5c6f20023 ("gpio: set device type for GPIO chips"),
`gdev->dev.release` is unset. As a result, the reference count to
`gdev->dev` isn't dropped on the error handling paths.

Drop the reference on errors.

Also reorder the instructions to make the error handling simpler.
Now gpiochip_add_data_with_key() roughly looks like:

>>> Some memory allocation. Go to ERR ZONE 1 on errors.
>>> device_initialize().

gpiodev_release() takes over the responsibility for freeing the
resources of `gdev->dev`. The subsequent error handling paths
shouldn't go through ERR ZONE 1 again which leads to double free.

>>> Some initialization mainly on `gdev`.
>>> The rest of initialization. Go to ERR ZONE 2 on errors.
>>> Chip registration success and exit.

>>> ERR ZONE 2. gpio_device_put() and exit.
>>> ERR ZONE 1.

公表日 2026年5月2日0:16
登録日 2026年5月2日4:07
最終更新日 2026年5月8日0:36
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.9 6.18.22
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.19 6.19.12
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
関連情報、対策とツール
共通脆弱性一覧