Files
linux-stable-mirror/kernel
Pengpeng HouandGreg Kroah-Hartman 3fa363a40d 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:35:02 +02:00
..
2025-12-07 06:09:29 +09:00
2023-12-20 15:17:37 +01:00
2026-04-18 10:33:11 +02:00
2023-11-28 16:56:16 +00:00
2024-10-17 15:12:00 +02:00
2024-10-17 15:11:27 +02:00