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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-39821— perf: Avoid undefined behavior from stopping/starting inactive events

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于对非活动事件执行停止或启动操作时未正确处理事件状态,可能导致未定义行为。

CVSS 7.8 · High EPSS 0.16% · P5

Affected Version Matrix 6

VendorProduct Version RangeStatus
Linux Linux 9734e25fbf5ae68eb04234b2cd14a4b36ab89141< d689135aa9c5e4e0eab5a92bbe35dab0c8d6677f affected
9734e25fbf5ae68eb04234b2cd14a4b36ab89141< b64fdd422a85025b5e91ead794db9d3ef970e369 affected
6.16 affected
< 6.16 unaffected
6.16.5≤ 6.16.* unaffected
6.17≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-39821

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: Avoid undefined behavior from stopping/starting inactive events
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: perf: Avoid undefined behavior from stopping/starting inactive events Calling pmu->start()/stop() on perf events in PERF_EVENT_STATE_OFF can leave event->hw.idx at -1. When PMU drivers later attempt to use this negative index as a shift exponent in bitwise operations, it leads to UBSAN shift-out-of-bounds reports. The issue is a logical flaw in how event groups handle throttling when some members are intentionally disabled. Based on the analysis and the reproducer provided by Mark Rutland (this issue on both arm64 and x86-64). The scenario unfolds as follows: 1. A group leader event is configured with a very aggressive sampling period (e.g., sample_period = 1). This causes frequent interrupts and triggers the throttling mechanism. 2. A child event in the same group is created in a disabled state (.disabled = 1). This event remains in PERF_EVENT_STATE_OFF. Since it hasn't been scheduled onto the PMU, its event->hw.idx remains initialized at -1. 3. When throttling occurs, perf_event_throttle_group() and later perf_event_unthrottle_group() iterate through all siblings, including the disabled child event. 4. perf_event_throttle()/unthrottle() are called on this inactive child event, which then call event->pmu->start()/stop(). 5. The PMU driver receives the event with hw.idx == -1 and attempts to use it as a shift exponent. e.g., in macros like PMCNTENSET(idx), leading to the UBSAN report. The throttling mechanism attempts to start/stop events that are not actively scheduled on the hardware. Move the state check into perf_event_throttle()/perf_event_unthrottle() so that inactive events are skipped entirely. This ensures only active events with a valid hw.idx are processed, preventing undefined behavior and silencing UBSAN warnings. The corrected check ensures true before proceeding with PMU operations. The problem can be reproduced with the syzkaller reproducer:
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于对非活动事件执行停止或启动操作时未正确处理事件状态,可能导致未定义行为。
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

Vendor Product Affected Versions CPE Subscribe
Linux Linux 9734e25fbf5ae68eb04234b2cd14a4b36ab89141 ~ d689135aa9c5e4e0eab5a92bbe35dab0c8d6677f -
Linux Linux 6.16 -

II. Public POCs for CVE-2025-39821

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-39821

请登录查看更多情报信息。

Same Patch Batch · Linux · 2025-09-16 · 115 CVEs total

CVE-2022-50350 9.8 CRITICAL scsi: target: iscsi: Fix a race condition between login_work and the login thread
CVE-2025-39806 8.8 HIGH HID: multitouch: fix slab out-of-bounds access in mt_report_fixup()
CVE-2023-53305 8.8 HIGH Bluetooth: L2CAP: Fix use-after-free
CVE-2023-53297 8.8 HIGH Bluetooth: L2CAP: fix "bad unlock balance" in l2cap_disconnect_rsp
CVE-2025-39827 8.8 HIGH net: rose: include node references in rose_neigh refcount
CVE-2025-39826 8.8 HIGH net: rose: convert 'use' field to refcount_t
CVE-2023-53315 8.8 HIGH wifi: ath11k: Fix SKB corruption in REO destination ring
CVE-2023-53322 8.8 HIGH scsi: qla2xxx: Wait for io return on terminate rport
CVE-2025-39809 8.4 HIGH HID: intel-thc-hid: intel-quicki2c: Fix ACPI dsd ICRS/ISUB length
CVE-2023-53333 8.2 HIGH netfilter: conntrack: dccp: copy entire header to stack buffer, not just basic one
CVE-2022-50341 7.8 HIGH cifs: fix oops during encryption
CVE-2025-39810 7.8 HIGH bnxt_en: Fix memory corruption when FW resources change during ifdown
CVE-2023-53311 7.8 HIGH nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput
CVE-2023-53314 7.8 HIGH fbdev/ep93xx-fb: Do not assign to struct fb_info.dev
CVE-2023-53286 7.8 HIGH RDMA/mlx5: Return the firmware result upon destroying QP/RQ
CVE-2025-39815 7.8 HIGH RISC-V: KVM: fix stack overrun when loading vlenb
CVE-2025-39818 7.8 HIGH HID: intel-thc-hid: intel-thc: Fix incorrect pointer arithmetic in I2C regs save
CVE-2023-53274 7.8 HIGH clk: mediatek: mt8183: Add back SSPM related clocks
CVE-2025-39836 7.8 HIGH efi: stmm: Fix incorrect buffer allocation method
CVE-2025-39825 7.8 HIGH smb: client: fix race with concurrent opens in rename(2)

Showing top 20 of 115 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2025-39821

No comments yet


Leave a comment