CVE-2025-21895
perf/core: Order the PMU list to fix warning about unordered pmu_ctx_list
Mitigation
- Upgrade Linux to 2016066c66192a99d9e0ebf433789c490a6785a2 or later.
Who should check
- Anyone running Linux >= bd27568117664b8b3e259721393df420ed51f57b, < f0c3971405cef6892844016aa710121a02da3a23; >= bd27568117664b8b3e259721393df420ed51f57b, < 7d582eb6e4e100959ba07083d7563453c8c2a343; >= bd27568117664b8b3e259721393df420ed51f57b, < 3e812a70732d84b7873cea61a7f6349b9a9dcbf5; >= bd27568117664b8b3e259721393df420ed51f57b, < 2016066c66192a99d9e0ebf433789c490a6785a2
- Anyone running Linux 6.2
Vulnerability facts
- Affected
- Linux >= bd27568117664b8b3e259721393df420ed51f57b, < f0c3971405cef6892844016aa710121a02da3a23; >= bd27568117664b8b3e259721393df420ed51f57b, < 7d582eb6e4e100959ba07083d7563453c8c2a343; >= bd27568117664b8b3e259721393df420ed51f57b, < 3e812a70732d84b7873cea61a7f6349b9a9dcbf5; >= bd27568117664b8b3e259721393df420ed51f57b, < 2016066c66192a99d9e0ebf433789c490a6785a2; Linux 6.2
- Fixed in
- Linux 7d582eb6e4e100959ba07083d7563453c8c2a343, Linux 3e812a70732d84b7873cea61a7f6349b9a9dcbf5, Linux 2016066c66192a99d9e0ebf433789c490a6785a2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 4.7 (v3.1, NVD)CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: High
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 0.19% chance of exploitation in 30 days (percentile 5, 2026-11-26)
- CWE
- CWE-362
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: perf/core: Order the PMU list to fix warning about unordered pmu_ctx_list Syskaller triggers a warning due to prev_epc->pmu != next_epc->pmu in perf_event_swap_task_ctx_data(). vmcore shows that two lists have the same perf_event_pmu_context, but not in the same order. The problem is that the order of pmu_ctx_list for the parent is impacted by the time when an event/PMU is added. While the order for a child is impacted by the event order in the pinned_groups and flexible_groups. So the order of pmu_ctx_list in the parent and child may be different. To fix this problem, insert the perf_event_pmu_context to its proper place after iteration of the pmu_ctx_list. The follow testcase can trigger above warning: # perf record -e cycles --call-graph lbr -- taskset -c 3 ./a.out & # perf stat -e cpu-clock,cs -p xxx // xxx is the pid of a.out test.c void main() { int count = 0; pid_t pid; printf("%d running\n", getpid()); sleep(30); printf("running\n"); pid = fork(); if (pid == -1) { printf("fork error\n"); return; } if (pid == 0) { while (1) { count++; } } else { while (1) { count++; } } } The testcase first opens an LBR event, so it will allocate task_ctx_data, and then open tracepoint and software events, so the parent context will have 3 different perf_event_pmu_contexts. On inheritance, child ctx will insert the perf_event_pmu_context in another order and the warning will trigger. [ mingo: Tidied up the changelog. ]
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= bd27568117664b8b3e259721393df420ed51f57b, < f0c3971405cef6892844016aa710121a02da3a23; >= bd27568117664b8b3e259721393df420ed51f57b, < 7d582eb6e4e100959ba07083d7563453c8c2a343; >= bd27568117664b8b3e259721393df420ed51f57b, < 3e812a70732d84b7873cea61a7f6349b9a9dcbf5; >= bd27568117664b8b3e259721393df420ed51f57b, < 2016066c66192a99d9e0ebf433789c490a6785a2 | — | cvelist |
| Linux | 6.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-21895. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-21895.md Affected: Linux >= bd27568117664b8b3e259721393df420ed51f57b, < f0c3971405cef6892844016aa710121a02da3a23; >= bd27568117664b8b3e259721393df420ed51f57b, < 7d582eb6e4e100959ba07083d7563453c8c2a343; >= bd27568117664b8b3e259721393df420ed51f57b, < 3e812a70732d84b7873cea61a7f6349b9a9dcbf5; >= bd27568117664b8b3e25972… Fixed in: Linux 7d582eb6e4e100959ba07083d7563453c8c2a343, Linux 3e812a70732d84b7873cea61a7f6349b9a9dcbf5, Linux 2016066c66192a99d9e0ebf433789c490a6785a2 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2025-21895 being exploited?
There is no confirmed exploitation: CVE-2025-21895 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.19% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-21895?
Medium: CVSS 4.7 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2025-21895?
Linux >= bd27568117664b8b3e259721393df420ed51f57b, < f0c3971405cef6892844016aa710121a02da3a23; >= bd27568117664b8b3e259721393df420ed51f57b, < 7d582eb6e4e100959ba07083d7563453c8c2a343; >= bd27568117664b8b3e259721393df420ed51f57b, < 3e812a70732d84b7873cea61a7f6349b9a9dcbf5; >= bd27568117664b8b3e259721393df420ed51f57b, < 2016066c66192a99d9e0ebf433789c490a6785a2; Linux 6.2.
Is there a fix for CVE-2025-21895?
Yes. Fixed in Linux 7d582eb6e4e100959ba07083d7563453c8c2a343, Linux 3e812a70732d84b7873cea61a7f6349b9a9dcbf5, Linux 2016066c66192a99d9e0ebf433789c490a6785a2. Upgrade Linux to 2016066c66192a99d9e0ebf433789c490a6785a2 or later.
How do I check if I'm affected by CVE-2025-21895?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.