Package: xfsprogs
Version: 2.7.16-1
Severity: normal

Hi,

When I run xfs_growfs as a normal user, the program crashes.
/dev/hda1 is my root XFS partition, the uid and gid is 1000.

$ gdb /usr/sbin/xfs_growfs
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library 
"/lib/tls/libthread_db.so.1".

(gdb) run -n /dev/hda1
Starting program: /usr/sbin/xfs_growfs -n /dev/hda1
*** glibc detected *** double free or corruption (fasttop): 0x080919f0 ***

Program received signal SIGABRT, Aborted.
0xa7e557c7 in raise () from /lib/tls/libc.so.6
(gdb) bt
#0  0xa7e557c7 in raise () from /lib/tls/libc.so.6
#1  0xa7e5706b in abort () from /lib/tls/libc.so.6
#2  0xa7e8c545 in __libc_message () from /lib/tls/libc.so.6
#3  0xa7e92b97 in _int_free () from /lib/tls/libc.so.6
#4  0xa7e93032 in free () from /lib/tls/libc.so.6
#5  0x0808a688 in fs_table_initialise_mounts (path=0x0) at paths.c:229
#6  0x0808a77e in fs_table_initialise () at paths.c:353
#7  0x0804972c in main (argc=Cannot access memory at address 0x3e32
) at xfs_growfs.c:193
(gdb) up
#1  0xa7e5706b in abort () from /lib/tls/libc.so.6
(gdb) up
#2  0xa7e8c545 in __libc_message () from /lib/tls/libc.so.6
(gdb) up
#3  0xa7e92b97 in _int_free () from /lib/tls/libc.so.6
(gdb) up
#4  0xa7e93032 in free () from /lib/tls/libc.so.6
(gdb) up
#5  0x0808a688 in fs_table_initialise_mounts (path=0x0) at paths.c:229
229                     free(dir);
(gdb) p dir
$1 = 0x80919f0 ""
(gdb) p error
$4 = 13

So error=13 is EACCES - which is undertandable since I am not root
here. The mistake now is that _both_ fs_table_insert() and
fs_table_initialise_mounts() of libxcmd/paths.c of xfsprogs call free()
on the dir variable.

I suggest removing the free(dir) call in paths.c:fs_tableinsert(),
but am not sure this is the correct fix.


Regards,
  Bastian

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-treasure19
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages xfsprogs depends on:
ii  libc6                         2.3.6-15   GNU C Library: Shared libraries
ii  libreadline5                  5.1-7      GNU readline and history libraries
ii  libuuid1                      1.39-1     universally unique id library

xfsprogs recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to