AZL-118142: CVE-2026-143122 affecting package kernel 6.6.161.1-1

Published Dec 3, 2026
·
Updated

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

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

perfcgroupswitch() 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:

ctxschedout(&cpuctx->ctx, NULL, EVENTALL|EVENTCGROUP); / must not be done before ctxswout due to updatecgrptimefromcpuctx() in ctxschedout() / cpuctx->cgrp = cgrp;

However, ctxschedout() can disable events itself. If a cgroup event has a pending disable from perfeventdisableinatomic() (e.g. its PERFEVENTIOCREFRESH limit ran out) that the irqwork has not handled yet, eventschedout() consumes it inline:

if (event->pendingdisable) { event->pendingdisable = 0; perfcgroupeventdisable(event, ctx); state = PERFEVENTSTATEOFF; }

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

if (--ctx->nrcgroups) return;

cpuctx->cgrp = NULL;

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

WARNONONCE(cpuctx->ctx.nrcgroups == 0);

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

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

Tainted: [W]=WARN Call Trace: <IRQ> ctxschedin+0xb1f/0xfa0 perfeventschedin+0x1a/0x70 ctxresched+0x32b/0xac0 perfinstallincontext+0x475/0xab0 remotefunction+0x105/0x200 flushsmpcallfunctionqueue+0x179/0x8d0 sysveccallfunctionsingle+0x1b/0x1c0 sysveccallfunctionsingle+0x66/0x80 </IRQ> <TASK> asmsysveccallfunctionsingle+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.

Affected Software

1 affected component
azure-linux/kernel<=6.6.161.1-1

Event History

Dec 3, 2026
Advisory Published
via OSV·10:17 AM
Data Sourced
via OSV·10:17 AM
DescriptionAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Frequently Asked Questions

1

What runtime conditions are involved in reaching the flaw?

The issue involves perf cgroup events during a cgroup switch when the last cgroup event has a pending disable. One example given is a PERF_EVENT_IOC_REFRESH limit expiring before its irq_work is handled, causing the disable to be consumed during context scheduling.

2

Which systems are identified as affected?

The advisory identifies the Azure Linux kernel package version 6.6.161.1-1. The affected code is in the kernel perf subsystem's cgroup-event handling.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203