Package: e2fsprogs
Version: 1.43.7-1
Severity: normal
Tags: upstream

Dear Maintainer,

I found a problem with debugfs (but it may be a problem with the whole
e2fslibs) when trying to mark block bitmap.  It looks like group
descriptor which is modified with 

Steps to reproduce this:

   1. Create a new ext4 filesystem image:
      $ dd if=/dev/zero of=/tmp/testfs.img bs=1K count=4096
      $ /sbin/mkfs.ext4 /tmp/testfs.img
   2. Open this image with debugfs, set some free block's mark and close
   debugfs:
      $ /sbin/debugfs -w /tmp/testfs.img
      debugfs: ffb
      Free blocks found: 1204
      debugfs: setb 1204
      debugfs: q
      $
   3. Try to open this image again with debugfs:
      $ /sbin/debugfs /tmp/testfs.img
      /tmp/testfs.img: Block bitmap checksum does not match bitmap while 
reading block bitmap
      debugfs:

This error is also detected with e2fsck.

Some debugging showed that block bitmap checksum is calculated correctly both 
when writing a new block bitmap and when opening filesystem. Probably, the 
problem is that calculated checksum on writing stage is not actually written 
into FS. I put breakpoints into ext2fs_block_bitmap_csum_set and
ext2fs_block_bitmap_csum_verify and it showed up that 'provided'
checksum in 'verify' is the same as it was in gdp in 'set' just after getting
group descriptor.


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'testing-debug'), (10, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages e2fsprogs depends on:
ii  e2fslibs    1.43.7-1
ii  libblkid1   2.30.2-0.1
ii  libc6       2.25-3
ii  libcomerr2  1.43.7-1
ii  libss2      1.43.7-1
ii  libuuid1    2.30.2-0.1

Versions of packages e2fsprogs recommends:
pn  e2fsprogs-l10n  <none>

Versions of packages e2fsprogs suggests:
pn  e2fsck-static  <none>
pn  fuse2fs        <none>
pn  gpart          <none>
ii  parted         3.2-18

-- no debconf information

Reply via email to