fs/xfs: Handle root inode read failure in grub_xfs_mount
authorEgor Ignatov <egori@altlinux.org>
Thu, 23 Jan 2025 17:44:13 +0000 (20:44 +0300)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
Signed-off-by: Egor Ignatov <egori@altlinux.org>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-xfs-Handle-root-inode-read-failure-in-grub_xfs_mount.patch

grub-core/fs/xfs.c

index 28a34299690e768e56507e5767e8f7d404f98f0f..59bdee5f9c06dac2c7206436753661fea59d4aaf 100644 (file)
@@ -1086,6 +1086,8 @@ grub_xfs_mount (grub_disk_t disk)
               grub_cpu_to_be64(data->sblock.rootino));
 
   grub_xfs_read_inode (data, data->diropen.ino, &data->diropen.inode);
+  if (grub_errno)
+    goto fail;
 
   return data;
  fail: