Out-of-bounds read in Linux kernel virtual terminal paste_selection()
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Partial Red Hat: 5 without a fix
No CVSS vector from any source. Fix status from CNA and Red Hat.
Summary
Multiple Linux kernel branches are affected, including versions from 3.16.83 before 3.17 and from 5.6. In paste_selection(), the selection lock is released inside a loop, so a concurrent TIOCLINUX selection change can shrink the buffer below the amount already pasted, causing an unsigned underflow and a read past the end of the buffer.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
In the Linux kernel, the following vulnerability has been resolved: vt: selection: Fix unsigned underflow and slab-out-of-bounds read in paste_selection() In paste_selection(), the loop copies min_t(unsigned int, vc_sel.buf_len - pasted,tty->receive_room) bytes per iteration into tty_ldisc_receive_buf() and increments pasted += count. Because the selection mutex (vc_sel.lock) is dropped inside the loop Whenever the line discipline buffer fills up and paste_selection() sleeps on tty->write_wait, a concurrent TIOCLINUX (TIOCL_SETSEL) ioctl can replace vc_sel.buffer with a shorter selection and reduce vc_sel.buf_len below pasted. When paste_selection() resumes, vc_sel.buf_len - pasted underflows as an unsigned integer to a large positive value, causing tty_ldisc_receive_buf(ld, vc_sel.buffer + pasted, NULL, count) to read up to 4094 bytes out-of-bounds past the newly allocated vc_sel.buffer. Fix this by terminating the loop when pasted >= vc_sel.buf_len. Kernel stack trace (Linux 7.3.0-rc3): ================================================================== BUG: KASAN: slab-out-of-bounds in n_tty_receive_buf_common+0xa01/0x1650 Read of size 4094 at addr ffff888101c58010 by task kworker/u17:1/65 Workqueue: events_unbound flush_to_ldisc Call Trace: <TASK> dump_stack_lvl+0x70/0xa0 print_report+0x153/0x4c6 kasan_report+0xf1/0x120 kasan_check_range+0x11c/0x200 __asan_memcpy+0x29/0x70 n_tty_receive_buf_common+0xa01/0x1650 tty_ldisc_receive_buf+0x66/0x110 tty_port_default_receive_buf+0x6b/0xb0 flush_to_ldisc+0x1b4/0x410 process_one_work+0x6ff/0x1110 worker_thread+0x4a8/0xb70 kthread+0x307/0x3e0 ret_from_fork+0x3ed/0x680 </TASK> ==================================================================
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 3.16.83 to before 3.17; 4.4.216 to before 4.5; 4.9.216 to before 4.10; 4.14.173 to before 4.15; 4.19.109 to before 4.20; 5.4.25 to before 5.5; 5.5.9 to before 5.6 | 3.17, 4.5, 4.10, 4.15, 4.20, 5.5, 5.6 | Patch available | CNA |
| Linux | Linux | 5.6 and later | 6.18.56, 7.2.10, 7.3 | Patch available | CNA |
- Linux VendorLinux Affected 3.16.83 to before 3.17; 4.4.216 to before 4.5; 4.9.216 to before 4.10; 4.14.173 to before 4.15; 4.19.109 to before 4.20; 5.4.25 to before 5.5; 5.5.9 to before 5.6 Fixed in 3.17, 4.5, 4.10, 4.15, 4.20, 5.5, 5.6 Patch available CNA
- Linux VendorLinux Affected 5.6 and later Fixed in 6.18.56, 7.2.10, 7.3 Patch available CNA
Remediation
Upgrade to a fixed kernel: 3.17, 4.5, 4.10, 4.15, 4.20, 5.5, 5.6, 6.18.56, 7.2.10 or 7.3, depending on your branch. Red Hat Enterprise Linux 8, 9 and 10 and Red Hat OpenShift Container Platform 4 and 5 are affected without a fix, and Red Hat lists no fix plan for them.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA Linux (Linux) Fixed in 3.17, 4.5, 4.10, 4.15, 4.20, 5.5, 5.6
- Fix · CNA Linux (Linux) Fixed in 6.18.56, 7.2.10, 7.3
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Container Platform 5 | Affected | No fix yet: Fix deferred |
Not affected: 2 products
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
Timeline
- 2026-10-18 Threatist record created from CVE-2026-98839
- 2026-10-18 Alias added: GHSA-rgr5-hhj8-qq6p
- 2026-10-19 Fix available: Linux/[email protected] · CNA
- 2026-10-24 Affected versions changed · Red Hat
- 2026-10-24 CVSS score added · Red Hat
- 2026-11-06 Affected versions changed · Red Hat
References
More Linux vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Incorrect authorization in Ubuntu linux kernel KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-98839 · CVE Program
- CVE-2026-98839 · NVD
- FIRST EPSS
- GHSA-rgr5-hhj8-qq6p · GitHub Advisory Database · CC BY 4.0
- CVE-2026-98839 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences