LinuxのLinux Kernelにおける境界外読み取りに関する脆弱性
タイトル LinuxのLinux Kernelにおける境界外読み取りに関する脆弱性
概要

Linuxカーネルにおいて、以下の脆弱性が修正されました。vt:リサイズ後の代替スクリーン退出時に古いUnicodeバッファを破棄しない問題です。enter_alt_screen()がvc_uni_linesをvc_saved_uni_linesに保存し、vc_uni_linesをNULLに設定すると、その後vc_do_resize()によるコンソールのリサイズ時にvc_uni_linesがNULLのためUnicodeバッファの再割り当てがスキップされます。しかし、vc_saved_uni_linesは元のサイズで割り当てられた古いバッファを指し続けます。後にleave_alt_screen()がvc_saved_uni_linesを復元すると、バッファの寸法がvc_rows/vc_colsと一致しません。現在の寸法を使用してUnicodeバッファを走査する操作(例:画面をクリアするcsi_J)は境界外のメモリアクセスを行い、カーネルのoopsを引き起こします。障害アドレス0x0000002000000020は、2つの隣接するu32スペース文字(0x20)がポインタとして解釈されたものであり、80x25向けに割り当てられたバッファの25エントリポインタ配列の後ろの行データ領域から読み取られていますが、240x67の寸法でアクセスされました。この問題は、代替スクリーン中にコンソールの寸法が変わったかどうかをチェックし、変わっていれば古い保存済みバッファを復元せずに解放することで修正されました。Unicodeスクリーンは次回必要となった際にvc_uniscr_check()により遅延再構築されます。

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

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

公表日 2026年5月1日0:00
登録日 2026年5月11日10:59
最終更新日 2026年5月11日10:59
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.18.20 以上 6.18.22 未満
Linux Kernel 6.19.10 以上 6.19.12 未満
Linux Kernel 7.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2026年05月11日]
  掲載
2026年5月11日10:59

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

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

vt: discard stale unicode buffer on alt screen exit after resize

When enter_alt_screen() saves vc_uni_lines into vc_saved_uni_lines and
sets vc_uni_lines to NULL, a subsequent console resize via vc_do_resize()
skips reallocating the unicode buffer because vc_uni_lines is NULL.
However, vc_saved_uni_lines still points to the old buffer allocated for
the original dimensions.

When leave_alt_screen() later restores vc_saved_uni_lines, the buffer
dimensions no longer match vc_rows/vc_cols. Any operation that iterates
over the unicode buffer using the current dimensions (e.g. csi_J clearing
the screen) will access memory out of bounds, causing a kernel oops:

BUG: unable to handle page fault for address: 0x0000002000000020
RIP: 0010:csi_J+0x133/0x2d0

The faulting address 0x0000002000000020 is two adjacent u32 space
characters (0x20) interpreted as a pointer, read from the row data area
past the end of the 25-entry pointer array in a buffer allocated for
80x25 but accessed with 240x67 dimensions.

Fix this by checking whether the console dimensions changed while in the
alternate screen. If they did, free the stale saved buffer instead of
restoring it. The unicode screen will be lazily rebuilt via
vc_uniscr_check() when next needed.

公表日 2026年5月2日0:16
登録日 2026年5月2日4:07
最終更新日 2026年5月8日2:42
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.18.20 6.18.22
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.19.10 6.19.12
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
関連情報、対策とツール
共通脆弱性一覧