RE: [PATCH] libext2fs: fix to read the bitmaps for image file correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for your kind advices. However, after applying the patch,
debugfs caused segfault by the following steps:

# mke2fs -t ext4 /dev/sda8
# e2image /dev/sda8 test.img
# debugfs -R stats -i test.img
debugfs 1.44.0 (7-Mar-2018)
Segmentation fault

According to the following backtrace, read_bitmaps() called by
ext2fs_read_inode_bitmap() reads not only inode bitmap, but also block bitmap.
We would need to consider about do_inode/do_block arguments in read_bitmaps().

#0  0x00007ffff72fa61d in __memcpy_ssse3 () from /lib64/libc.so.6
#1  0x0000000000436072 in unix_read_blk64 (channel=0x6611c0, block=819227, count=<optimized out>, buf=<optimized out>)
    at ../../../lib/ext2fs/unix_io.c:873
#2  0x0000000000432f72 in read_bitmaps (fs=0x661030, do_inode=do_inode@entry=1, do_block=do_block@entry=0)
    at ../../../lib/ext2fs/rw_bitmaps.c:278
#3  0x000000000043351c in ext2fs_read_inode_bitmap (fs=<optimized out>) at ../../../lib/ext2fs/rw_bitmaps.c:395
#4  0x0000000000404105 in open_filesystem (device=0x7fffffffe298 "default.image", open_flags=open_flags@entry=172032, 
    superblock=0, blocksize=blocksize@entry=0, catastrophic=catastrophic@entry=0, data_filename=data_filename@entry=0x0, 
    undo_file=undo_file@entry=0x0) at ../../debugfs/debugfs.c:196
#5  0x0000000000403bb9 in main (argc=5, argv=0x7fffffffdf08) at ../../debugfs/debugfs.c:2517

Regards,
Kazuya Mio





[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux