製品・ソフトウェアに関する情報
LinuxのLinux Kernelにおける有効期限後のメモリの解放の欠如に関する脆弱性
Title LinuxのLinux Kernelにおける有効期限後のメモリの解放の欠如に関する脆弱性
Summary

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の処理を行います。

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

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

Publication Date May 1, 2026, midnight
Registration Date May 11, 2026, 11 a.m.
Last Update May 11, 2026, 11 a.m.
CVSS3.0 : 警告
Score 5.5
Vector CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected System
Linux
Linux Kernel 6.19 以上 6.19.12 未満
Linux Kernel 6.9 以上 6.18.22 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
Change Log
No Changed Details Date of change
1 [2026年05月11日]
  掲載
May 11, 2026, 11 a.m.

NVD Vulnerability Information
CVE-2026-31732
Summary

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.

Publication Date May 2, 2026, 12:16 a.m.
Registration Date May 2, 2026, 4:07 a.m.
Last Update May 8, 2026, 12:36 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
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:*:*:*:*:*:*
Related information, measures and tools
Common Vulnerabilities List