On Tue, Jun 06, 2023 at 06:10:21PM +0200, Julian Andres Klode wrote: > From: Kees Cook <keesc...@google.com> > > GET_ARRAY_INFO's info.nr_disks does not map to GET_DISK_INFO's > disk.number, which is an internal kernel index. If an array has had drives > added, removed, etc, there may be gaps in GET_DISK_INFO's results. But > since the consumer of devicelist cannot tolerate gaps (it expects to walk > a NULL-terminated list of device name strings), the devicelist index (j) > must be tracked separately from the disk.number index (i). But grub > wants to only examine active (i.e. present and non-failed) disks, so how > many disks are left to be queried must be also separately tracked > (remaining). > > Fixes: 49de079bbe1c ("... (grub_util_raid_getmembers): Handle "removed" > disks") > Fixes: 2b00217369ac ("... Added support for RAID and LVM") > Fixes: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1912043 > Fixes: https://savannah.gnu.org/bugs/index.php?59887 > Signed-off-by: Kees Cook <k...@ubuntu.com>
I did not add a cover letter, I just found this patch in a merge request on Debian's GitLab, and it still applies, but I haven't tested it further than Kees did, and don't know what the test case is quite honestly. -- debian developer - deb.li/jak | jak-linux.org - free software dev ubuntu core developer i speak de, en _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel