CVE-2025-21889
JSON

7.8high

perf/core: Add RCU read lock protection to perf_iterate_ctx()

Severity
7.8high CVSS:3.1 by Linux
Exploit likelihood
0.31% (higher than 16% of CVEs)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: perf/core: Add RCU read lock protection to perf_iterate_ctx() The perf_iterate_ctx() function performs RCU list traversal but currently lacks RCU read lock protection. This causes lockdep warnings when running perf probe with unshare(1) under CONFIG_PROVE_RCU_LIST=y: WARNING: suspicious RCU usage kernel/events/core.c:8168 RCU-list traversed in non-reader section!! Call Trace: lockdep_rcu_suspicious ? perf_event_addr_filters_apply perf_iterate_ctx perf_event_exec begin_new_exec ? load_elf_phdrs load_elf_binary ? lock_acquire ? find_held_lock ? bprm_execve bprm_execve do_execveat_common.isra.0 __x64_sys_execve do_syscall_64 entry_SYSCALL_64_after_hwframe This protection was previously present but was removed in commit bd2756811766 ("perf: Rewrite core context handling"). Add back the necessary rcu_read_lock()/rcu_read_unlock() pair around perf_iterate_ctx() call in perf_event_exec(). [ mingo: Use scoped_guard() as suggested by Peter ]

Affected

Product or packageVersionsReported by
Linux Linuxfrom bd27568117664b8b3e259721393df420ed51f57b before f390c2eea571945f357a2d3b9fcb1c015767132e, from bd27568117664b8b3e259721393df420ed51f57b before a2475ccad6120546ea45dbcd6cd1f74dc565ef6b, from bd27568117664b8b3e259721393df420ed51f57b before dd536566dda9a551fc2a2acfab5313a5bb13ed02, from bd27568117664b8b3e259721393df420ed51f57b before 0fe8813baf4b2e865d3b2c735ce1a15b86002c74, 6.2
Not affected: before 6.2, from 6.6.81 up to 6.6.*, from 6.12.18 up to 6.12.*, from 6.13.6 up to 6.13.*, from 6.14 up to *
CVE List
linux linux_kernelfrom 6.2 before 6.6.81, from 6.7 before 6.12.18, from 6.13 before 6.13.6, 6.14NVD

All scores

Linux7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: perf/core: Add RCU read lock protection to perf_iterate_ctx() The perf_iterate_ctx() function performs RCU list traversal but currently lacks RCU read lock protection. This causes lockdep warnings when running perf probe with unshare(1) under CONFIG_PROVE_RCU_LIST=y: WARNING: suspicious RCU usage kernel/events/core.c:8168 RCU-list traversed in non-reader section!! Call Trace: lockdep_rcu_suspicious ? perf_event_addr_filters_apply perf_iterate_ctx perf_event_exec begin_new_exec ? load_elf_phdrs load_elf_binary ? lock_acquire ? find_held_lock ? bprm_execve bprm_execve do_execveat_common.isra.0 __x64_sys_execve do_syscall_64 entry_SYSCALL_64_after_hwframe This protection was previously present but was removed in commit bd2756811766 ("perf: Rewrite core context handling"). Add back the necessary rcu_read_lock()/rcu_read_unlock() pair around perf_iterate_ctx() call in perf_event_exec(). [ mingo: Use scoped_guard() as suggested by Peter ]

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: perf/core: Añadir protección de bloqueo de lectura de RCU a perf_iterate_ctx(). La función perf_iterate_ctx() recorre la lista de RCU, pero actualmente carece de protección de bloqueo de lectura de RCU. Esto genera advertencias de lockdep al ejecutar perf probe con unshare(1) en CONFIG_PROVE_RCU_LIST=y: ADVERTENCIA: uso sospechoso de RCU kernel/events/core.c:8168 ¡Lista de RCU recorrida en la sección de no lectura! Rastreo de llamadas: lockdep_rcu_suspicious ? perf_event_addr_filters_apply perf_iterate_ctx perf_event_exec begin_new_exec ? load_elf_phdrs load_elf_binary ? lock_acquire ? find_held_lock ? bprm_execve bprm_execve do_execveat_common.isra.0 __x64_sys_execve do_syscall_64 entry_SYSCALL_64_after_hwframe Esta protección ya existía, pero se eliminó en la confirmación bd2756811766 ("perf: Reescribir la gestión del contexto principal"). Se ha añadido de nuevo el par necesario rcu_read_lock()/rcu_read_unlock() en la llamada a perf_iterate_ctx() en perf_event_exec(). [mingo: Usar scoped_guard() como sugirió Peter]

References

Sources

SourceRecordLicence
CVE ListCVE-2025-21889 changed 2026-10-15CVE Terms of Use
NVDCVE-2025-21889 changed 2026-10-15Public domain