{"id":"CVE-2026-31742","aliases":["CVE-2026-31742"],"related":[],"kind":"vulnerability","state":"published","title":"vt: discard stale unicode buffer on alt screen exit after resize","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nvt: discard stale unicode buffer on alt screen exit after resize\n\nWhen enter_alt_screen() saves vc_uni_lines into vc_saved_uni_lines and\nsets vc_uni_lines to NULL, a subsequent console resize via vc_do_resize()\nskips reallocating the unicode buffer because vc_uni_lines is NULL.\nHowever, vc_saved_uni_lines still points to the old buffer allocated for\nthe original dimensions.\n\nWhen leave_alt_screen() later restores vc_saved_uni_lines, the buffer\ndimensions no longer match vc_rows/vc_cols. Any operation that iterates\nover the unicode buffer using the current dimensions (e.g. csi_J clearing\nthe screen) will access memory out of bounds, causing a kernel oops:\n\n  BUG: unable to handle page fault for address: 0x0000002000000020\n  RIP: 0010:csi_J+0x133/0x2d0\n\nThe faulting address 0x0000002000000020 is two adjacent u32 space\ncharacters (0x20) interpreted as a pointer, read from the row data area\npast the end of the 25-entry pointer array in a buffer allocated for\n80x25 but accessed with 240x67 dimensions.\n\nFix this by checking whether the console dimensions changed while in the\nalternate screen. If they did, free the stale saved buffer instead of\nrestoring it. The unicode screen will be lazily rebuilt via\nvc_uniscr_check() when next needed.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nvt: discard stale unicode buffer on alt screen exit after resize\n\nWhen enter_alt_screen() saves vc_uni_lines into vc_saved_uni_lines and\nsets vc_uni_lines to NULL, a subsequent console resize via vc_do_resize()\nskips reallocating the unicode buffer because vc_uni_lines is NULL.\nHowever, vc_saved_uni_lines still points to the old buffer allocated for\nthe original dimensions.\n\nWhen leave_alt_screen() later restores vc_saved_uni_lines, the buffer\ndimensions no longer match vc_rows/vc_cols. Any operation that iterates\nover the unicode buffer using the current dimensions (e.g. csi_J clearing\nthe screen) will access memory out of bounds, causing a kernel oops:\n\n  BUG: unable to handle page fault for address: 0x0000002000000020\n  RIP: 0010:csi_J+0x133/0x2d0\n\nThe faulting address 0x0000002000000020 is two adjacent u32 space\ncharacters (0x20) interpreted as a pointer, read from the row data area\npast the end of the 25-entry pointer array in a buffer allocated for\n80x25 but accessed with 240x67 dimensions.\n\nFix this by checking whether the console dimensions changed while in the\nalternate screen. If they did, free the stale saved buffer instead of\nrestoring it. The unicode screen will be lazily rebuilt via\nvc_uniscr_check() when next needed.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nvt: descartar búfer Unicode obsoleto al salir de la pantalla alternativa después de un redimensionamiento\n\nCuando enter_alt_screen() guarda vc_uni_lines en vc_saved_uni_lines y establece vc_uni_lines en NULL, un redimensionamiento posterior de la consola a través de vc_do_resize() omite la reasignación del búfer Unicode porque vc_uni_lines es NULL. Sin embargo, vc_saved_uni_lines todavía apunta al búfer antiguo asignado para las dimensiones originales.\n\nCuando leave_alt_screen() más tarde restaura vc_saved_uni_lines, las dimensiones del búfer ya no coinciden con vc_rows/vc_cols. Cualquier operación que itere sobre el búfer Unicode utilizando las dimensiones actuales (por ejemplo, csi_J borrando la pantalla) accederá a memoria fuera de los límites, causando un kernel oops:\n\n  BUG: no se puede manejar el fallo de página para la dirección: 0x 0000002000000020\n  RIP: 0010:csi_J+0x133/0x2d0\n\nLa dirección de fallo 0x 0000002000000020 son dos caracteres de espacio u32 adyacentes (0x20) interpretados como un puntero, leídos del área de datos de fila más allá del final del array de punteros de 25 entradas en un búfer asignado para 80x25 pero accedido con dimensiones de 240x67.\n\nSolucione esto comprobando si las dimensiones de la consola cambiaron mientras estaba en la pantalla alternativa. Si lo hicieron, libere el búfer guardado obsoleto en lugar de restaurarlo. La pantalla Unicode se reconstruirá de forma perezosa a través de vc_uniscr_check() cuando sea necesario de nuevo.","source":"nvd"}],"published":"2026-05-01T14:14:37.495Z","modified":"2026-11-11T21:10:00.200Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"type":"git","introduced":"c4efef65a46f610418a3f69149c51492d31c8591","fixed":"891d790fdb5c96c6e1d2841e06ee6c360f2d1288","status":"affected"},{"type":"git","introduced":"1cf66bd9127447c57295f5199029e8d8b47c6c67","fixed":"428fdf55301e6c8fa5a36b426240797b1cf86570","status":"affected"},{"type":"git","introduced":"5eb608319bb56464674a71b4a66ea65c6c435d64","fixed":"40014493cece72a0be5672cd86763e53fb3ec613","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"6.18.20","fixed":"6.18.22","status":"affected"},{"type":"semver","introduced":"6.19.10","fixed":"6.19.12","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.18.20","fixed":"6.18.22"},{"status":"affected","introduced":"6.19.10","fixed":"6.19.12"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/891d790fdb5c96c6e1d2841e06ee6c360f2d1288","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/428fdf55301e6c8fa5a36b426240797b1cf86570","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/40014493cece72a0be5672cd86763e53fb3ec613","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-16T15:12:57.933Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31742","url":"https://www.cve.org/CVERecord?id=CVE-2026-31742","licence":"CVE Terms of Use","modified":"2026-10-19T19:06:07.610Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31742","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31742","licence":"Public domain","modified":"2026-11-11T21:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:20.362Z","epss":{"score":0.00133,"percentile":0.03016,"date":"2026-12-01T12:00:22.000Z"}}