---
id: CVE-2025-40081
title: 'perf: arm_spe: Prevent overflow in PERF_IDX2OFF()'
summary: |-
  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).
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cvssSource: cna
vendor: Linux
product: Linux
affected:
  - >-
    Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 <
    656e9a5d69acdd1b20462f4a33378b90ddcb9626
  - >-
    Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 <
    9c045d4501f7f70724a3bbb561f4f22d292bbfe6
  - >-
    Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 <
    5d01f2b81568289443d22f1e13a363f829de6343
  - >-
    Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 <
    7500384d3c9587593d75ded3b006835e7aa73ef8
  - >-
    Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 <
    379cae2cb982f571cda9493ac573ab71125fd299
  - >-
    Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 <
    1a19ba8e1f4ff24ece8ca69b79df8442c431db90
  - >-
    Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 <
    e516cfd19b0f4c774a57b17fb43a7f41991f0735
  - >-
    Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 <
    a29fea30dd93da16652930162b177941abd8c75e
  - Linux 4.15
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-10-15T21:56:43.611759Z'
published: '2025-10-28'
updated: '2026-10-15'
sourceUpdated: '2026-10-15T22:02:37.490Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2025-40081'
references:
  - url: 'https://git.kernel.org/stable/c/656e9a5d69acdd1b20462f4a33378b90ddcb9626'
  - url: 'https://git.kernel.org/stable/c/9c045d4501f7f70724a3bbb561f4f22d292bbfe6'
  - url: 'https://git.kernel.org/stable/c/5d01f2b81568289443d22f1e13a363f829de6343'
  - url: 'https://git.kernel.org/stable/c/7500384d3c9587593d75ded3b006835e7aa73ef8'
  - url: 'https://git.kernel.org/stable/c/379cae2cb982f571cda9493ac573ab71125fd299'
  - url: 'https://git.kernel.org/stable/c/1a19ba8e1f4ff24ece8ca69b79df8442c431db90'
  - url: 'https://git.kernel.org/stable/c/e516cfd19b0f4c774a57b17fb43a7f41991f0735'
  - url: 'https://git.kernel.org/stable/c/a29fea30dd93da16652930162b177941abd8c75e'
tags:
  - cve.org
epss: 0.00154
epssPercentile: 0.04522
ingestedAt: '2026-10-15T22:48:25.545Z'
---

## Overview

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).

## Affected

- `Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 < 656e9a5d69acdd1b20462f4a33378b90ddcb9626`
- `Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 < 9c045d4501f7f70724a3bbb561f4f22d292bbfe6`
- `Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 < 5d01f2b81568289443d22f1e13a363f829de6343`
- `Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 < 7500384d3c9587593d75ded3b006835e7aa73ef8`
- `Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 < 379cae2cb982f571cda9493ac573ab71125fd299`
- `Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 < 1a19ba8e1f4ff24ece8ca69b79df8442c431db90`
- `Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 < e516cfd19b0f4c774a57b17fb43a7f41991f0735`
- `Linux >= d5d9696b03808bc6be723cc85288c912c3a05606 < a29fea30dd93da16652930162b177941abd8c75e`
- `Linux 4.15`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
