CVE-2026-143122

Not scored yetLast modified Dec 3, 2026

Description

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

perf/core: Do not resurrect cpuctx->cgrp after last cgroup event exit

perf_cgroup_switch() relies on:

/* * cpuctx->cgrp is set when the first cgroup event enabled, * and is cleared when the last cgroup event disabled. */

It computes the next task's cgroup, schedules out the CPU context and then assigns cpuctx->cgrp unconditionally:

ctx_sched_out(&cpuctx->ctx, NULL, EVENT_ALL|EVENT_CGROUP); /* * must not be done before ctxswout due * to update_cgrp_time_from_cpuctx() in * ctx_sched_out() */ cpuctx->cgrp = cgrp;

However, ctx_sched_out() can disable events itself. If a cgroup event has a pending disable from perf_event_disable_inatomic() (e.g. its PERF_EVENT_IOC_REFRESH limit ran out) that the irq_work has not handled yet, event_sched_out() consumes it inline:

if (event->pending_disable) { event->pending_disable = 0; perf_cgroup_event_disable(event, ctx); state = PERF_EVENT_STATE_OFF; }

If that was the last cgroup event, perf_cgroup_event_disable() clears cpuctx->cgrp:

if (--ctx->nr_cgroups) return;

cpuctx->cgrp = NULL;

and perf_cgroup_switch() then sets it again. cpuctx->cgrp is left non-NULL with ctx.nr_cgroups == 0, so the NULL check in perf_cgroup_switch() no longer catches it and the next switch trips:

WARN_ON_ONCE(cpuctx->ctx.nr_cgroups == 0);

cpuctx->cgrp does not hold a reference on the cgroup. Once that cgroup is removed, the next ctx_sched_in() dereferences the stale pointer:

BUG: KASAN: slab-use-after-free in ctx_sched_in+0xb1f/0xfa0 Read of size 8 at addr ffff8881008972d0 by task swapper/3/0

Tainted: [W]=WARN Call Trace: <IRQ> ctx_sched_in+0xb1f/0xfa0 perf_event_sched_in+0x1a/0x70 ctx_resched+0x32b/0xac0 __perf_install_in_context+0x475/0xab0 remote_function+0x105/0x200 __flush_smp_call_function_queue+0x179/0x8d0 __sysvec_call_function_single+0x1b/0x1c0 sysvec_call_function_single+0x66/0x80 </IRQ> <TASK> asm_sysvec_call_function_single+0x1a/0x20

Only assign cpuctx->cgrp when cgroup events remain after the context has been scheduled out, so that it stays NULL as the invariant requires.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Dec 3, 2026
Last modified
Dec 3, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-143123In the Linux kernel, the following vulnerability has been resolved: openvswitch: advance by the real header length in get_ipv6_ext_hdrs() CVE-2026-143124In the Linux kernel, the following vulnerability has been resolved: ntfs: open the index allocation before reading or writing an index blocCVE-2026-143125In the Linux kernel, the following vulnerability has been resolved: ntfs: do not read an index block outside $INDEX_ALLOCATION A directoryCVE-2026-143126In the Linux kernel, the following vulnerability has been resolved: ntfs: check the file name against the key length of an index entry ntfCVE-2026-143127In the Linux kernel, the following vulnerability has been resolved: NFSv4: Prevent indefinite waits for out-of-order OPEN stateids When prCVE-2026-143128In the Linux kernel, the following vulnerability has been resolved: net: wait for in-flight device unregistrations before netns dismantle CVE-2026-143129In the Linux kernel, the following vulnerability has been resolved: net/sched: act_ife: require a full Ethernet header on egress This is aCVE-2026-143135.3PeproDev WooCommerce Receipt Uploader (PeproDev WooCommerce Receipt Uploader WordPress plugin through 2.8.0 slug: pepro-bacs-receipt-upload-CVE-2026-143130In the Linux kernel, the following vulnerability has been resolved: net/sched: act_ife: encode configured zero metadata values Reported byCVE-2026-143131In the Linux kernel, the following vulnerability has been resolved: net/sched: sch_teql: reject qdiscs from another network namespace RepoCVE-2026-143132In the Linux kernel, the following vulnerability has been resolved: netfs: don't hang a read whose retry is abandoned When ->prepare_read(CVE-2026-143133In the Linux kernel, the following vulnerability has been resolved: netfs: preserve prepare_write errno on reissue prepare_write() may cal
CVE-2026-143122: Unscored | Vulnix