Stack-based Buffer Overflow Affecting kernel-debuginfo package, versions <0:4.14.349-188.564.amzn1


Severity

Recommended
high

Based on Amazon Linux security rating.

Threat Intelligence

EPSS
0.04% (6th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-AMZN201803-KERNELDEBUGINFO-7650114
  • published8 Aug 2024
  • disclosed5 Jul 2024

Introduced: 5 Jul 2024

CVE-2024-39480  (opens in a new tab)
CWE-121  (opens in a new tab)

How to fix?

Upgrade Amazon-Linux:2018.03 kernel-debuginfo to version 0:4.14.349-188.564.amzn1 or higher.
This issue was patched in ALAS-2024-1945.

NVD Description

Note: Versions mentioned in the description apply only to the upstream kernel-debuginfo package and not the kernel-debuginfo package as distributed by Amazon-Linux. See How to fix? for Amazon-Linux:2018.03 relevant fixed versions and status.

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.

CVSS Scores

version 3.1