In the Linux kernel, the following vulnerability has been resolved: kdb: Fix buffer overflow during tab-complete Currently, when the user attempts symbol completion with the Tab key, kdb will use strncpy() to insert the completed symbol into the command buffer. Unfortunately it passes the size of the source buffer rather than the destination to strncpy() with predictably horrible results. Most obviously if the command buffer is already full but cp, the cursor position, is in the middle of the buffer, then we will write past the end of the supplied buffer. Fix this by replacing the dubious strncpy() calls with memmove()/memcpy() calls plus explicit boundary checks to make sure we have enough space before we start moving characters around.
History

No history.

cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published: 2024-07-05T06:55:09.241Z

Updated: 2024-08-27T14:14:17.550Z

Reserved: 2024-06-25T14:23:23.746Z

Link: CVE-2024-39480

cve-icon Vulnrichment

Updated: 2024-08-02T04:26:15.655Z

cve-icon NVD

Status : Modified

Published: 2024-07-05T07:15:10.590

Modified: 2024-08-21T08:35:05.157

Link: CVE-2024-39480

cve-icon Redhat

Severity : Low

Publid Date: 2024-07-05T00:00:00Z

Links: CVE-2024-39480 - Bugzilla