Adding range-check before the offending code in grub-
core/kern/emu/hostdisk.c fixes this symptom for me. Underlying cause may
be deeper though.

int
grub_util_biosdisk_is_floppy (grub_disk_t disk)
{
  struct stat st;
  int fd;

  /* Shouldn't happen. See LP#916435. */
  if (disk->id > sizeof(map) / sizeof(*map))
    return 0;

  fd = open (map[disk->id].device, O_RDONLY);
  /* Shouldn't happen.  */
  if (fd == -1)
    return 0;

  /* Shouldn't happen either.  */
  if (fstat (fd, &st) < 0)
    return 0;

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/916435

Title:
  grub-setup crashed with SEGV in grub_util_biosdisk_is_floppy()

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/916435/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to