CVE-2026-142820

Not scored yetLast modified Dec 3, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

kgdb: Fix buffer overflow in the 'm' packet handler

gdb_cmd_memread() passes the length of the 'm' packet straight to kgdb_mem2hex(), which hex-encodes the reply into remcom_out_buffer[BUFMAX] without checking that the reply fits. A client on the KGDB I/O console can ask for a read of any size, and the hex encoding runs off the end of the buffer. kgdb_mem2hex() takes that length as an int count, so 2^31 truncates to a negative value and copy_from_kernel_nofault() is handed buf + count as its destination.

On x86 BUFMAX is 1024, so a read of 512 bytes overruns by the single byte that terminates the hex string:

BUG: KASAN: global-out-of-bounds in kgdb_mem2hex+0x1dd/0x230 Write of size 1 at addr ffffffff87651780 by task sh/1 ... The buggy address belongs to the variable: remcom_out_buffer+0x400/0x420

Bounds check the length before the hex encoding:

if (length > (BUFMAX - 1) / 2) { error_packet(remcom_out_buffer, -EINVAL); return; }

gdbstub_msg_write() already bounds the count it hex-encodes against BUFMAX. Reads over the limit never returned valid data, so an error reply loses nothing.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Dec 3, 2026
Last modified
Dec 3, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-142821In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: validate SRAT subtables before parsing The KFD SRAT walkerCVE-2026-142822In the Linux kernel, the following vulnerability has been resolved: ipmr: drop packets with unknown ingress VIF A packet can race with VIFCVE-2026-142823In the Linux kernel, the following vulnerability has been resolved: bonding: fix out-of-bounds read of arp_ip_target arp_ip_target is a moCVE-2026-142824In the Linux kernel, the following vulnerability has been resolved: ASoC: qcom: qdsp6: q6afe: fix clk vote response type mismatch The respCVE-2026-142825In the Linux kernel, the following vulnerability has been resolved: scsi: ufs: core: Clear stale UIC result byte before peer DME retries PCVE-2026-142826In the Linux kernel, the following vulnerability has been resolved: scsi: ufs: bsg: Reject UIC commands with a non-zero result byte ufs_bsCVE-2026-142827In the Linux kernel, the following vulnerability has been resolved: parisc: eisa_enumerator: Fix out-of-bounds reads of the EEPROM buffer CVE-2026-142828In the Linux kernel, the following vulnerability has been resolved: net/rds: ib: don't enable IRQs in rds_ib_conn_free() __rds_conn_createCVE-2026-142829In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: don't WARN when removing an unallocated MST payload [CVE-2026-142830In the Linux kernel, the following vulnerability has been resolved: ntfs: do not use a stale runlist pointer when undoing $MFT extension WCVE-2026-142831In the Linux kernel, the following vulnerability has been resolved: sched_ext: Don't leave balance callbacks queued across a pick retry ThCVE-2026-142832In the Linux kernel, the following vulnerability has been resolved: cxl/events: Test CME counter expiry with equality, not bitwise AND The
CVE-2026-142820: Unscored | Vulnix