Skip to content
Heist/ feed
Back to feed
HighFix available

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

Type: advisorySources: OSV

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 ]

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.18, 6.13.6, 6.6.81
CVEs
CVE-2025-21889
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 14:46 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 27 Mar 2025, 14:57 UTC

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 ]

osv:CVE-2025-21889

Kernel

Fixed versions: 6.6.81, 6.12.18, 6.13.6

Complete source record
{
  "id": "c543c34d2d86ef7d6f169a7f6cbf2df4bcbc8c06e6348a0c7e5862aa029277bd",
  "url": "https://osv.dev/vulnerability/CVE-2025-21889",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "perf/core: Add RCU read lock protection to perf_iterate_ctx()",
    "summary": "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 ]",
    "evidence": "osv:CVE-2025-21889",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.6.81",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.18",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.13.6",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-21889",
      "aliases": [
        "CVE-2025-21889"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "bd27568117664b8b3e259721393df420ed51f57b"
                },
                {
                  "fixed": "f390c2eea571945f357a2d3b9fcb1c015767132e"
                },
                {
                  "fixed": "a2475ccad6120546ea45dbcd6cd1f74dc565ef6b"
                },
                {
                  "fixed": "dd536566dda9a551fc2a2acfab5313a5bb13ed02"
                },
                {
                  "fixed": "0fe8813baf4b2e865d3b2c735ce1a15b86002c74"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21889.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.81"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.18"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.13.6"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21889.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:29.947225370Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/0fe8813baf4b2e865d3b2c735ce1a15b86002c74",
        "https://git.kernel.org/stable/c/a2475ccad6120546ea45dbcd6cd1f74dc565ef6b",
        "https://git.kernel.org/stable/c/dd536566dda9a551fc2a2acfab5313a5bb13ed02",
        "https://git.kernel.org/stable/c/f390c2eea571945f357a2d3b9fcb1c015767132e",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21889.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-21889",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21889.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-21889",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 496487,
  "published_at": "2025-03-27T14:57:15.897+00:00"
}