]> git.ipfire.org Git - thirdparty/grub.git/commit
commands/extcmd: Missing check for failed allocation
authorLidong Chen <lidong.chen@oracle.com>
Fri, 22 Nov 2024 06:27:55 +0000 (06:27 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 13 Feb 2025 14:45:55 +0000 (15:45 +0100)
commit05be856a8c3aae41f5df90cab7796ab7ee34b872
tree003f1664f4619411a38a9c078fbc69d8c15d7eae
parent98ad84328dcabfa603dcf5bd217570aa6b4bdd99
commands/extcmd: Missing check for failed allocation

The grub_extcmd_dispatcher() calls grub_arg_list_alloc() to allocate
a grub_arg_list struct but it does not verify the allocation was successful.
In case of failed allocation the NULL state pointer can be accessed in
parse_option() through grub_arg_parse() which may lead to a security issue.

Fixes: CVE-2024-45775
Reported-by: Nils Langius <nils@langius.de>
Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Alec Brown <alec.r.brown@oracle.com>
grub-core/commands/extcmd.c