Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HoQFh-00073k-Bt for mharc-grub-devel@gnu.org; Wed, 16 May 2007 16:37:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HoQFg-000729-FT for grub-devel@gnu.org; Wed, 16 May 2007 16:37:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HoQFe-0006z7-V8 for grub-devel@gnu.org; Wed, 16 May 2007 16:37:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HoQFe-0006yw-Rz for grub-devel@gnu.org; Wed, 16 May 2007 16:37:38 -0400 Received: from neonescio.viaisn.org ([82.94.249.43]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HoQ7d-0004v5-1a for grub-devel@gnu.org; Wed, 16 May 2007 16:29:21 -0400 Received: from dijkstra.dekkers.cx ([2001:960:7a0:0:213:d4ff:fe9c:2487] ident=Debian-exim) by neonescio.viaisn.org with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32 CV=0) (Exim 4.63 #1) id 1HoQ7a-0007FS-7T; Wed, 16 May 2007 22:29:18 +0200 Received: from localhost ([127.0.0.1] helo=dijkstra.dekkers.cx ident=jeroen) by dijkstra.dekkers.cx with esmtp (Exim 4.63) (envelope-from ) id 1HoQ7Z-0006mc-E8; Wed, 16 May 2007 22:29:17 +0200 Date: Wed, 16 May 2007 22:29:17 +0200 Message-ID: <87wsz8o6le.wl@dekkers.cx> From: Jeroen Dekkers To: The development of GRUB 2 In-Reply-To: <20070516200101.GB30550@aragorn> References: <20070514090937.GA10895@aragorn> <200705161730.12968.florian@kriener.org> <20070516155526.GA24614@aragorn> <200705161918.19512.florian@kriener.org> <20070516200101.GB30550@aragorn> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.0.95 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-detected-kernel: Linux 2.6 (newer, 3) Cc: Florian Kriener , 423409-forwarded@bugs.debian.org Subject: Re: double free() with grub-probe 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: Wed, 16 May 2007 20:37:40 -0000 At Wed, 16 May 2007 22:01:01 +0200, Robert Millan wrote: > > We got this bug report from Debian BTS. It seems to be related to LVM. > > The argc address in last line looks very suspicious; stack corruption? It's possible, but it can also be a compiler optimalisation that confuses gdb. > > Program received signal SIGABRT, Aborted. > > 0xffffe410 in __kernel_vsyscall () > > (gdb) bt > > #0 0xffffe410 in __kernel_vsyscall () > > #1 0xb7dfcd60 in raise () from /lib/i686/cmov/libc.so.6 > > #2 0xb7dfe5b1 in abort () from /lib/i686/cmov/libc.so.6 > > #3 0xb7e3308b in __libc_message () from /lib/i686/cmov/libc.so.6 > > #4 0xb7e3aeed in _int_free () from /lib/i686/cmov/libc.so.6 > > #5 0xb7e3e530 in free () from /lib/i686/cmov/libc.so.6 > > #6 0x0804bc8f in grub_disk_read (disk=0x8064078, sector=4000189, offset=0, > > size=194560, buf=0xb7da2008 "") > > at kern/disk.c:480 That's the free of tmp_buf, but I just looked at the code and as far as I can see the only place where tmp_buf can get freed is at that place. So I'm a bit puzzled how a double free() can happen there. Jeroen Dekkers