{"id":"CVE-2026-23311","state":"PUBLISHED","title":"perf/core: Fix invalid wait context in ctx_sched_in()","description":"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","publishedAt":"2026-03-25T10:27:06.915Z","updatedAt":"2026-05-11T22:04:25.774Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6","status":"affected","lessThan":"c67ab059953e3b66cb17ddd6524c23f9e1f6526d","versionType":"git"},{"version":"f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6","status":"affected","lessThan":"825f218ca70ef394c2b8546b313711d867b24584","versionType":"git"},{"version":"f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6","status":"affected","lessThan":"486ff5ad49bc50315bcaf6d45f04a33ef0a45ced","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/events/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.18.17","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.7","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/events/core.c"]}],"references":["https://git.kernel.org/stable/c/c67ab059953e3b66cb17ddd6524c23f9e1f6526d","https://git.kernel.org/stable/c/825f218ca70ef394c2b8546b313711d867b24584","https://git.kernel.org/stable/c/486ff5ad49bc50315bcaf6d45f04a33ef0a45ced"],"weaknesses":[],"ingestedAt":"2026-10-29T20:11:21.040Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/23xxx/CVE-2026-23311.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-23311","state":"PUBLISHED","datePublished":"2026-03-25T10:27:06.915Z","dateUpdated":"2026-05-11T22:04:25.774Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-01-13T15:37:45.994Z"},"containers":{"cna":{"title":"perf/core: Fix invalid wait context in ctx_sched_in()","descriptions":[{"lang":"en","value":"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"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6","status":"affected","lessThan":"c67ab059953e3b66cb17ddd6524c23f9e1f6526d","versionType":"git"},{"version":"f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6","status":"affected","lessThan":"825f218ca70ef394c2b8546b313711d867b24584","versionType":"git"},{"version":"f4b07fd62d4d11d57a15cb4ae01b3833282eb8f6","status":"affected","lessThan":"486ff5ad49bc50315bcaf6d45f04a33ef0a45ced","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/events/core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.18.17","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.7","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/events/core.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c67ab059953e3b66cb17ddd6524c23f9e1f6526d"},{"url":"https://git.kernel.org/stable/c/825f218ca70ef394c2b8546b313711d867b24584"},{"url":"https://git.kernel.org/stable/c/486ff5ad49bc50315bcaf6d45f04a33ef0a45ced"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T22:04:25.774Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.18.17"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.19.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"7.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}