CVE-2024-39480

kdb: Fix buffer overflow during tab-complete

8.4 high EPSS 0.27%

Published 5 Jul 2024 Updated 5 Aug 2026 CNA: Linux

Check your servers for CVE-2024-39480

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-39480 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Severity (CVSS)

8.4 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
none: the attacker does not need an account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
7.8 high CVSS 3.1 from CISA (ADP)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.27%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 20.6% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 20 Aug 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
total: full control of the component or of its data

Weakness

  • CWE-121 Stack-based Buffer Overflow

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 5d5314d6795f3c1c0f415348ff8c51f7de042b77, before fb824a99e148ff272a53d71d84122728b5f00992
affected from 5d5314d6795f3c1c0f415348ff8c51f7de042b77, before ddd2972d8e2dee3b33e8121669d55def59f0be8a
affected from 5d5314d6795f3c1c0f415348ff8c51f7de042b77, before cfdc2fa4db57503bc6d3817240547c8ddc55fa96
affected from 5d5314d6795f3c1c0f415348ff8c51f7de042b77, before f636a40834d22e5e3fc748f060211879c056cd33
affected from 5d5314d6795f3c1c0f415348ff8c51f7de042b77, before 33d9c814652b971461d1e30bead6792851c209e7
affected from 5d5314d6795f3c1c0f415348ff8c51f7de042b77, before 107e825cc448b7834b31e8b1b3cf0f57426d46d5
affected from 5d5314d6795f3c1c0f415348ff8c51f7de042b77, before f694da720dcf795dc3eb97bf76d220213f76aaa7
affected from 5d5314d6795f3c1c0f415348ff8c51f7de042b77, before e9730744bf3af04cda23799029342aa3cddbc454
Other versions: unaffected
Linux
affected 2.6.35
unaffected before 2.6.35
unaffected from 4.19.316 up to and including 4.19.*
unaffected from 5.4.278 up to and including 5.4.*
unaffected from 5.10.219 up to and including 5.10.*
unaffected from 5.15.161 up to and including 5.15.*
unaffected from 6.1.94 up to and including 6.1.*
unaffected from 6.6.34 up to and including 6.6.*
unaffected from 6.9.5 up to and including 6.9.*
unaffected 6.10 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-39480 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-39480

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-39480
trivy image --scanners vuln IMAGE | grep CVE-2024-39480

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-39480 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.