Description
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.
Published: 2026-08-28
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This vulnerability arises when the Linux kernel processes untrusted perf.data files. The register_pid() routine suffers an integer overflow when calculating the size required for task descriptors on 32‑bit systems; the overflow causes realloc() to allocate a very small buffer, which is then written to out‑of‑bounds during initialization. A separate issue involves a raw strcpy of the task name into a fixed 20‑byte buffer, potentially overflowing the COMM_LEN buffer when the input string is longer than 19 characters. A BUG_ON triggered on allocation failure can terminate the kernel process, allowing an attacker to crash the system. Finally, a dangerous pointer leak occurs when a failed realloc() leaks the old pointer while the task count is already incremented. Together, these bugs enable an attacker to corrupt kernel memory, potentially leading to arbitrary code execution, privilege escalation, or a denial‑of‑service by crash.

Affected Systems

The affected component is the Linux kernel, specifically the perf sched subsystem. All Linux kernel builds before the patch commit applied in the referenced commits (5949d339f5ec98752d56dcd4e36f619a59d513a5, 5ea1dcc9418c4e06ce29ed5170596f497ba86872, 652cea73b7b7b7c622a2be670e44e3c499c6d49f) are potentially vulnerable. No specific version numbers are supplied, so any kernel that has not incorporated these fixes should be considered at risk.

Risk and Exploitability

The CVSS score is not disclosed, but the nature of the vulnerabilities—kernel buffer overflows and unchecked realloc failures—indicates a high severity rating. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog, so the likelihood of exploitation is uncertain but potentially significant for privileged users who can supply crafted perf.data. The most likely attack vector involves a local or remote attacker with access to the perf subsystem feeding malicious data, although the kernel could also be targeted via compromised tools that generate perf data. In the absence of mitigation, an attacker could trigger out‑of‑bounds writes or kernel crashes, leading to either denial of service or privilege escalation on the affected system.

Generated by OpenCVE AI on August 28, 2026 at 09:54 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a release that includes the commits fixing the register_pid() overflow, strncpy revocation, and BUG_ON handling
  • If an immediate kernel upgrade is unavailable, disable or restrict the perf subsystem so that untrusted perf data cannot be processed, or ensure that only trusted users generate perf data files
  • Apply standard secure coding practices to mitigate similar vulnerabilities: perform bounds checks before memory allocation, use safe string functions like strlcpy, and handle allocation failures gracefully to prevent kernel panics

Generated by OpenCVE AI on August 28, 2026 at 09:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 28 Aug 2026 10:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-119
CWE-680

Fri, 28 Aug 2026 07:30:00 +0000

Type Values Removed Values Added
Description 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.
Title perf sched: Fix register_pid() overflow, strcpy, and BUG_ON
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-28T06:49:11.744Z

Reserved: 2026-08-26T14:34:25.782Z

Link: CVE-2026-80671

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-28T08:16:52.410

Modified: 2026-08-28T08:16:52.410

Link: CVE-2026-80671

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-28T10:00:06Z

Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-680

    Integer Overflow to Buffer Overflow