# CVE-2026-31742: vt: discard stale unicode buffer on alt screen exit after resize

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 4, 2026-11-28)
- **CWE:** CWE-125
- **Published:** 2026-05-01T14:14:37.495Z
- **Modified:** 2026-11-11T21:10:00.200Z

## Who should check

- Anyone running Linux \>= c4efef65a46f610418a3f69149c51492d31c8591, \< 891d790fdb5c96c6e1d2841e06ee6c360f2d1288; \>= 1cf66bd9127447c57295f5199029e8d8b47c6c67, \< 428fdf55301e6c8fa5a36b426240797b1cf86570; \>= 5eb608319bb56464674a71b4a66ea65c6c435d64, \< 40014493cece72a0be5672cd86763e53fb3ec613
- Anyone running Linux \>= 6.18.20, \< 6.18.22; \>= 6.19.10, \< 6.19.12

## Description

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.

## Affected and fixed versions

- Linux: \>= c4efef65a46f610418a3f69149c51492d31c8591, \< 891d790fdb5c96c6e1d2841e06ee6c360f2d1288; \>= 1cf66bd9127447c57295f5199029e8d8b47c6c67, \< 428fdf55301e6c8fa5a36b426240797b1cf86570; \>= 5eb608319bb56464674a71b4a66ea65c6c435d64, \< 40014493cece72a0be5672cd86763e53fb3ec613 (cvelist)
- Linux: \>= 6.18.20, \< 6.18.22; \>= 6.19.10, \< 6.19.12 (cvelist)

## Mitigation

- Upgrade Linux to 40014493cece72a0be5672cd86763e53fb3ec613 or later.
- Upgrade Linux to 6.19.12 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31742. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31742.md
Affected: Linux >= c4efef65a46f610418a3f69149c51492d31c8591, < 891d790fdb5c96c6e1d2841e06ee6c360f2d1288; >= 1cf66bd9127447c57295f5199029e8d8b47c6c67, < 428fdf55301e6c8fa5a36b426240797b1cf86570; >= 5eb608319bb56464674a71b4a66ea65c6c435d64, < 40014493cece72a0be5672cd86763e53fb3ec613; Linux >= 6.18.20, < 6.18.2…
Fixed in: Linux 891d790fdb5c96c6e1d2841e06ee6c360f2d1288, Linux 428fdf55301e6c8fa5a36b426240797b1cf86570, Linux 40014493cece72a0be5672cd86763e53fb3ec613, Linux 6.18.22, Linux 6.19.12

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31742 being exploited?

There is no confirmed exploitation: CVE-2026-31742 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-31742?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-31742?

Linux \>= c4efef65a46f610418a3f69149c51492d31c8591, \< 891d790fdb5c96c6e1d2841e06ee6c360f2d1288; \>= 1cf66bd9127447c57295f5199029e8d8b47c6c67, \< 428fdf55301e6c8fa5a36b426240797b1cf86570; \>= 5eb608319bb56464674a71b4a66ea65c6c435d64, \< 40014493cece72a0be5672cd86763e53fb3ec613; Linux \>= 6.18.20, \< 6.18.22; \>= 6.19.10, \< 6.19.12.

### Is there a fix for CVE-2026-31742?

Yes. Fixed in Linux 891d790fdb5c96c6e1d2841e06ee6c360f2d1288, Linux 428fdf55301e6c8fa5a36b426240797b1cf86570, Linux 40014493cece72a0be5672cd86763e53fb3ec613, Linux 6.18.22, Linux 6.19.12. Upgrade Linux to 40014493cece72a0be5672cd86763e53fb3ec613 or later. Upgrade Linux to 6.19.12 or later.

### How do I check if I'm affected by CVE-2026-31742?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/891d790fdb5c96c6e1d2841e06ee6c360f2d1288>
- patch: <https://git.kernel.org/stable/c/428fdf55301e6c8fa5a36b426240797b1cf86570>
- patch: <https://git.kernel.org/stable/c/40014493cece72a0be5672cd86763e53fb3ec613>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31742>

HTML: <https://flawdb.com/CVE-2026-31742> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31742>
