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: <70a0edd73c78c1610df0282704687ea2c896d4fa.camel@decadent.org.uk>
Date:   Sat, 22 Sep 2018 21:57:56 +0100
From:   Ben Hutchings <ben@...adent.org.uk>
To:     Dave Chinner <dchinner@...hat.com>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        akpm@...ux-foundation.org, Christoph Hellwig <hch@....de>,
        Wen Xu <wen.xu@...ech.edu>,
        Carlos Maiolino <cmaiolino@...hat.com>,
        "Darrick J. Wong" <darrick.wong@...cle.com>
Subject: Re: [PATCH 3.16 52/63] xfs: validate cached inodes are free when
 allocated

On Sat, 2018-09-22 at 15:26 +1000, Dave Chinner wrote:
> On Sat, Sep 22, 2018 at 01:15:42AM +0100, Ben Hutchings wrote:
> > 3.16.58-rc1 review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Dave Chinner <dchinner@...hat.com>
> > 
> > commit afca6c5b2595fc44383919fba740c194b0b76aff upstream.
> > 
> > A recent fuzzed filesystem image cached random dcache corruption
> > when the reproducer was run. This often showed up as panics in
> > lookup_slow() on a null inode->i_ops pointer when doing pathwalks.
> 
> .....
> > [bwh: Backported to 3.16:
> >  - Look up mode in XFS inode, not VFS inode
> >  - Use positive error codes, and EIO instead of EFSCORRUPTED]
> 
> Again, why EIO?

I'll change this back to EFSCORRUPTED.

Ben.

> And ....
> > Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
> > ---
> >  fs/xfs/xfs_icache.c | 73 +++++++++++++++++++++++++++++----------------
> >  1 file changed, 48 insertions(+), 25 deletions(-)
> > 
> > --- a/fs/xfs/xfs_icache.c
> > +++ b/fs/xfs/xfs_icache.c
> > @@ -133,6 +133,46 @@ xfs_inode_free(
> >  }
> >  
> >  /*
> > + * If we are allocating a new inode, then check what was returned is
> > + * actually a free, empty inode. If we are not allocating an inode,
> > + * then check we didn't find a free inode.
> > + *
> > + * Returns:
> > + *	0		if the inode free state matches the lookup context
> > + *	ENOENT		if the inode is free and we are not allocating
> > + *	EFSCORRUPTED	if there is any state mismatch at all
> 
> You changed the code but not the comment.
> 
> Cheers,
> 
> Dave.
-- 
Ben Hutchings
Any sufficiently advanced bug is indistinguishable from a feature.



Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ