]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
fs/iso9660: Set a grub_errno if mount fails
authorB Horn <b@horn.uk>
Sun, 12 May 2024 05:37:08 +0000 (06:37 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Jan 2025 15:22:46 +0000 (16:22 +0100)
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 <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/iso9660.c

index 8c348b59a5e4e66c56e8b4fd31cbbce781b06604..8d480e6022f4a79604ac8309d57a460e5a9b95a4 100644 (file)
@@ -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;
 }