Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2025-21895 — kernel

🟡 CVSS 4.7 — Medium ✅ No Known Exploit NVD
4.7
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

perf/core: Order the PMU list to fix warning about unordered pmu_ctx_list

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

How this vulnerability can be exploited

This issue can be reached with local access to the system, attack complexity is high, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.

Affected software

CVE-2025-21895 is recorded against 2 packages.

  • kernel (from 6.13.0 up to 6.13.6)
  • linux-kernel

Timeline and source

Published on 1 April 2025 and last revised on 12 August 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
github.com (Advisory)
nvd.nist.gov (Advisory)
git.kernel.org (Package)

CVE-2025-21895 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity Medium
CVSS Score 4.7
CVSS Vector CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE N/A
Public Exploit ✅ No
Source NVD
Published 2025-04-01
Updated 2026-08-20
Modified 2026-08-12

Affected Packages

Software From version Fixed in
kernel 6.13.0 6.13.6
linux-kernel

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in kernel

CVE-2025-21895 is rated CVSS 4.7 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.