Files
linux-stable-mirror/kernel
Pengpeng Hou 9a385db15c tracing/probe: reject non-closed empty immediate strings
[ Upstream commit 4346be6577 ]

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 and not closed with double-quotation.

Reject empty non-closed immediate strings before checking for the closing quote.

Link: https://lore.kernel.org/all/20260401160315.88518-1-pengpeng@iscas.ac.cn/

Fixes: a42e3c4de9 ("tracing/probe: Add immediate string parameter support")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-06-01 17:38:34 +02:00
..
2025-12-07 06:12:35 +09:00
2023-12-20 17:00:20 +01:00
2026-03-25 11:03:02 +01:00
2023-11-28 17:06:57 +00:00
2024-10-17 15:22:28 +02:00