Re: [PATCH] PM: EM: allocate the cpumask for every perf domain
From: Karl Mehltretter
Date: Sat Oct 10 2026 - 06:59:05 EST
On Thu, Sep 10, 2026 at 10:52:34PM +0100, Karl Mehltretter wrote:
> KASAN reports slab-out-of-bounds reads for both dump and by-ID requests
> against a synthetic non-CPU performance domain.
>
> GET_PERF_DOMAINS does not require GENL_ADMIN_PERM, so an unprivileged
> request can reach this path when a GPU or another devfreq device has
> registered an energy model.
>
> Allocate the cpumask for non-CPU domains too. The zeroed mask remains
> empty, as required for the documented unused field.
>
> Fixes: d8eef0453132 ("PM: EM: Implement em_nl_get_pds_doit()")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@xxxxxxxxx>
Friendly ping on this patch
Thanks,
Karl