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]
Date:   Tue, 17 Apr 2018 22:09:55 -0400
From:   "Theodore Y. Ts'o" <tytso@....edu>
To:     "Darrick J. Wong" <darrick.wong@...cle.com>
Cc:     Wang Shilong <wangshilong1991@...il.com>,
        linux-ext4@...r.kernel.org, adilger@...ger.ca,
        bo.liu@...ux.alibaba.com, wshilong@....com, sihara@....com
Subject: Re: [PATCH 1/4] ext4: fix wrong return value in
 ext4_read_inode_bitmap()

On Tue, Apr 17, 2018 at 05:44:40PM -0700, Darrick J. Wong wrote:
> > diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
> > index df92e3ec9913..33a2c98ce1ff 100644
> > --- a/fs/ext4/ialloc.c
> > +++ b/fs/ext4/ialloc.c
> > @@ -143,7 +143,7 @@ ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
> >  		ext4_error(sb, "Cannot read inode bitmap - "
> >  			    "block_group = %u, inode_bitmap = %llu",
> >  			    block_group, bitmap_blk);
> > -		return ERR_PTR(-EIO);
> > +		return ERR_PTR(-ENOMEM);
> 
> Uh... yes this can fail due to IO errors.  If __bread_slow calls
> submit_bh, waits for the buffer, and the buffer isn't uptodate after the
> IO completes, that means that there was an IO error.  It's a little
> dorky that we can't distinguish that vs. an actual ENOMEM, but oh well.

... but as near as I can tell, there are no paths where sb_getblk()
will end up calling __bread_slow().  We *should* change all of the
functions which call the *getblk* family of functions and convert them
to using the ERR_PTR protocol.  But that's going to be pretty large
change, and getting all of them would be painful.

	    	    	   	- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ