In the Linux kernel, the following vulnerability has been resolved: vt: selection: Fix unsigned underflow and slab-out-of-bounds read in… (CVE-2026-98839)
Description
A vulnerability in the Linux kernel's virtual terminal (vt) selection code was fixed to address an unsigned integer underflow and slab-out-of-bounds read in the paste_selection() function. The issue arises when a concurrent ioctl call modifies the selection buffer length while paste_selection() is running, causing an underflow and out-of-bounds memory read. This flaw was resolved by adding a loop termination condition to prevent reading beyond the buffer.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in the Linux kernel's vt selection subsystem involves the paste_selection() function, which copies data from a selection buffer to the tty line discipline receive buffer. The function uses a loop that copies a calculated number of bytes per iteration and increments a 'pasted' counter. However, the selection mutex is released inside the loop, allowing a concurrent TIOCLINUX ioctl to replace the selection buffer with a shorter one and reduce its length below the current 'pasted' value. When paste_selection() resumes, the subtraction vc_sel.buf_len - pasted underflows as an unsigned integer, resulting in a large positive value. This causes tty_ldisc_receive_buf() to read up to 4094 bytes out-of-bounds past the buffer, leading to a slab-out-of-bounds read detected by KASAN. The fix terminates the loop when pasted is greater than or equal to vc_sel.buf_len, preventing the underflow and out-of-bounds access.
Potential Impact
The vulnerability can cause out-of-bounds reads in kernel memory, potentially leading to kernel crashes or memory corruption. Although no active exploits are known, such memory safety issues can be leveraged for denial of service or potentially privilege escalation in certain contexts.
Mitigation Recommendations
A fix has been implemented in the Linux kernel to terminate the loop in paste_selection() when the pasted counter reaches or exceeds the buffer length, preventing the unsigned underflow and out-of-bounds read. Users should apply the official kernel update containing this fix once available. No other mitigations are indicated.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-rgr5-hhj8-qq6p
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-98839"]
Threat ID: 6ad520a92cdf04f6569938a0
Added to database: 10/18/2026, 19:40:25 UTC
Last enriched: 10/18/2026, 22:17:10 UTC
Last updated: 10/18/2026, 22:17:11 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.