UBUNTU-CVE-2026-98839: Low severity ubuntu/linux-aws vulnerability
In the Linux kernel, the following vulnerability has been resolved: vt: selection: Fix unsigned underflow and slab-out-of-bounds read in pasteselection() In pasteselection(), the loop copies mint(unsigned int, vcsel.buflen - pasted,tty->receiveroom) bytes per iteration into ttyldiscreceivebuf() and increments pasted += count. Because the selection mutex (vcsel.lock) is dropped inside the loop Whenever the line discipline buffer fills up and pasteselection() sleeps on tty->writewait, a concurrent TIOCLINUX (TIOCLSETSEL) ioctl can replace vcsel.buffer with a shorter selection and reduce vcsel.buflen below pasted. When pasteselection() resumes, vcsel.buflen - pasted underflows as an unsigned integer to a large positive value, causing ttyldiscreceivebuf(ld, vcsel.buffer + pasted, NULL, count) to read up to 4094 bytes out-of-bounds past the newly allocated vcsel.buffer. Fix this by terminating the loop when pasted >= vcsel.buflen. Kernel stack trace (Linux 7.3.0-rc3): ================================================================== BUG: KASAN: slab-out-of-bounds in nttyreceivebufcommon+0xa01/0x1650 Read of size 4094 at addr ffff888101c58010 by task kworker/u17:1/65 Workqueue: eventsunbound flushtoldisc Call Trace: <TASK> dumpstacklvl+0x70/0xa0 printreport+0x153/0x4c6 kasanreport+0xf1/0x120 kasancheckrange+0x11c/0x200 asanmemcpy+0x29/0x70 nttyreceivebufcommon+0xa01/0x1650 ttyldiscreceivebuf+0x66/0x110 ttyportdefaultreceivebuf+0x6b/0xb0 flushtoldisc+0x1b4/0x410 processonework+0x6ff/0x1110 workerthread+0x4a8/0xb70 kthread+0x307/0x3e0 retfromfork+0x3ed/0x680 </TASK> ==================================================================
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-aws-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.18~24.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-fde-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1019.19~24.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.19~24.04.1 - Upgrade
Upgrade
ubuntu/linux-oracle-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1016.18~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-43.43.1~24.04.2 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-43.43 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1017.18 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 7.0.0-1020.21 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 7.0.0-1019.19 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1017.19 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 7.0.0-1010.11 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1018.18 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1018.18 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 7.0.0-43.43.1 - Compensating control
Modify paste_selection() to terminate the loop when pasted >= vc_sel.buf_len, preventing vc_sel.buf_len - pasted from unsigned underflowing after vc_sel.buffer is replaced.
Event History
Frequently Asked Questions
What conditions are required to trigger the out-of-bounds read?
A paste operation must be delayed because the line-discipline buffer is full and paste_selection() sleeps on tty->write_wait. While it is sleeping, a concurrent TIOCLINUX TIOCL_SETSEL ioctl must replace the selection buffer with a shorter one before the paste resumes.
Which Ubuntu kernel packages are listed as affected?
The affected software list includes ubuntu/linux, ubuntu/linux-aws, ubuntu/linux-azure, ubuntu/linux-gcp, ubuntu/linux-oracle, ubuntu/linux-fips, ubuntu/linux-aws-fips, and ubuntu/linux-azure-fips.
How might this issue appear during testing or investigation?
The provided report shows KASAN detecting a slab-out-of-bounds read in n_tty_receive_buf_common. The erroneous read can be as large as 4094 bytes past a newly allocated, shortened selection buffer.