Lucene search

K
vulnrichmentLinuxVULNRICHMENT:CVE-2024-39480
HistoryJul 05, 2024 - 6:55 a.m.

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

2024-07-0506:55:09
Linux
github.com
10
cve-2024-39480
kdb
buffer overflow
tab-complete
linux kernel
vulnerability
fix
strncpy
memmove
memcpy
explicit boundary checks

AI Score

7.3

Confidence

High

SSVC

Exploitation

none

Automatable

no

Technical Impact

total

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.

ADP Affected

[
  {
    "cpes": [
      "cpe:2.3:a:linux:linux_kernel:-:*:*:*:*:*:*:*"
    ],
    "vendor": "linux",
    "product": "linux_kernel",
    "versions": [
      {
        "status": "affected",
        "version": "1da177e4c3f4",
        "lessThan": "fb824a99e148",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "1da177e4c3f4",
        "lessThan": "ddd2972d8e2d",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "1da177e4c3f4",
        "lessThan": "cfdc2fa4db57",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "1da177e4c3f4",
        "lessThan": "f636a40834d2",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "1da177e4c3f4",
        "lessThan": "33d9c814652b",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "1da177e4c3f4",
        "lessThan": "107e825cc448",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "1da177e4c3f4",
        "lessThan": "f694da720dcf",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "1da177e4c3f4",
        "lessThan": "e9730744bf3a",
        "versionType": "git"
      },
      {
        "status": "unaffected",
        "version": "4.19.316",
        "versionType": "git",
        "lessThanOrEqual": "4.20"
      },
      {
        "status": "unaffected",
        "version": "5.4.278",
        "versionType": "git",
        "lessThanOrEqual": "5.5"
      },
      {
        "status": "unaffected",
        "version": "5.10.219",
        "versionType": "git",
        "lessThanOrEqual": "5.11"
      },
      {
        "status": "unaffected",
        "version": "5.15.161",
        "versionType": "git",
        "lessThanOrEqual": "5.16"
      },
      {
        "status": "unaffected",
        "version": "6.1.94",
        "versionType": "git",
        "lessThanOrEqual": "6.2"
      },
      {
        "status": "unaffected",
        "version": "6.6.34",
        "versionType": "git",
        "lessThanOrEqual": "6.7"
      },
      {
        "status": "unaffected",
        "version": "6.9.5",
        "versionType": "git",
        "lessThanOrEqual": "6.10"
      },
      {
        "status": "unaffected",
        "version": "6.10",
        "versionType": "git",
        "lessThanOrEqual": "*"
      }
    ],
    "defaultStatus": "unaffected"
  }
]

AI Score

7.3

Confidence

High

SSVC

Exploitation

none

Automatable

no

Technical Impact

total