LinuxのLinux Kernelにおけるリソースのロックに関する脆弱性
タイトル LinuxのLinux Kernelにおけるリソースのロックに関する脆弱性
概要

Linuxカーネルにおいて、uinputのforce-feedback対応ゲームパッド使用時に発生していたff-coreとの循環ロック依存関係の問題が修正されました。lockdepによる循環ロック依存関係の警告は、ff-mutex、udev-mutex、input_mutex、dev-mutex間で循環が発生していたことが原因でした。修正では、新たにstate_lockスピンロックを導入し、udev-stateおよびudev-devへのアクセスを保護することで循環ロックの問題を解消しています。また、リクエスト構造体の初期化順序を変更してロック順序の整合性を確保し、ゲームパッド使用時のロック依存関係に起因する問題を防止しています。

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

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

公表日 2026年4月24日0:00
登録日 2026年4月30日12:31
最終更新日 2026年4月30日12:31
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 2.6.19
Linux Kernel 2.6.19.1 以上 5.10.253 未満
Linux Kernel 5.11 以上 5.15.203 未満
Linux Kernel 5.16 以上 6.1.169 未満
Linux Kernel 6.13 以上 6.18.23 未満
Linux Kernel 6.19 以上 6.19.13 未満
Linux Kernel 6.2 以上 6.6.135 未満
Linux Kernel 6.7 以上 6.12.82 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年04月30日]
  掲載
2026年4月30日12:31

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

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

Input: uinput - fix circular locking dependency with ff-core

A lockdep circular locking dependency warning can be triggered
reproducibly when using a force-feedback gamepad with uinput (for
example, playing ELDEN RING under Wine with a Flydigi Vader 5
controller):

ff->mutex -> udev->mutex -> input_mutex -> dev->mutex -> ff->mutex

The cycle is caused by four lock acquisition paths:

1. ff upload: input_ff_upload() holds ff->mutex and calls
uinput_dev_upload_effect() -> uinput_request_submit() ->
uinput_request_send(), which acquires udev->mutex.

2. device create: uinput_ioctl_handler() holds udev->mutex and calls
uinput_create_device() -> input_register_device(), which acquires
input_mutex.

3. device register: input_register_device() holds input_mutex and
calls kbd_connect() -> input_register_handle(), which acquires
dev->mutex.

4. evdev release: evdev_release() calls input_flush_device() under
dev->mutex, which calls input_ff_flush() acquiring ff->mutex.

Fix this by introducing a new state_lock spinlock to protect
udev->state and udev->dev access in uinput_request_send() instead of
acquiring udev->mutex. The function only needs to atomically check
device state and queue an input event into the ring buffer via
uinput_dev_event() -- both operations are safe under a spinlock
(ktime_get_ts64() and wake_up_interruptible() do not sleep). This
breaks the ff->mutex -> udev->mutex link since a spinlock is a leaf in
the lock ordering and cannot form cycles with mutexes.

To keep state transitions visible to uinput_request_send(), protect
writes to udev->state in uinput_create_device() and
uinput_destroy_device() with the same state_lock spinlock.

Additionally, move init_completion(&request->done) from
uinput_request_send() to uinput_request_submit() before
uinput_request_reserve_slot(). Once the slot is allocated,
uinput_flush_requests() may call complete() on it at any time from
the destroy path, so the completion must be initialised before the
request becomes visible.

Lock ordering after the fix:

ff->mutex -> state_lock (spinlock, leaf)
udev->mutex -> state_lock (spinlock, leaf)
udev->mutex -> input_mutex -> dev->mutex -> ff->mutex (no back-edge)

公表日 2026年4月25日0:16
登録日 2026年4月25日4:08
最終更新日 2026年4月28日0:16
関連情報、対策とツール
共通脆弱性一覧