Re: [PATCH v2] sched/isolation: avoid reading past string in isolcpus parser

From: Steven Rostedt

Date: Mon Mar 09 2026 - 18:10:02 EST


On Mon, 9 Mar 2026 18:02:16 -0400
Joseph Salisbury <joseph.salisbury@xxxxxxxxxx> wrote:

> The function housekeeping_isolcpus_setup() advanced the parser pointer
> unconditionally after unknown flags.
>
> For an argument like 'isolcpus=unknownflag', with no trailing
> comma, this can move the pointer past the terminating NUL, and
> the next loop test reads out of bounds.
>
> Reproducer:
> isolcpus=unknownflag
>
> Advance only when the parser is not already at the terminating NUL,
> preserving existing parsing semantics while avoiding the invalid read.
>
> Fixes: 3662daf02350 ("sched/isolation: Allow "isolcpus=" to skip unknown sub-parameters")
> Cc: stable@xxxxxxxxxxxxxxx
> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Assisted-by: Codex:GPT-5
> Signed-off-by: Joseph Salisbury <joseph.salisbury@xxxxxxxxxx>

Reviewed-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>

-- Steve