CVE-2025-38424

perf: Fix sample vs do_exit()

MEDIUM
5.5
CVSS Score
Published: July 25, 2025 at 02:16 PM UTC
Updated: October 15, 2026 at 10:18 PM UTC
2 products affected across 2 vendorsLinux KernelDebian Linux

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: perf: Fix sample vs do_exit() Baisheng Gao reported an ARM64 crash, which Mark decoded as being a synchronous external abort -- most likely due to trying to access MMIO in bad ways. The crash further shows perf trying to do a user stack sample while in exit_mmap()'s tlb_finish_mmu() -- i.e. while tearing down the address space it is trying to access. It turns out that we stop perf after we tear down the userspace mm; a receipie for disaster, since perf likes to access userspace for various reasons. Flip this order by moving up where we stop perf in do_exit(). Additionally, harden PERF_SAMPLE_CALLCHAIN and PERF_SAMPLE_STACK_USER to abort when the current task does not have an mm (exit_mm() makes sure to set current->mm = NULL; before commencing with the actual teardown). Such that CPU wide events don't trip on this same problem.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

3.7 ≤ v < 5.4.2955.11 ≤ v < 5.15.1865.16 ≤ v < 6.1.1425.5 ≤ v < 5.10.2396.13 ≤ v < 6.15.46.2 ≤ v < 6.6.956.7 ≤ v < 6.12.356.166.16 rc16.16 rc2c5ebcedb566ef17bda7b02686e0d658a7bb42ee7
Vendor states this is fixed in 2ee6044a693735396bb47eeaba1ac3ae26c1c99b (fixed)
Vendor states this is fixed in 456019adaa2f5366b89c868dea9b483179bece54 (fixed)
Vendor states this is fixed in 4f6fc782128355931527cefe3eb45338abd8ab39 (fixed)
Vendor states this is fixed in 507c9a595bad3abd107c6a8857d7fd125d89f386 (fixed)
Vendor states this is fixed in 7311970d07c4606362081250da95f2c7901fc0db (fixed)
Vendor states this is fixed in 7b8f3c72175c6a63a95cf2e219f8b78e2baad34e (fixed)
Vendor states this is fixed in 975ffddfa2e19823c719459d2364fcaa17673964 (fixed)
Vendor states this is fixed in a9f6aab7910a0ef2895797f15c947f6d1053160f (fixed)
Vendor states this is fixed in 3.7 (unaffected)
Vendor states this is fixed in 5.10.239 (unaffected)
Vendor states this is fixed in 5.15.186 (unaffected)
Vendor states this is fixed in 5.4.295 (unaffected)
Vendor states this is fixed in 6.1.142 (unaffected)
Vendor states this is fixed in 6.12.35 (unaffected)
Vendor states this is fixed in 6.15.4 (unaffected)
Vendor states this is fixed in 6.16 (unaffected)
Vendor states this is fixed in 6.6.95 (unaffected)

References (10)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2ee6044a693735396bb47eeaba1ac3ae26c1c99b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/456019adaa2f5366b89c868dea9b483179bece54
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4f6fc782128355931527cefe3eb45338abd8ab39
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/507c9a595bad3abd107c6a8857d7fd125d89f386
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7311970d07c4606362081250da95f2c7901fc0db
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7b8f3c72175c6a63a95cf2e219f8b78e2baad34e
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/975ffddfa2e19823c719459d2364fcaa17673964
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a9f6aab7910a0ef2895797f15c947f6d1053160f

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card