CVE-2026-31742
Awaiting Analysis Awaiting Analysis - Queue
Kernel Oops in Linux Console Unicode Buffer Handling

Publication date: 2026-05-01

Last updated on: 2026-05-03

Assigner: kernel.org

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-01
Last Modified
2026-05-03
Generated
2026-05-06
AI Q&A
2026-05-02
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability manifests as a kernel oops caused by out-of-bounds memory access in the Linux console unicode buffer after resizing the console in the alternate screen mode.

To detect this issue on your system, you can monitor your kernel logs for messages indicating a kernel oops related to the console unicode buffer or memory access errors after resizing the console.

  • Use the command `dmesg | grep -i 'BUG: unable to handle page fault'` to check for kernel oops messages.
  • Look for messages referencing `csi_J` or memory addresses similar to those described in the vulnerability (e.g., out-of-bounds access).
  • Check for system instability or crashes when resizing the console in alternate screen mode.

There are no specific network detection commands since this is a local kernel vulnerability related to console operations.


Can you explain this vulnerability to me?

This vulnerability exists in the Linux kernel's handling of the console's alternate screen buffer during a resize operation. When the system switches to the alternate screen, it saves the current unicode buffer and sets the active buffer to NULL. If the console is resized while in the alternate screen, the code fails to reallocate the unicode buffer properly because it detects the active buffer as NULL. However, the saved buffer still points to the old memory area allocated for the original screen size.

Later, when the system leaves the alternate screen and tries to restore the saved buffer, the dimensions of this buffer no longer match the current console size. Any operation that iterates over this buffer using the new dimensions can access memory beyond the allocated area, causing a kernel crash (kernel oops) due to out-of-bounds memory access.

The fix involves checking if the console dimensions changed while in the alternate screen and, if so, freeing the stale saved buffer instead of restoring it. The unicode screen buffer will then be rebuilt as needed.


How can this vulnerability impact me? :

This vulnerability can cause the Linux kernel to crash unexpectedly due to out-of-bounds memory access when resizing the console while using the alternate screen buffer. Such a kernel crash (kernel oops) can lead to system instability, potential data loss, and denial of service as the system may become unresponsive or require a reboot.


What immediate steps should I take to mitigate this vulnerability?

The vulnerability is caused by stale unicode buffers being restored after a console resize in the Linux kernel, leading to out-of-bounds memory access and kernel oops.

To mitigate this vulnerability, update the Linux kernel to a version where this issue is fixed. The fix involves checking if console dimensions changed while in the alternate screen and freeing the stale saved buffer instead of restoring it.

Until the kernel is updated, avoid operations that trigger console resize events while using the alternate screen buffer to reduce the risk of kernel crashes.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart