VYPR
Unrated severityNVD Advisory· Published Oct 28, 2025· Updated Apr 15, 2026

CVE-2025-40081

CVE-2025-40081

Description

In the Linux kernel, the following vulnerability has been resolved:

perf: arm_spe: Prevent overflow in PERF_IDX2OFF()

Cast nr_pages to unsigned long to avoid overflow when handling large AUX buffer sizes (>= 2 GiB).

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Integer overflow in arm_spe PERF_IDX2OFF() when using AUX buffers >= 2 GiB, fixed by casting nr_pages to unsigned long.

Vulnerability

Overview

The Linux kernel's ARM Statistical Profiling Extension (SPE) driver contains an integer overflow vulnerability in the PERF_IDX2OFF() macro. This macro computes an offset using the nr_pages variable, which represents the number of pages in the AUX buffer. When the buffer size is 2 GiB or larger, the multiplication in the offset calculation can overflow a 32-bit integer, producing an incorrect result [1].

Exploitation

Conditions

An attacker would need the ability to configure a large AUX buffer (≥ 2 GiB) for a perf event on an ARM system with SPE hardware support. This requires privileges such as CAP_PERFMON or root access. No network access is necessary—the attack is local. The overflow occurs during buffer setup, before data collection starts.

Impact

The miscalculated offset can cause the driver to write to or read from an incorrect memory location. This may lead to memory corruption, denial of service, or information disclosure. The exact impact depends on system memory layout and kernel hardening, but the overflow could be leveraged by an unprivileged user to compromise system stability or leak sensitive data [1].

Mitigation

The fix, committed to the Linux kernel stable tree, casts nr_pages to unsigned long before the arithmetic operation, preventing overflow for any buffer size up to the maximum supported by the architecture [1]. Users should apply the patch or update to a kernel version containing the commit.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

8

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.