2084AI Security Observatory

CVE

CVE-2024-39480

CVE-2024-39480HIGH 7.8EPSS 20%

CNA 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.

Affected versions

All Linux kernel vulnerabilities →

  • ≥ 6.9, < 6.9.5Fixed in 6.9.5
  • ≥ 6.6, < 6.6.34Fixed in 6.6.34
  • ≥ 6.1, < 6.1.94Fixed in 6.1.94
  • ≥ 5.15, < 5.15.161Fixed in 5.15.161
  • ≥ 5.10, < 5.10.219Fixed in 5.10.219
  • ≥ 5.4, < 5.4.278Fixed in 5.4.278
  • ≥ 4.19, < 4.19.316Fixed in 4.19.316

Distribution packages (Debian, Ubuntu, Red Hat…) backport fixes without changing the upstream version: check your distribution’s advisory as well.

Advisories and patches

Data: NVD (public domain), CISA KEV (CC0), FIRST EPSS, OSV.dev / GitHub Advisory Database (CC-BY 4.0) · This database lists affected versions and fixes only. It never hosts or links exploit code.