# CVE-2024-39480: kdb: Fix buffer overflow during tab-complete

- Severity: High 8.4 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Published: 2024-07-05T06:55:09.241Z
- Modified: 2026-08-05T11:33:34.087Z
- Weaknesses: CWE-120, CWE-121
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 5d5314d6795f3c1c0f415348ff8c51f7de042b77 before fb824a99e148ff272a53d71d84122728b5f00992; from 5d5314d6795f3c1c0f415348ff8c51f7de042b77 before ddd2972d8e2dee3b33e8121669d55def59f0be8a; from 5d5314d6795f3c1c0f415348ff8c51f7de042b77 before cfdc2fa4db57503bc6d3817240547c8ddc55fa96; from 5d5314d6795f3c1c0f415348ff8c51f7de042b77 before f636a40834d22e5e3fc748f060211879c056cd33; from 5d5314d6795f3c1c0f415348ff8c51f7de042b77 before 33d9c814652b971461d1e30bead6792851c209e7; from 5d5314d6795f3c1c0f415348ff8c51f7de042b77 before 107e825cc448b7834b31e8b1b3cf0f57426d46d5; from 5d5314d6795f3c1c0f415348ff8c51f7de042b77 before f694da720dcf795dc3eb97bf76d220213f76aaa7; from 5d5314d6795f3c1c0f415348ff8c51f7de042b77 before e9730744bf3af04cda23799029342aa3cddbc454; 2.6.35 (not affected: before 2.6.35; from 4.19.316 up to 4.19.*; from 5.4.278 up to 5.4.*; from 5.10.219 up to 5.10.*; from 5.15.161 up to 5.15.*; from 6.1.94 up to 6.1.*; from 6.6.34 up to 6.6.*; from 6.9.5 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: from 1da177e4c3f4 before fb824a99e148; from 1da177e4c3f4 before ddd2972d8e2d; from 1da177e4c3f4 before cfdc2fa4db57; from 1da177e4c3f4 before f636a40834d2; from 1da177e4c3f4 before 33d9c814652b; from 1da177e4c3f4 before 107e825cc448; from 1da177e4c3f4 before f694da720dcf; from 1da177e4c3f4 before e9730744bf3a; from 4.19 before 4.19.316; from 5.4 before 5.4.278; from 5.10 before 5.10.219; from 5.15 before 5.15.161; and 3 more (not affected: from 4.19.316 up to 4.20; from 5.4.278 up to 5.5; from 5.10.219 up to 5.11; from 5.15.161 up to 5.16; from 6.1.94 up to 6.2; from 6.6.34 up to 6.7; from 6.9.5 up to 6.10; from 6.10 up to *)

## Every score

- Linux: CVSS:3.1 8.4 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/fb824a99e148ff272a53d71d84122728b5f00992> (mailing-list, patch)
- <https://git.kernel.org/stable/c/ddd2972d8e2dee3b33e8121669d55def59f0be8a> (mailing-list, patch)
- <https://git.kernel.org/stable/c/cfdc2fa4db57503bc6d3817240547c8ddc55fa96> (mailing-list, patch)
- <https://git.kernel.org/stable/c/f636a40834d22e5e3fc748f060211879c056cd33> (mailing-list, patch)
- <https://git.kernel.org/stable/c/33d9c814652b971461d1e30bead6792851c209e7> (mailing-list, patch)
- <https://git.kernel.org/stable/c/107e825cc448b7834b31e8b1b3cf0f57426d46d5> (mailing-list, patch)
- <https://git.kernel.org/stable/c/f694da720dcf795dc3eb97bf76d220213f76aaa7> (mailing-list, patch)
- <https://git.kernel.org/stable/c/e9730744bf3af04cda23799029342aa3cddbc454> (mailing-list, patch)

## Sources

- CVE List: [CVE-2024-39480](https://www.cve.org/CVERecord?id=CVE-2024-39480), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-39480](https://nvd.nist.gov/vuln/detail/CVE-2024-39480), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2024-39480 · Whole record: https://cve.day/CVE-2024-39480.json · Rebuilt by cve.day 2026-11-25T22:58:42.519Z
