Re: [PATCH v2] tracing/probe: reject empty immediate strings
From: Steven Rostedt
Date: Wed Apr 01 2026 - 13:14:41 EST
On Thu, 2 Apr 2026 00:03:15 +0800
Pengpeng Hou <pengpeng@xxxxxxxxxxx> wrote:
> parse_probe_arg() accepts quoted immediate strings and passes the body
> after the opening quote to __parse_imm_string(). That helper currently
> computes strlen(str) and immediately dereferences str[len - 1], which
> underflows when the body is empty.
>
> Reject empty immediate strings before checking for the closing quote.
>
> Fixes: a42e3c4de964 ("tracing/probe: Add immediate string parameter support")
> Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
Reviewed-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
-- Steve