From: B Horn Date: Sun, 12 May 2024 05:37:08 +0000 (+0100) Subject: fs/iso9660: Set a grub_errno if mount fails X-Git-Tag: archive/raspbian/2.12-8+rpi1^2~64 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bc955a3f1da7ab22ad0c915ae5d1a5012115f8db;p=grub2.git fs/iso9660: Set a grub_errno if mount fails It was possible for a grub_errno to not be set if mount of an ISO 9660 filesystem failed when set_rockridge() returned 0. This isn't known to be exploitable as the other filesystems due to filesystem helper checking the requested file type. Though fixing as a precaution. Reported-by: B Horn Signed-off-by: B Horn Reviewed-by: Daniel Kiper Gbp-Pq: Topic cve-2025-jan Gbp-Pq: Name fs-iso9660-Set-a-grub_errno-if-mount-fails.patch --- diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c index 8c348b5..8d480e6 100644 --- a/grub-core/fs/iso9660.c +++ b/grub-core/fs/iso9660.c @@ -551,6 +551,9 @@ grub_iso9660_mount (grub_disk_t disk) return data; fail: + if (grub_errno == GRUB_ERR_NONE) + grub_error (GRUB_ERR_BAD_FS, "not a ISO9660 filesystem"); + grub_free (data); return 0; }