]> dgit.raspbian.org Git - grub2.git/commit
kern/disk: Limit recursion depth
authorB Horn <b@horn.uk>
Sun, 12 May 2024 03:09:24 +0000 (04:09 +0100)
committerAurelien Jarno <aurel32@debian.org>
Thu, 30 Apr 2026 19:02:01 +0000 (21:02 +0200)
commit1fd1b28f4512c4c0e6073bd950f2efc8eded841e
treecf8e68636f67754d3f567a6458fb30ec5037be28
parentccc5b950d587ebd4033f575c0d4ce1332be89f20
kern/disk: Limit recursion depth

The grub_disk_read() may trigger other disk reads, e.g. via loopbacks.
This may lead to very deep recursion which can corrupt the heap. So, fix
the issue by limiting reads depth.

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 kern-disk-Limit-recursion-depth.patch
grub-core/kern/disk.c
include/grub/err.h