Bug#670815: extundelete: Extundelete segfaults when trying to recover files

Deekoo L. deekoo_debbug_Iunderstandthatsendingofspamtothisaddressauthorizeshackingofspammers at deekoo.net
Sun Apr 29 09:12:31 UTC 2012

Package: extundelete
Version: 0.2.0-2
Severity: important
Tags: patch

When attempting to use extundelete to recover files from a partition
(/dev/sda11, a 553GB ext4 partition previously mounted as /home, and
fsck'd before running 'extundelete /dev/sda11 --restore-all'), I got
a general protection fault.

It turns out that e2fsprogs and extundelete have different declarations
of the ext2_extent_handle structure.  Changing extundelete's struct
to the version in e2fsprogs appears to fix it - at least, I was able
to recover a bunch of files without further crashes.

The enclosed patch fixes the problem for now, though I suspect that
in the long run the struct really should live in a shared header file

=== Patch follows ===
diff -rc extundelete-0.2.0/src/block.c extundelete-0.2.0+deekoohacks/src/block.c
*** extundelete-0.2.0/src/block.c       2010-04-15 17:59:33.000000000 -0700
--- extundelete-0.2.0+deekoohacks/src/block.c   2012-04-29 00:16:12.102682323 -0700
*** 69,74 ****
--- 69,75 ----
          ext2_filsys             fs;
          ext2_ino_t              ino;
          struct ext2_inode       *inode;
+       struct ext2_inode       inodebuf;
          int                     type;
          int                     level;
          int                     max_depth;

=== End patch ===

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages extundelete depends on:
ii  e2fslibs                      1.42.2-2   ext2/ext3/ext4 file system librari
ii  libc6                         2.13-27    Embedded GNU C Library: Shared lib
ii  libcomerr2                    1.42.2-2   common error description library
ii  libgcc1                       1:4.6.3-1  GCC support library
ii  libstdc++6                    4.6.3-1    GNU Standard C++ Library v3

extundelete recommends no packages.

extundelete suggests no packages.

-- no debconf information

More information about the forensics-devel mailing list