lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51EFEBF4.20701@redhat.com>
Date:	Wed, 24 Jul 2013 10:00:04 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	Robert Yang <liezhi.yang@...driver.com>
CC:	"Darrick J. Wong" <darrick.wong@...cle.com>,
	linux-ext4@...r.kernel.org, "Theodore Ts'o" <tytso@....edu>,
	Darren Hart <dvhart@...ux.intel.com>
Subject: Re: e2fsprogs/debugfs/write: Input/output error when file size is
 zero

On 7/24/13 3:59 AM, Robert Yang wrote:
> 
> Hello experts,
> 
> I met a "Input/output error" problem when used debugfs' command "write"
> to copy a zero size file to ext4 fs, here are the steps to reproduce the
> problem:
> 
> $ dd if=/dev/zero of=test.img count=1M bs=1k
> $ mkfs.ext4 -F test.img
> $ touch emptyfile
> $ debugfs -R "write emptyfile emptyfile" -w test.img
> $ mkdir mnt
> $ mount test.img mnt/
> $ ls mnt/emptyfile
> ls: cannot access mnt/emptyfile: Input/output error
> 
> The degbufs is from the up-to-date git repo, the ext2 and ext3 work well,
> I think that it is caused by the EXT4_EXTENTS_FL, it works well if we
> turn off the EXT4_EXTENTS_FL when the file size is zero, but this is not
> a correct fix, would you please give me some instructions so that I can
> fix it?

When reporting problems like this it's helpful to include which kernel version
you tested, all the error messages (including dmesg), etc.

But on upstream it persists, and when we do the ls, we get:

[40992.729130] EXT4-fs error (device loop0): ext4_ext_check_inode:464: inode #12: comm ls: bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)

so it seems that debugfs has created a corrupt inode in the image.

I'll send a patch.


--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ