製品・ソフトウェアに関する情報
LinuxのLinux Kernelにおける解放済みメモリの使用に関する脆弱性
Title LinuxのLinux Kernelにおける解放済みメモリの使用に関する脆弱性
Summary

Linuxカーネルにおいて、writebackサブシステムのinode_switch_wbs_work_fn()関数に存在したuse-after-freeの脆弱性が修正されました。この関数内部では、work構造体のリストをループ処理してアイテムを処理していましたが、workキューが保留中にもかかわらず、新しいアイテムがリストに追加されていない状態が発生し、解放されたwork構造体を参照し続ける問題がありました。このため、メモリ破壊の危険がありました。従来の参照カウントと作業キャンセルの仕組みだけでは問題の根本的な解決に不十分であったため、ループ構造を除去し、作業キューに登録される際に少なくとも最初のアイテムがリストに確実に存在することを保証する対策が取られました。これにより、不正なuse-after-freeを防止し、writebackの安全性が向上しました。

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

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

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

NVD Vulnerability Information
CVE-2026-31703
Summary

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

writeback: Fix use after free in inode_switch_wbs_work_fn()

inode_switch_wbs_work_fn() has a loop like:

wb_get(new_wb);
while (1) {
list = llist_del_all(&new_wb->switch_wbs_ctxs);
/* Nothing to do? */
if (!list)
break;
... process the items ...
}

Now adding of items to the list looks like:

wb_queue_isw()
if (llist_add(&isw->list, &wb->switch_wbs_ctxs))
queue_work(isw_wq, &wb->switch_work);

Because inode_switch_wbs_work_fn() loops when processing isw items, it
can happen that wb->switch_work is pending while wb->switch_wbs_ctxs is
empty. This is a problem because in that case wb can get freed (no isw
items -> no wb reference) while the work is still pending causing
use-after-free issues.

We cannot just fix this by cancelling work when freeing wb because that
could still trigger problematic 0 -> 1 transitions on wb refcount due to
wb_get() in inode_switch_wbs_work_fn(). It could be all handled with
more careful code but that seems unnecessarily complex so let's avoid
that until it is proven that the looping actually brings practical
benefit. Just remove the loop from inode_switch_wbs_work_fn() instead.
That way when wb_queue_isw() queues work, we are guaranteed we have
added the first item to wb->switch_wbs_ctxs and nobody is going to
remove it (and drop the wb reference it holds) until the queued work
runs.

Publication Date May 1, 2026, 11:16 p.m.
Registration Date May 2, 2026, 4:06 a.m.
Last Update May 7, 2026, 3:42 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.18 6.18.25
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.19 7.0.2
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
Related information, measures and tools
Common Vulnerabilities List