PT-2026-166542
CVE-2026-142819
·
Published
2026-12-03
·
Updated
2026-12-03
Description by
Score
N/A
Not availableNo 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 qRcmd packet handler
gdb cmd query() decodes the hex payload of a qRcmd packet (the GDB
"monitor" command passthrough to kdb) into remcom out buffer and hands
it to kdb parse(). It sizes the decode with strlen() of the payload:
int len = strlen(remcom in buffer + 6);
...
kgdb hex2mem(remcom in buffer + 6,
remcom out buffer, len);
len = len / 2;kgdb hex2mem() takes count as the number of bytes to produce and
decodes them in place at buf, reading and writing 2 * count bytes
there. len here is the hex character count, twice the decoded size,
so the decode runs over 2 * len bytes at remcom in buffer + 6, off
the end of the buffer. On x86 BUFMAX is 1024, so a 256-byte monitor
command (512 hex characters) overruns remcom in buffer during the
in-place decode:
BUG: KASAN: global-out-of-bounds in kgdb hex2mem+0x131/0x160
Read of size 1 at addr ffffffff8765ef05 by task sh/1
...
kgdb hex2mem+0x131/0x160
gdb serial stub+0x16d4/0x3170
kgdb cpu enter+0xb68/0x1520
...
The buggy address belongs to the variable:
remcom in buffer+0x405/0x420
Halve len before the call so kgdb hex2mem() gets the decoded byte count.
It then reads the len hex characters already in remcom in buffer and
writes len / 2 bytes, all inside the buffer, and remcom out buffer holds
the same command as before.
Found an issue in the description? Have something to add? Feel free to write us 👾