CVE-2026-31742 (GCVE-0-2026-31742)

Vulnerability from cvelistv5 – Published: 2026-05-01 14:14 – Updated: 2026-08-05 12:24
VLAI
Title
vt: discard stale unicode buffer on alt screen exit after resize
Summary
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.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: c4efef65a46f610418a3f69149c51492d31c8591 , < 891d790fdb5c96c6e1d2841e06ee6c360f2d1288 (git)
Affected: 1cf66bd9127447c57295f5199029e8d8b47c6c67 , < 428fdf55301e6c8fa5a36b426240797b1cf86570 (git)
Affected: 5eb608319bb56464674a71b4a66ea65c6c435d64 , < 40014493cece72a0be5672cd86763e53fb3ec613 (git)
Create a notification for this product.
Linux Linux Affected: 6.18.20 , < 6.18.22 (semver)
Affected: 6.19.10 , < 6.19.12 (semver)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/tty/vt/vt.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "891d790fdb5c96c6e1d2841e06ee6c360f2d1288",
              "status": "affected",
              "version": "c4efef65a46f610418a3f69149c51492d31c8591",
              "versionType": "git"
            },
            {
              "lessThan": "428fdf55301e6c8fa5a36b426240797b1cf86570",
              "status": "affected",
              "version": "1cf66bd9127447c57295f5199029e8d8b47c6c67",
              "versionType": "git"
            },
            {
              "lessThan": "40014493cece72a0be5672cd86763e53fb3ec613",
              "status": "affected",
              "version": "5eb608319bb56464674a71b4a66ea65c6c435d64",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/tty/vt/vt.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "6.18.22",
              "status": "affected",
              "version": "6.18.20",
              "versionType": "semver"
            },
            {
              "lessThan": "6.19.12",
              "status": "affected",
              "version": "6.19.10",
              "versionType": "semver"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.22",
                  "versionStartIncluding": "6.18.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.19.12",
                  "versionStartIncluding": "6.19.10",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "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."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable VT code is reached by local writes/ioctls to a Linux virtual console tty, not by network packets or adjacent protocols.\nAC:L - An attacker can deterministically create the stale unicode buffer by allocating it, entering alt screen, resizing with TIOCSWINSZ, leaving alt screen, and issuing a screen-clear/read operation.\nPR:L - The path is reachable by an unprivileged local user who owns or can write to a virtual console tty; TIOCSWINSZ has no capability check on this path.\nUI:N - No separate victim action is required once the attacker has local tty access; the attacker drives the escape sequences and resize directly.\nS:U - The impact is within the same kernel/host security authority and does not cross a VM, IOMMU, or sandbox boundary.\nC:H - The stale dimensions can make unicode-buffer users perform out-of-bounds reads from kernel memory, including via unicode screen-buffer access paths; per the required guidance, OOB reads are scored High unless strictly bounded.\nI:H - The stale row pointers/row lengths can drive out-of-bounds kernel writes during unicode screen clearing, so this is kernel memory corruption and is scored High under the required guidance.\nA:H - The demonstrated impact is a kernel oops/page fault in csi_J, and the local trigger can be repeated to crash the system."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:24:56.085Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/891d790fdb5c96c6e1d2841e06ee6c360f2d1288"
        },
        {
          "url": "https://git.kernel.org/stable/c/428fdf55301e6c8fa5a36b426240797b1cf86570"
        },
        {
          "url": "https://git.kernel.org/stable/c/40014493cece72a0be5672cd86763e53fb3ec613"
        }
      ],
      "title": "vt: discard stale unicode buffer on alt screen exit after resize",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-31742",
    "datePublished": "2026-05-01T14:14:37.495Z",
    "dateReserved": "2026-03-09T15:48:24.138Z",
    "dateUpdated": "2026-08-05T12:24:56.085Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-31742",
      "date": "2026-08-10",
      "epss": "0.00127",
      "percentile": "0.02756"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-31742\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-05-01T15:16:36.937\",\"lastModified\":\"2026-06-17T10:34:22.737\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/tty/vt/vt.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"c4efef65a46f610418a3f69149c51492d31c8591\",\"lessThan\":\"891d790fdb5c96c6e1d2841e06ee6c360f2d1288\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"1cf66bd9127447c57295f5199029e8d8b47c6c67\",\"lessThan\":\"428fdf55301e6c8fa5a36b426240797b1cf86570\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"5eb608319bb56464674a71b4a66ea65c6c435d64\",\"lessThan\":\"40014493cece72a0be5672cd86763e53fb3ec613\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/tty/vt/vt.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.18.20\",\"lessThan\":\"6.18.22\",\"versionType\":\"semver\",\"status\":\"affected\"},{\"version\":\"6.19.10\",\"lessThan\":\"6.19.12\",\"versionType\":\"semver\",\"status\":\"affected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-125\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.18.20\",\"versionEndExcluding\":\"6.18.22\",\"matchCriteriaId\":\"7B6CD870-DF92-432B-A966-F190AE04E97F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.19.10\",\"versionEndExcluding\":\"6.19.12\",\"matchCriteriaId\":\"6BF1D424-BCB7-4168-AFD4-DE335B44DACF\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*\",\"matchCriteriaId\":\"58A9FEFF-C040-420D-8F0A-BFDAAA1DF258\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*\",\"matchCriteriaId\":\"1D2315C0-D46F-4F85-9754-F9E5E11374A6\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/40014493cece72a0be5672cd86763e53fb3ec613\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/428fdf55301e6c8fa5a36b426240797b1cf86570\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/891d790fdb5c96c6e1d2841e06ee6c360f2d1288\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-07-02T12:48:31+00:00",
      "cve": "CVE-2026-31742",
      "id": "CVE-2026-31742",
      "initial_release_date": "2026-05-01T00:00:00+00:00",
      "product_status:known_affected": "260",
      "product_status:known_not_affected": "14",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: vt: discard stale unicode buffer on alt screen exit after resize",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31742.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "important",
      "current_release_date": "2026-08-06T01:23:22Z",
      "cve": "CVE-2026-31742",
      "id": "CVE-2026-31742",
      "initial_release_date": "2026-05-08T02:22:58Z",
      "product_status:known_not_affected": "293",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2026-31742",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2026-31742.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…