FKIE_CVE-2026-142820

Vulnerability from fkie_nvd - Published: 2026-12-03 04:18 - Updated: 2026-12-03 04:18
Severity
Summary
In the Linux kernel, the following vulnerability has been resolved: kgdb: Fix buffer overflow in the 'm' packet handler gdb_cmd_memread() passes the length of the 'm' packet straight to kgdb_mem2hex(), which hex-encodes the reply into remcom_out_buffer[BUFMAX] without checking that the reply fits. A client on the KGDB I/O console can ask for a read of any size, and the hex encoding runs off the end of the buffer. kgdb_mem2hex() takes that length as an int count, so 2^31 truncates to a negative value and copy_from_kernel_nofault() is handed buf + count as its destination. On x86 BUFMAX is 1024, so a read of 512 bytes overruns by the single byte that terminates the hex string: BUG: KASAN: global-out-of-bounds in kgdb_mem2hex+0x1dd/0x230 Write of size 1 at addr ffffffff87651780 by task sh/1 ... The buggy address belongs to the variable: remcom_out_buffer+0x400/0x420 Bounds check the length before the hex encoding: if (length > (BUFMAX - 1) / 2) { error_packet(remcom_out_buffer, -EINVAL); return; } gdbstub_msg_write() already bounds the count it hex-encodes against BUFMAX. Reads over the limit never returned valid data, so an error reply loses nothing.
Impacted products
Vendor Product Version

{
  "affected": [
    {
      "affectedData": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/debug/gdbstub.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "45713e6218a0ae6e64a098593abaeab330ed476a",
              "status": "affected",
              "version": "dc7d552705215ac50a0617fcf51bb9c736255b8e",
              "versionType": "git"
            },
            {
              "lessThan": "b6ee49b448b539bbf09f638b57bbfb76da343764",
              "status": "affected",
              "version": "dc7d552705215ac50a0617fcf51bb9c736255b8e",
              "versionType": "git"
            },
            {
              "lessThan": "e4eb329621b594a18e53f40c4021a0e18492dadb",
              "status": "affected",
              "version": "dc7d552705215ac50a0617fcf51bb9c736255b8e",
              "versionType": "git"
            },
            {
              "lessThan": "17e89acda585072f5bce5852f16ddf5063c83819",
              "status": "affected",
              "version": "dc7d552705215ac50a0617fcf51bb9c736255b8e",
              "versionType": "git"
            },
            {
              "lessThan": "1397005178f69365f94457f1a402835f5e498008",
              "status": "affected",
              "version": "dc7d552705215ac50a0617fcf51bb9c736255b8e",
              "versionType": "git"
            },
            {
              "lessThan": "129119bb1c3dba3c47bc620a831355dbd1451c7b",
              "status": "affected",
              "version": "dc7d552705215ac50a0617fcf51bb9c736255b8e",
              "versionType": "git"
            },
            {
              "lessThan": "61485a6e004eaf84d5ee4d7eb27501247ce77524",
              "status": "affected",
              "version": "dc7d552705215ac50a0617fcf51bb9c736255b8e",
              "versionType": "git"
            },
            {
              "lessThan": "ac0159129e2cb99a70c4b80cfbf58d03e092dc7b",
              "status": "affected",
              "version": "dc7d552705215ac50a0617fcf51bb9c736255b8e",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/debug/gdbstub.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.26"
            },
            {
              "lessThan": "2.6.26",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.275",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.226",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.193",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.163",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.117",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.63",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.4-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nkgdb: Fix buffer overflow in the \u0027m\u0027 packet handler\n\ngdb_cmd_memread() passes the length of the \u0027m\u0027 packet straight to\nkgdb_mem2hex(), which hex-encodes the reply into\nremcom_out_buffer[BUFMAX] without checking that the reply fits. A\nclient on the KGDB I/O console can ask for a read of any size, and\nthe hex encoding runs off the end of the buffer. kgdb_mem2hex() takes\nthat length as an int count, so 2^31 truncates to a negative value\nand copy_from_kernel_nofault() is handed buf + count as its\ndestination.\n\nOn x86 BUFMAX is 1024, so a read of 512 bytes overruns by the single\nbyte that terminates the hex string:\n\n  BUG: KASAN: global-out-of-bounds in kgdb_mem2hex+0x1dd/0x230\n  Write of size 1 at addr ffffffff87651780 by task sh/1\n  ...\n  The buggy address belongs to the variable:\n   remcom_out_buffer+0x400/0x420\n\nBounds check the length before the hex encoding:\n\n\t\tif (length \u003e (BUFMAX - 1) / 2) {\n\t\t\terror_packet(remcom_out_buffer, -EINVAL);\n\t\t\treturn;\n\t\t}\n\ngdbstub_msg_write() already bounds the count it hex-encodes\nagainst BUFMAX. Reads over the limit never returned valid data,\nso an error reply loses nothing."
    }
  ],
  "id": "CVE-2026-142820",
  "lastModified": "2026-12-03T04:18:17.443",
  "metrics": {},
  "published": "2026-12-03T04:18:17.443",
  "references": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/129119bb1c3dba3c47bc620a831355dbd1451c7b"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/1397005178f69365f94457f1a402835f5e498008"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/17e89acda585072f5bce5852f16ddf5063c83819"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/45713e6218a0ae6e64a098593abaeab330ed476a"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/61485a6e004eaf84d5ee4d7eb27501247ce77524"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/ac0159129e2cb99a70c4b80cfbf58d03e092dc7b"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/b6ee49b448b539bbf09f638b57bbfb76da343764"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/e4eb329621b594a18e53f40c4021a0e18492dadb"
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "vulnStatus": "Received"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.