extundelete: Extundelete segfaults when trying to recover files

Bug #1302444 reported by H.-Dirk Schmitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
extundelete (Debian)
Fix Released
Unknown
extundelete (Ubuntu)
New
Undecided
Unassigned

Bug Description

The bug is fixed in raring and later.
In precise the fix isn't included.

Imported from Debian bug http://bugs.debian.org/670815:

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
instead.

=== 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

Tags: precise
Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

I have backport the raring version (including the fix) in the c42-backport ppa.
For me it works.

tags: added: precise
description: updated
Changed in extundelete (Debian):
importance: Undecided → Unknown
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.