mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-20 17:41:09 +00:00
kconfig: fix possible buffer overflow
[ Upstream commita3b7039bb2
] Buffer 'new_argv' is accessed without bound check after accessing with bound check via 'new_argc' index. Fixes:e298f3b49d
("kconfig: add built-in function support") Co-developed-by: Ivanov Mikhail <ivanov.mikhail1@huawei-partners.com> Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9c9362a2af
commit
8069aebe90
1 changed files with 3 additions and 0 deletions
|
@ -393,6 +393,9 @@ static char *eval_clause(const char *str, size_t len, int argc, char *argv[])
|
|||
|
||||
p++;
|
||||
}
|
||||
|
||||
if (new_argc >= FUNCTION_MAX_ARGS)
|
||||
pperror("too many function arguments");
|
||||
new_argv[new_argc++] = prev;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue