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

LinuxカーネルのF2FSファイルシステムに脆弱性が存在し、f2fs_compress_write_end_io()内でuse-after-freeの問題が発生しました。この関数ではdec_page_count()の呼び出しによりカウントがゼロになると、アンマウント処理が進行して関連メモリが解放される可能性があります。しかし、bioの完了コールバックがまだ実行中のため、破棄されたメモリを使用して処理が行われ、use-after-freeの脆弱性が生じます。この問題はアンマウント時の競合状態に起因しており、修正ではdec_page_count()の呼び出し位置を変更し、メモリ解放前に全てのアクセスを完了させるようにしました。

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 5.6 以上 6.6.136 未満
Linux Kernel 6.13 以上 6.18.25 未満
Linux Kernel 6.19 以上 7.0.2 未満
Linux Kernel 6.7 以上 6.12.84 未満
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-31702
Summary

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

f2fs: fix use-after-free of sbi in f2fs_compress_write_end_io()

In f2fs_compress_write_end_io(), dec_page_count(sbi, type) can bring
the F2FS_WB_CP_DATA counter to zero, unblocking
f2fs_wait_on_all_pages() in f2fs_put_super() on a concurrent unmount
CPU. The unmount path then proceeds to call
f2fs_destroy_page_array_cache(sbi), which destroys
sbi->page_array_slab via kmem_cache_destroy(), and eventually
kfree(sbi). Meanwhile, the bio completion callback is still executing:
when it reaches page_array_free(sbi, ...), it dereferences
sbi->page_array_slab — a destroyed slab cache — to call
kmem_cache_free(), causing a use-after-free.

This is the same class of bug as CVE-2026-23234 (which fixed the
equivalent race in f2fs_write_end_io() in data.c), but in the
compressed writeback completion path that was not covered by that fix.

Fix this by moving dec_page_count() to after page_array_free(), so
that all sbi accesses complete before the counter decrement that can
unblock unmount. For non-last folios (where atomic_dec_return on
cic->pending_pages is nonzero), dec_page_count is called immediately
before returning — page_array_free is not reached on this path, so
there is no post-decrement sbi access. For the last folio,
page_array_free runs while the F2FS_WB_CP_DATA counter is still
nonzero (this folio has not yet decremented it), keeping sbi alive,
and dec_page_count runs as the final operation.

Publication Date May 1, 2026, 11:16 p.m.
Registration Date May 2, 2026, 4:06 a.m.
Last Update May 7, 2026, 3:44 a.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.6 6.6.136
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 6.12.84
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.13 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