PT-2026-166543

CVE-2026-142820

·

Published

2026-12-03

·

Updated

2026-12-03

Description by

Score
N/A
Not available

No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.

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.
Vendors
Affected products
Related identifiers
Found an issue in the description? Have something to add? Feel free to write us 👾