[LTP] [PATCH 3/3] tst_kconfig: Prevent stack buffer overread
Li Wang
li.wang@linux.dev
Wed Oct 7 07:51:31 CEST 2026
On Tue, Oct 06, 2026 at 03:02:39PM +0200, Andrea Cervesato wrote:
> From: Andrea Cervesato <andrea.cervesato@suse.com>
>
> kconfig_parse_line() stops scanning value characters only at
> whitespace. Because isspace('\0') is false, lines without trailing
> whitespace cause an out-of-bounds stack read past the terminating
> NUL byte.
>
> Stop scanning when reaching NUL or whitespace.
>
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
Reviewed-by: Li Wang <li.wang@linux.dev>
--
Regards,
Li Wang
More information about the ltp
mailing list