{"id":"CVE-2026-23311","aliases":["CVE-2026-23311"],"related":[],"kind":"vulnerability","state":"published","title":"perf/core: Fix invalid wait context in ctx_sched_in()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nperf/core: Fix invalid wait context in ctx_sched_in()\n\nLockdep found a bug in the event scheduling when a pinned event was\nfailed and wakes up the threads in the ring buffer like below.\n\nIt seems it should not grab a wait-queue lock under perf-context lock.\nLet's do it with irq_work.\n\n  [   39.913691] =============================\n  [   39.914157] [ BUG: Invalid wait context ]\n  [   39.914623] 6.15.0-next-20250530-next-2025053 #1 Not tainted\n  [   39.915271] -----------------------------\n  [   39.915731] repro/837 is trying to lock:\n  [   39.916191] ffff88801acfabd8 (&event->waitq){....}-{3:3}, at: __wake_up+0x26/0x60\n  [   39.917182] other info that might help us debug this:\n  [   39.917761] context-{5:5}\n  [   39.918079] 4 locks held by repro/837:\n  [   39.918530]  #0: ffffffff8725cd00 (rcu_read_lock){....}-{1:3}, at: __perf_event_task_sched_in+0xd1/0xbc0\n  [   39.919612]  #1: ffff88806ca3c6f8 (&cpuctx_lock){....}-{2:2}, at: __perf_event_task_sched_in+0x1a7/0xbc0\n  [   39.920748]  #2: ffff88800d91fc18 (&ctx->lock){....}-{2:2}, at: __perf_event_task_sched_in+0x1f9/0xbc0\n  [   39.921819]  #3: ffffffff8725cd00 (rcu_read_lock){....}-{1:3}, at: perf_event_wakeup+0x6c/0x470","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nperf/core: Fix invalid wait context in ctx_sched_in()\n\nLockdep found a bug in the event scheduling when a pinned event was\nfailed and wakes up the threads in the ring buffer like below.\n\nIt seems it should not grab a wait-queue lock under perf-context lock.\nLet's do it with irq_work.\n\n  [   39.913691] =============================\n  [   39.914157] [ BUG: Invalid wait context ]\n  [   39.914623] 6.15.0-next-20250530-next-2025053 #1 Not tainted\n  [   39.915271] -----------------------------\n  [   39.915731] repro/837 is trying to lock:\n  [   39.916191] ffff88801acfabd8 (&event->waitq){....}-{3:3}, at: __wake_up+0x26/0x60\n  [   39.917182] other info that might help us debug this:\n  [   39.917761] context-{5:5}\n  [   39.918079] 4 locks held by repro/837:\n  [   39.918530]  #0: ffffffff8725cd00 (rcu_read_lock){....}-{1:3}, at: __perf_event_task_sched_in+0xd1/0xbc0\n  [   39.919612]  #1: ffff88806ca3c6f8 (&cpuctx_lock){....}-{2:2}, at: __perf_event_task_sched_in+0x1a7/0xbc0\n  [   39.920748]  #2: ffff88800d91fc18 (&ctx->lock){....}-{2:2}, at: __perf_event_task_sched_in+0x1f9/0xbc0\n  [   39.921819]  #3: ffffffff8725cd00 (rcu_read_lock){....}-{1:3}, at: perf_event_wakeup+0x6c/0x470","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nperf/core: Corrección de contexto de espera inválido en ctx_sched_in()\n\nLockdep encontró un error en la programación de eventos cuando un evento anclado falló y despierta los hilos en el búfer circular como se muestra a continuación.\n\nParece que no debería adquirir un bloqueo de cola de espera bajo el bloqueo de contexto de perf. Hagámoslo con irq_work.\n\n  [   39.913691] =============================\n  [   39.914157] [ ERROR: Contexto de espera inválido ]\n  [   39.914623] 6.15.0-next-20250530-next-2025053 #1 No contaminado\n  [   39.915271] -----------------------------\n  [   39.915731] repro/837 está intentando bloquear:\n  [   39.916191] ffff88801acfabd8 (&amp;event-&gt;waitq){....}-{3:3}, en: __wake_up+0x26/0x60\n  [   39.917182] otra información que podría ayudarnos a depurar esto:\n  [   39.917761] contexto-{5:5}\n  [   39.918079] 4 bloqueos mantenidos por repro/837:\n  [   39.918530]  #0: ffffffff8725cd00 (rcu_read_lock){....}-{1:3}, en: __perf_event_task_sched_in+0xd1/0xbc0\n  [   39.919612]  #1: ffff88806ca3c6f8 (&amp;cpuctx_lock){....}-{2:2}, en: __perf_event_task_sched_in+0x1a7/0xbc0\n  [   39.920748]  #2: ffff88800d91fc18 (&amp;ctx-&gt;lock){....}-{2:2}, en: __perf_event_task_sched_in+0x1f9/0xbc0\n  [   39.921819]  #3: ffffffff8725cd00 (rcu_read_lock){....}-{1:3}, en: perf_event_wakeup+0x6c/0x470","source":"nvd"}],"published":"2026-03-25T10:27:06.915Z","modified":"2026-06-17T10:21:18.397Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6","fixed":"c67ab059953e3b66cb17ddd6524c23f9e1f6526d","status":"affected"},{"type":"git","introduced":"f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6","fixed":"825f218ca70ef394c2b8546b313711d867b24584","status":"affected"},{"type":"git","introduced":"f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6","fixed":"486ff5ad49bc50315bcaf6d45f04a33ef0a45ced","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.15","status":"unaffected"},{"type":"semver","introduced":"6.18.17","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.7","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.15","fixed":"6.18.17"},{"status":"affected","introduced":"6.19","fixed":"6.19.7"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/c67ab059953e3b66cb17ddd6524c23f9e1f6526d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/825f218ca70ef394c2b8546b313711d867b24584","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/486ff5ad49bc50315bcaf6d45f04a33ef0a45ced","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-23311","url":"https://www.cve.org/CVERecord?id=CVE-2026-23311","licence":"CVE Terms of Use","modified":"2026-05-11T22:04:25.774Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-23311","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23311","licence":"Public domain","modified":"2026-06-17T10:21:18.397Z"}],"updatedAt":"2026-11-25T22:59:16.665Z","epss":{"score":0.00106,"percentile":0.01212,"date":"2026-12-01T12:00:22.000Z"}}