Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-21895— perf/core: Order the PMU list to fix warning about unordered pmu_ctx_list

EPSS 0.06% · P20
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2025-21895

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
perf/core: Order the PMU list to fix warning about unordered pmu_ctx_list
Source: NVD (National Vulnerability Database)
Vulnerability 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. ]
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于PMU列表顺序问题导致关于无序pmu_ctx_list的警告。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
LinuxLinux bd27568117664b8b3e259721393df420ed51f57b ~ f0c3971405cef6892844016aa710121a02da3a23 -
LinuxLinux 6.2 -

II. Public POCs for CVE-2025-21895

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-21895

登录查看更多情报信息。

Same Patch Batch · Linux · 2025-04-01 · 93 CVEs total

CVE-2025-219478.1 HIGHksmbd: fix type confusion via race condition when using ipc_msg_send_request
CVE-2025-21926net: gso: fix ownership in __udp_gso_segment
CVE-2025-21932mm: abort vma_modify() on merge out of memory failure
CVE-2025-21935rapidio: add check for rio_add_net() in rio_scan_alloc_net()
CVE-2025-21937Bluetooth: Add check for mgmt_alloc_skb() in mgmt_remote_name()
CVE-2025-21936Bluetooth: Add check for mgmt_alloc_skb() in mgmt_device_connected()
CVE-2025-21939drm/xe/hmm: Don't dereference struct page pointers without notifier lock
CVE-2025-21938mptcp: fix 'scheduling while atomic' in mptcp_pm_nl_append_new_local_addr
CVE-2025-21934rapidio: fix an API misues when rio_add_net() fails
CVE-2025-21928HID: intel-ish-hid: Fix use-after-free issue in ishtp_hid_remove()
CVE-2025-21927nvme-tcp: fix potential memory corruption in nvme_tcp_recv_pdu()
CVE-2025-21929HID: intel-ish-hid: Fix use-after-free issue in hid_ishtp_cl_remove()
CVE-2025-21925llc: do not use skb_get() before dev_queue_xmit()
CVE-2025-21924net: hns3: make sure ptp clock is unregister and freed if hclge_ptp_get_cycle returns an e
CVE-2025-21922ppp: Fix KMSAN uninit-value warning with bpf
CVE-2025-21923HID: hid-steam: Fix use-after-free when detaching device
CVE-2025-21920vlan: enforce underlying device type
CVE-2025-21921net: ethtool: netlink: Allow NULL nlattrs when getting a phy_device
CVE-2025-21919sched/fair: Fix potential memory corruption in child_cfs_rq_on_list
CVE-2025-21918usb: typec: ucsi: Fix NULL pointer access

Showing top 20 of 93 CVEs. View all on vendor page → →

IV. Related Vulnerabilities

V. Comments for CVE-2025-21895

No comments yet


Leave a comment