From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JzhM6-00023E-G0 for mharc-grub-devel@gnu.org; Fri, 23 May 2008 20:11:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JzhM4-000232-KK for grub-devel@gnu.org; Fri, 23 May 2008 20:11:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JzhM3-00022b-3h for grub-devel@gnu.org; Fri, 23 May 2008 20:11:24 -0400 Received: from [199.232.76.173] (port=60571 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzhM2-00022X-O0 for grub-devel@gnu.org; Fri, 23 May 2008 20:11:22 -0400 Received: from an-out-0708.google.com ([209.85.132.246]:58429) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JzhM3-0000Sr-15 for grub-devel@gnu.org; Fri, 23 May 2008 20:11:23 -0400 Received: by an-out-0708.google.com with SMTP id c38so193623ana.84 for ; Fri, 23 May 2008 17:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:user-agent:cc:references:in-reply-to:x-face:mime-version:content-type:content-transfer-encoding:message-id; bh=to+myaWYIgtSnFHxBL/1NrJam/d2jlN5Xd0uc9I1JhU=; b=vCtX23DzFV1BgRks8pAPn+jOBYJovAh6k9CIqZ79Ez0vYhzMj4LnMEBtbcC9alAKOQJWJ+UYZ9NBYM+lXWtBX5YZDaSZbA2M43HdjGaXdBV3P7BK4po8hvFiHCgYMYwG5UhJZl8hwmVwrCx+zOpf0QJRuRQkgd2ptCurvMeARw0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to:x-face:mime-version:content-type:content-transfer-encoding:message-id; b=GKzFLckU8LwvireUa96Mp77z24sq2VGC1AFJyymIWemK5jeb7+Uxx5w+VrLi7sdNGzgiWmyXDPfPWcGGWRL8TMcj6wg0KRditlyskrclcl2RPNFLaWoMDFzVxBjRZ97Bha9tLayEWitxZXjeNYTovkYJ+7DggU02nxn6DEC3S6A= Received: by 10.100.201.16 with SMTP id y16mr3137068anf.26.1211587877580; Fri, 23 May 2008 17:11:17 -0700 (PDT) Received: from dsktop01.iafcg.loc ( [190.75.165.30]) by mx.google.com with ESMTPS id q34sm983008wrq.8.2008.05.23.17.11.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 23 May 2008 17:11:16 -0700 (PDT) From: "Isaac M. Marcos" To: Pavel Roskin Date: Fri, 23 May 2008 19:40:52 -0430 User-Agent: KMail/1.9.9 References: <200805080454.54578.isaacmarcos100010@gmail.com> <200805212021.11751.isaacmarcos100010@gmail.com> <1211453522.24846.3.camel@dv> In-Reply-To: <1211453522.24846.3.camel@dv> X-Face: x-y\t15800Zgk#"~:Drp1}fo=N%pB*F8(J'>p}vH!s^cOfk.OkJcPPD#tY{V}N3:"-2Y>=?utf-8?q?B=0A=09RudWYi=5BV?=(q[woD:$pX],WnaV2Pp"&mBYiTK3g}RJsiBFy3IGy'H+&N,g0%lZ5; $Ows7Zyv1D2r8s=]C=]6QHY=YyEr\; 1=F4C76~*(=?utf-8?q?2l=7B9=23=0A=09Z=5Db1dNIHPtCCvypAZi-0=5D=25kTcGn=27x8A=5C=5F-/?= =?utf-8?q?7PW8=60?= X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Cc: grub-devel@gnu.org Subject: Re: grub-probe gets a segfault X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2008 00:11:25 -0000 --nextPart1343937.ycoCaJ79ll Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline El Thursday 22 May 2008 06:22:02 Pavel Roskin escribi=C3=B3: > 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. I *completely* agree with you. > 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 =3D mdah->raw_locns; > p =3D q =3D metadatabuf + grub_le_to_cpu64 (rlocn->offset); > > - while (*q !=3D ' ') > + while (*q !=3D ' ' && q < metadatabuf + mda_size) > q++; > > + if (q =3D=3D metadatabuf + mda_size) > + goto fail2; > + > vgname_len =3D q - p; > vgname =3D grub_malloc (vgname_len + 1); > if (!vgname) Sorry for the delay, other problems had higher priority :-) =46ine, to the problem at hand: Patch applied, compiled, and working OK: $ sudo grub-probe -t device / /dev/sda2 Would this change be committed to cvs? =2D-=20 Isaac M. Marcos GPG key 0xC9045C1B 5633 ECAF 44B1 8A5D 9371 DCDA 4620 A016 C904 5C1B The only place success comes before work is in the dictionary. VINCE LOMBARDI --nextPart1343937.ycoCaJ79ll Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBIN10XRiCgFskEXBsRAriAAKCfYGLNvwxv/NMGoKsrHGsg1QjNTACcCWO3 SfghjV6JFWm66Xw0ip0JFcI= =74Ou -----END PGP SIGNATURE----- --nextPart1343937.ycoCaJ79ll--