CVE-2026-80671 (GCVE-0-2026-80671)
Vulnerability from cvelistv5
Published
2026-08-28 06:49
Modified
2026-08-29 06:21
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: perf sched: Fix register_pid() overflow, strcpy, and BUG_ON register_pid() has several issues when processing untrusted perf.data: 1. Integer overflow: (pid + 1) * sizeof(struct task_desc *) can wrap to a small value on 32-bit systems when pid is large (e.g. 0x40000000), causing realloc to return a tiny buffer followed by out-of-bounds writes in the initialization loop. 2. Heap buffer overflow: strcpy(task->comm, comm) copies the untrusted comm string into a fixed 20-byte COMM_LEN buffer with no length check. 3. BUG_ON on allocation failure: perf.data is untrusted input, so allocation failures should be handled gracefully rather than killing the process. 4. Realloc of sched->tasks assigned directly back, leaking the old pointer on failure; nr_tasks incremented before the realloc, leaving corrupted state on failure. Cap pid at PID_MAX_LIMIT (4194304, matching the kernel's maximum on 64-bit), replace strcpy with strlcpy, guard against NULL comm, replace BUG_ON with NULL returns using safe realloc patterns, and add NULL checks in callers that dereference the result.
Impacted products
Vendor Product Version
Linux Linux Version: ec156764d424dd67283c2cd5e9f6f1b8388364ac
Version: ec156764d424dd67283c2cd5e9f6f1b8388364ac
Version: ec156764d424dd67283c2cd5e9f6f1b8388364ac
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "tools/perf/builtin-sched.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "652cea73b7b7b7c622a2be670e44e3c499c6d49f",
              "status": "affected",
              "version": "ec156764d424dd67283c2cd5e9f6f1b8388364ac",
              "versionType": "git"
            },
            {
              "lessThan": "5ea1dcc9418c4e06ce29ed5170596f497ba86872",
              "status": "affected",
              "version": "ec156764d424dd67283c2cd5e9f6f1b8388364ac",
              "versionType": "git"
            },
            {
              "lessThan": "5949d339f5ec98752d56dcd4e36f619a59d513a5",
              "status": "affected",
              "version": "ec156764d424dd67283c2cd5e9f6f1b8388364ac",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "tools/perf/builtin-sched.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.32"
            },
            {
              "lessThan": "2.6.32",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.40",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.1.*",
              "status": "unaffected",
              "version": "7.1.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.40",
                  "versionStartIncluding": "2.6.32",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.1.5",
                  "versionStartIncluding": "2.6.32",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2",
                  "versionStartIncluding": "2.6.32",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nperf sched: Fix register_pid() overflow, strcpy, and BUG_ON\n\nregister_pid() has several issues when processing untrusted perf.data:\n\n1. Integer overflow: (pid + 1) * sizeof(struct task_desc *) can wrap\n   to a small value on 32-bit systems when pid is large (e.g.\n   0x40000000), causing realloc to return a tiny buffer followed by\n   out-of-bounds writes in the initialization loop.\n\n2. Heap buffer overflow: strcpy(task-\u003ecomm, comm) copies the\n   untrusted comm string into a fixed 20-byte COMM_LEN buffer with\n   no length check.\n\n3. BUG_ON on allocation failure: perf.data is untrusted input, so\n   allocation failures should be handled gracefully rather than\n   killing the process.\n\n4. Realloc of sched-\u003etasks assigned directly back, leaking the old\n   pointer on failure; nr_tasks incremented before the realloc,\n   leaving corrupted state on failure.\n\nCap pid at PID_MAX_LIMIT (4194304, matching the kernel\u0027s maximum\non 64-bit), replace strcpy with strlcpy, guard against NULL comm,\nreplace BUG_ON with NULL returns using safe realloc patterns, and\nadd NULL checks in callers that dereference the result."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 9.3,
            "baseSeverity": "CRITICAL",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The flaw is in userspace perf\u0027s builtin-sched.c reached only when a local user runs perf sched replay or perf sched latency against a crafted perf.data file via perf_session__process_events; it is not triggered by remote network packets, kernel syscalls, or in-kernel sched code.\nAC:L - The attacker fully controls untrusted perf.data sched_switch/sched_wakeup fields (prev_pid, next_pid, prev_comm, next_comm); large PIDs and overlong comm strings deterministically hit the integer-overflow realloc path or strcpy heap overflow without races or victim-specific memory layout.\nPR:N - In the malicious-trace threat model an external party needs no account or privileges on the victim host\u2014they only supply a crafted perf.data file for a developer, support engineer, or CI job to analyze with perf sched replay/latency.\nUI:N - Once a trace is submitted to triage or CI, perf sched replay/latency parses perf.data non-interactively through perf_sched__read_events without further per-event operator actions beyond automated invocation of the perf command on the supplied file.\nS:C - Malicious sched metadata embedded in an externally supplied perf.data crosses from the untrusted reporter/artifact domain into the analyst or CI host security authority when perf parses that file, matching the kernel CNA untrusted-artifact model used for crafted filesystem images.\nC:H - Integer-overflow-driven out-of-bounds writes into the pid_to_task table and strcpy heap overflow past task_desc.comm[20] corrupt adjacent heap objects and can disclose process memory beyond a few bounded bytes.\nI:H - Attacker-controlled overflows corrupt task_desc function pointers and heap metadata (including the atoms pointer), providing controllable userspace memory corruption suitable for arbitrary write and code execution in the perf process.\nA:H - Pre-fix BUG_ON paths abort the perf process on allocation failure, and the heap out-of-bounds writes reliably crash or hang perf during register_pid() while parsing malicious perf.data."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-29T06:21:57.947Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/652cea73b7b7b7c622a2be670e44e3c499c6d49f"
        },
        {
          "url": "https://git.kernel.org/stable/c/5ea1dcc9418c4e06ce29ed5170596f497ba86872"
        },
        {
          "url": "https://git.kernel.org/stable/c/5949d339f5ec98752d56dcd4e36f619a59d513a5"
        }
      ],
      "title": "perf sched: Fix register_pid() overflow, strcpy, and BUG_ON",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-80671",
    "datePublished": "2026-08-28T06:49:11.744Z",
    "dateReserved": "2026-08-26T14:34:25.782Z",
    "dateUpdated": "2026-08-29T06:21:57.947Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…