CVE-2026-31742

Source
https://cve.org/CVERecord?id=CVE-2026-31742
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31742.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-31742
Downstream
Published
2026-05-01T14:14:37.495Z
Modified
2026-07-15T01:49:05.713860845Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
vt: discard stale unicode buffer on alt screen exit after resize
Details

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

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

When enteraltscreen() saves vcunilines into vcsavedunilines and sets vcunilines to NULL, a subsequent console resize via vcdoresize() skips reallocating the unicode buffer because vcunilines is NULL. However, vcsavedunilines still points to the old buffer allocated for the original dimensions.

When leavealtscreen() later restores vcsavedunilines, the buffer dimensions no longer match vcrows/vccols. Any operation that iterates over the unicode buffer using the current dimensions (e.g. csiJ 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 vcuniscrcheck() when next needed.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31742.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
c4efef65a46f610418a3f69149c51492d31c8591
Fixed
891d790fdb5c96c6e1d2841e06ee6c360f2d1288
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1cf66bd9127447c57295f5199029e8d8b47c6c67
Fixed
428fdf55301e6c8fa5a36b426240797b1cf86570
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5eb608319bb56464674a71b4a66ea65c6c435d64
Fixed
40014493cece72a0be5672cd86763e53fb3ec613

Affected versions

v6.*
v6.18.20
v6.18.21
v6.19.10
v6.19.11

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31742.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.18.20
Fixed
6.18.22
Type
ECOSYSTEM
Events
Introduced
6.19.10
Fixed
6.19.12

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31742.json"