CVE-2026-31742 (GCVE-0-2026-31742)
Vulnerability from cvelistv5
Published
2026-05-01 14:14
Modified
2026-10-19 19:06
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.
Impacted products
Vendor Product Version
Linux Linux Version: c4efef65a46f610418a3f69149c51492d31c8591
Version: 1cf66bd9127447c57295f5199029e8d8b47c6c67
Version: 5eb608319bb56464674a71b4a66ea65c6c435d64
Create a notification for this product.
   Linux Linux Version: 6.18.20   ≤
Version: 6.19.10   ≤
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2026-31742",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-10-16T15:12:57.933644Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "problemTypes": [
          {
            "descriptions": [
              {
                "cweId": "CWE-125",
                "description": "CWE-125 Out-of-bounds Read",
                "lang": "en",
                "type": "CWE"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-10-19T19:06:07.610Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "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-10-19T19:06:07.610Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2026-31742\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-10-16T15:12:57.933644Z\"}}}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-125\", \"description\": \"CWE-125 Out-of-bounds Read\"}]}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-10-16T15:12:58.502Z\"}}], \"cna\": {\"title\": \"vt: discard stale unicode buffer on alt screen exit after resize\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.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\"}, \"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.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"c4efef65a46f610418a3f69149c51492d31c8591\", \"lessThan\": \"891d790fdb5c96c6e1d2841e06ee6c360f2d1288\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"1cf66bd9127447c57295f5199029e8d8b47c6c67\", \"lessThan\": \"428fdf55301e6c8fa5a36b426240797b1cf86570\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"5eb608319bb56464674a71b4a66ea65c6c435d64\", \"lessThan\": \"40014493cece72a0be5672cd86763e53fb3ec613\", \"versionType\": \"git\"}], \"programFiles\": [\"drivers/tty/vt/vt.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6.18.20\", \"lessThan\": \"6.18.22\", \"versionType\": \"semver\"}, {\"status\": \"affected\", \"version\": \"6.19.10\", \"lessThan\": \"6.19.12\", \"versionType\": \"semver\"}], \"programFiles\": [\"drivers/tty/vt/vt.c\"], \"defaultStatus\": \"unaffected\"}], \"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\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"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.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.18.22\", \"versionStartIncluding\": \"6.18.20\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.19.12\", \"versionStartIncluding\": \"6.19.10\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T12:24:56.085Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2026-31742\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-10-19T19:06:07.610Z\", \"dateReserved\": \"2026-03-09T15:48:24.138Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2026-05-01T14:14:37.495Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…