CVE-2025-21889: perf/core: Add RCU read lock protection to perf_iterate_ctx()

Published Mar 27, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

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

The perfiteratectx() function performs RCU list traversal but currently lacks RCU read lock protection. This causes lockdep warnings when running perf probe with unshare(1) under CONFIGPROVERCULIST=y:

WARNING: suspicious RCU usage kernel/events/core.c:8168 RCU-list traversed in non-reader section!!

Call Trace: lockdeprcususpicious ? perfeventaddrfiltersapply perfiteratectx perfeventexec beginnewexec ? loadelfphdrs loadelfbinary ? lockacquire ? findheldlock ? bprmexecve bprmexecve doexecveatcommon.isra.0 x64sysexecve dosyscall64 entrySYSCALL64afterhwframe

This protection was previously present but was removed in commit bd2756811766 ("perf: Rewrite core context handling"). Add back the necessary rcureadlock()/rcureadunlock() pair around perfiteratectx() call in perfeventexec().

[ mingo: Use scopedguard() as suggested by Peter ]

Affected Software

8 affected components
Linux Linux kernel
Linux Linux kernel>=6.2<6.6.81
Linux Linux kernel>=6.7<6.12.18
Linux Linux kernel>=6.13<6.13.6
Linux Linux kernel=6.14-rc1
Linux Linux kernel=6.14-rc2
Linux Linux kernel=6.14-rc3
Linux Linux kernel=6.14-rc4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch bd2756811766
  2. Configuration

    When CONFIG_PROVE_RCU_LIST=y, ensure the fix is present that adds the necessary rcu_read_lock()/rcu_read_unlock() pair around perf_iterate_ctx() ("perf/core: Add RCU read lock protection to perf_iterate_ctx()"), resolving the lockdep warning "RCU-list traversed in non-reader section".

    Linux kernel CONFIG_PROVE_RCU_LIST = y

Event History

Mar 27, 2025
CVE Published
via MITRE·02:57 PM
Data Sourced
via MITRE·02:57 PM
DescriptionSeverity
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-21889?

CVE-2025-21889 has a moderate severity level due to its potential to cause lockdep warnings without proper RCU read lock protection.

2

How do I fix CVE-2025-21889?

To fix CVE-2025-21889, users should update their Linux Kernel to the latest version that includes the patch for the vulnerability.

3

What impact does CVE-2025-21889 have on system stability?

CVE-2025-21889 can lead to lockdep warnings, which may affect the overall stability of the Linux Kernel during performance operations.

4

Which versions of Linux Kernel are affected by CVE-2025-21889?

CVE-2025-21889 affects all versions of the Linux Kernel that have not implemented the necessary RCU read lock protection in the perf_iterate_ctx() function.

5

Is CVE-2025-21889 publicly known?

Yes, CVE-2025-21889 is a publicly disclosed vulnerability, making it crucial for users to address it promptly.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203