CVE-2024-39480

Severity CVSS v4.0:
Pending analysis
Type:
CWE-120 Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
Publication date:
05/07/2024
Last modified:
21/08/2024

Description

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

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.19 (including) 4.19.316 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.4 (including) 5.4.278 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.10 (including) 5.10.219 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.15 (including) 5.15.161 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.1 (including) 6.1.94 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.6 (including) 6.6.34 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.9 (including) 6.9.5 (excluding)