script/execute: Limit the recursion depth
authorB Horn <b@horn.uk>
Thu, 18 Apr 2024 18:04:13 +0000 (19:04 +0100)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commitbd056223de143e15958b2d39dd71ef9dc3723968
tree07bd2d65c6c47e419e03022492425e29f743d56b
parentd0deaca3f53101ffb7a0f7085000c05ca6fdb5b1
script/execute: Limit the recursion depth

If unbounded recursion is allowed it becomes possible to collide the
stack with the heap. As UEFI firmware often lacks guard pages this
becomes an exploitable issue as it is possible in some cases to do
a controlled overwrite of a section of this heap region with
arbitrary data.

Reported-by: B Horn <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name script-execute-Limit-the-recursion-depth.patch
grub-core/script/execute.c