disk: Prevent overflows when allocating memory for arrays
authorAlec Brown <alec.r.brown@oracle.com>
Wed, 22 Jan 2025 02:55:10 +0000 (02:55 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commit40f6bb71d2358cd5bd29258ce6557bfa6984331d
treee82d2d4763a4899bbc19d6ad5af43f499c3841eb
parent526f661e527da6182708d2239d3cf39c3838dd54
disk: Prevent overflows when allocating memory for arrays

Use grub_calloc() when allocating memory for arrays to ensure proper
overflow checks are in place.

Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Conflicts:
grub-core/disk/cryptodisk.c

Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name disk-Prevent-overflows-when-allocating-memory-for-arrays.patch
grub-core/disk/lvm.c