CVE-2026-31742: vt: discard stale unicode buffer on alt screen exit after resize
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.
Security readout for executives and security teams
Plain-English summary
A Linux virtual-console memory handling flaw can occur when the alternate screen is exited after the console was resized. The kernel may use an old Unicode screen buffer with new dimensions, causing out-of-bounds memory access and a kernel crash. Exploitation requires local, low-privileged access; precise vulnerable release ranges are not provided.
Executive priority
Treat as a high-priority local kernel issue, especially on shared Linux systems with untrusted local users. Patch through supported distribution channels after confirming applicability. Internet-facing status alone does not determine exposure because the attack vector is local. Emergency isolation is not supported by the supplied exploitation evidence.
Technical view
The virtual-terminal code saves vc_uni_lines when entering the alternate screen. A resize does not rebuild that buffer because vc_uni_lines is NULL. Restoring the stale buffer afterward creates a dimensions mismatch, allowing later screen operations such as csi_J to access memory out of bounds. The fix discards the saved buffer when dimensions changed.
Likely exposure
Exposure is limited to Linux systems using the kernel virtual-terminal console where a local low-privileged user can trigger alternate-screen transitions, console resizing, and subsequent screen operations. Headless systems may have less practical exposure, but the supplied sources do not establish complete affected-version boundaries or configuration prerequisites.
Exploitation context
The CVSS 3.1 score is 7.8 with local access, low complexity, low privileges, and no user interaction. The bundle marks this CVE as absent from KEV and provides no evidence of active exploitation. The demonstrated outcome is an out-of-bounds kernel access and oops; reliable confidentiality or integrity impact is not established here.
Researcher notes
The correction checks whether alternate-screen dimensions changed and frees the stale saved Unicode buffer instead of restoring it; vc_uniscr_check() later rebuilds it. Three stable-kernel commits are referenced. The bundle labels 6.18.20 and 6.19.10 unaffected, but does not provide vulnerable introduction ranges or distribution package mappings.
Mitigation direction
Apply a vendor kernel update incorporating an identified Linux stable fix commit.
Prioritize multi-user systems where untrusted users can access virtual consoles.
Restrict unnecessary local console access until affected-version status is confirmed.
Check Linux distribution advisories for package-specific fixed versions and reboot requirements.
Validation and detection
Inventory running kernels on systems exposing local virtual-terminal access.
Compare kernel packages against vendor advisories and the referenced stable commits.
Confirm the running kernel, not only the installed package, contains the correction.
Review kernel logs for csi_J page faults or oops events following console resizing.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2026-31742 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
4Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.