# CVE-2026-23311: perf/core: Fix invalid wait context in ctx_sched_in()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.11%, higher than 1% of CVEs (2026-12-01)
- Published: 2026-03-25T10:27:06.915Z
- Modified: 2026-06-17T10:21:18.397Z
- Weaknesses: CWE-667
- Assigned by: Linux

## Description

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

perf/core: Fix invalid wait context in ctx_sched_in()

Lockdep found a bug in the event scheduling when a pinned event was
failed and wakes up the threads in the ring buffer like below.

It seems it should not grab a wait-queue lock under perf-context lock.
Let's do it with irq_work.

  [   39.913691] =============================
  [   39.914157] [ BUG: Invalid wait context ]
  [   39.914623] 6.15.0-next-20250530-next-2025053 #1 Not tainted
  [   39.915271] -----------------------------
  [   39.915731] repro/837 is trying to lock:
  [   39.916191] ffff88801acfabd8 (&event->waitq){....}-{3:3}, at: __wake_up+0x26/0x60
  [   39.917182] other info that might help us debug this:
  [   39.917761] context-{5:5}
  [   39.918079] 4 locks held by repro/837:
  [   39.918530]  #0: ffffffff8725cd00 (rcu_read_lock){....}-{1:3}, at: __perf_event_task_sched_in+0xd1/0xbc0
  [   39.919612]  #1: ffff88806ca3c6f8 (&cpuctx_lock){....}-{2:2}, at: __perf_event_task_sched_in+0x1a7/0xbc0
  [   39.920748]  #2: ffff88800d91fc18 (&ctx->lock){....}-{2:2}, at: __perf_event_task_sched_in+0x1f9/0xbc0
  [   39.921819]  #3: ffffffff8725cd00 (rcu_read_lock){....}-{1:3}, at: perf_event_wakeup+0x6c/0x470

(As written by CVE List.)

## Affected

- Linux Linux: from f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6 before c67ab059953e3b66cb17ddd6524c23f9e1f6526d; from f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6 before 825f218ca70ef394c2b8546b313711d867b24584; from f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6 before 486ff5ad49bc50315bcaf6d45f04a33ef0a45ced; 6.15 (not affected: before 6.15; from 6.18.17 up to 6.18.*; from 6.19.7 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 6.15 before 6.18.17; from 6.19 before 6.19.7; 7.0

## References

- <https://git.kernel.org/stable/c/c67ab059953e3b66cb17ddd6524c23f9e1f6526d> (patch)
- <https://git.kernel.org/stable/c/825f218ca70ef394c2b8546b313711d867b24584> (patch)
- <https://git.kernel.org/stable/c/486ff5ad49bc50315bcaf6d45f04a33ef0a45ced> (patch)

## Sources

- CVE List: [CVE-2026-23311](https://www.cve.org/CVERecord?id=CVE-2026-23311), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2026-23311](https://nvd.nist.gov/vuln/detail/CVE-2026-23311), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-23311 · Whole record: https://cve.day/CVE-2026-23311.json · Rebuilt by cve.day 2026-11-25T22:59:16.665Z
