[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grub-probe gets a segfault
From: |
Pavel Roskin |
Subject: |
Re: grub-probe gets a segfault |
Date: |
Thu, 22 May 2008 06:52:02 -0400 |
On Wed, 2008-05-21 at 20:20 -0430, Isaac M. Marcos wrote:
> Today, I bump on this problem again on updating kernel. Because of this
> fault,
> update-initramfs reports a failure. It can't find "/".
>
> grub-probe -t device / --> segfault!!
This patch should help. It checks for the buffer overrun. I still feel
uneasy about applying it because it hides a bigger problem.
diff --git a/disk/lvm.c b/disk/lvm.c
index 1d898ff..997d15c 100644
--- a/disk/lvm.c
+++ b/disk/lvm.c
@@ -302,9 +302,12 @@ grub_lvm_scan_device (const char *name)
rlocn = mdah->raw_locns;
p = q = metadatabuf + grub_le_to_cpu64 (rlocn->offset);
- while (*q != ' ')
+ while (*q != ' ' && q < metadatabuf + mda_size)
q++;
+ if (q == metadatabuf + mda_size)
+ goto fail2;
+
vgname_len = q - p;
vgname = grub_malloc (vgname_len + 1);
if (!vgname)
--
Regards,
Pavel Roskin
- Re: grub-probe gets a segfault, (continued)
- Re: grub-probe gets a segfault, Pavel Roskin, 2008/05/08
- Re: grub-probe gets a segfault, Robert Millan, 2008/05/09
- Re: grub-probe gets a segfault, Isaac M. Marcos, 2008/05/09
- Re: grub-probe gets a segfault, Pavel Roskin, 2008/05/09
- Re: grub-probe gets a segfault, Isaac M. Marcos, 2008/05/12
- Re: grub-probe gets a segfault, Pavel Roskin, 2008/05/15
- Re: grub-probe gets a segfault, Isaac Marcos, 2008/05/16
- Re: grub-probe gets a segfault, Pavel Roskin, 2008/05/16
- Re: grub-probe gets a segfault, Isaac M. Marcos, 2008/05/21
- Re: grub-probe gets a segfault, Pavel Roskin, 2008/05/21
- Re: grub-probe gets a segfault,
Pavel Roskin <=
- Re: grub-probe gets a segfault, Isaac M. Marcos, 2008/05/23
- Re: grub-probe gets a segfault, Pavel Roskin, 2008/05/27
- Re: grub-probe gets a segfault, Robert Millan, 2008/05/28
- Re: grub-probe gets a segfault, Isaac M. Marcos, 2008/05/28
- Re: grub-probe gets a segfault, Pavel Roskin, 2008/05/29
- Re: grub-probe gets a segfault, Isaac M. Marcos, 2008/05/12
- Re: grub-probe gets a segfault, Jeff Chua, 2008/05/20
- Re: grub-probe gets a segfault, Pavel Roskin, 2008/05/20
- Re: grub-probe gets a segfault, Jeff Chua, 2008/05/20