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

Linuxカーネルのhackrfドライバーにおいて、media: hackrf: hackrf_probe()内でデバイス登録後にメモリを解放しないように修正しなければならない脆弱性があります。hackrf_probe()で割り当てたメモリを登録後に直接解放すると、既に開かれているファイルディスクリプタによる操作時に使用後解放(UAF)や二重解放(DFB)の競合状態が発生します。この競合状態により、不正なメモリアクセスが可能となり、システムの安定性やセキュリティが損なわれる恐れがあります。したがって、デバイスの登録後にリソースを解放する際は、release()関数を経由して適切に処理しなければなりません。

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

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

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

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

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

media: hackrf: fix to not free memory after the device is registered in hackrf_probe()

In hackrf driver, the following race condition occurs:
```
CPU0 CPU1
hackrf_probe()
kzalloc(); // alloc hackrf_dev
....
v4l2_device_register();
....
fd = sys_open("/path/to/dev"); // open hackrf fd
....
v4l2_device_unregister();
....
kfree(); // free hackrf_dev
....
sys_ioctl(fd, ...);
v4l2_ioctl();
video_is_registered() // UAF!!
....
sys_close(fd);
v4l2_release() // UAF!!
hackrf_video_release()
kfree(); // DFB!!
```

When a V4L2 or video device is unregistered, the device node is removed so
new open() calls are blocked.

However, file descriptors that are already open-and any in-flight I/O-do
not terminate immediately; they remain valid until the last reference is
dropped and the driver's release() is invoked.

Therefore, freeing device memory on the error path after hackrf_probe()
has registered dev it will lead to a race to use-after-free vuln, since
those already-open handles haven't been released yet.

And since release() free memory too, race to use-after-free and
double-free vuln occur.

To prevent this, if device is registered from probe(), it should be
modified to free memory only through release() rather than calling
kfree() directly.

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