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: <20200330134853.3icodnii6knomwch@work>
Date:   Mon, 30 Mar 2020 15:48:53 +0200
From:   Lukas Czerner <lczerner@...hat.com>
To:     Jan Kara <jack@...e.cz>
Cc:     Ted Tso <tytso@....edu>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH 1/2] ext2fs: Fix error checking in dx_link()

On Mon, Mar 30, 2020 at 03:24:40PM +0200, Lukas Czerner wrote:
> On Mon, Mar 30, 2020 at 11:09:31AM +0200, Jan Kara wrote:
> > dx_lookup() uses errcode_t return values. As such anything non-zero is
> > an error, not values less than zero. Fix the error checking to avoid
> > crashes on corrupted filesystems.
> 
> Looks good, thanks.
> 
> Signed-off-by: Lukas Czerner <lczerner@...hat.com>

of course that should be

Reviewed-by: Lukas Czerner <lczerner@...hat.com>

-Lukas


> 
> > 
> > Signed-off-by: Jan Kara <jack@...e.cz>
> > ---
> >  lib/ext2fs/link.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/lib/ext2fs/link.c b/lib/ext2fs/link.c
> > index 6f523aee718c..7b5bb022117c 100644
> > --- a/lib/ext2fs/link.c
> > +++ b/lib/ext2fs/link.c
> > @@ -571,7 +571,7 @@ static errcode_t dx_link(ext2_filsys fs, ext2_ino_t dir,
> >  	dx_info.namelen = strlen(name);
> >  again:
> >  	retval = dx_lookup(fs, dir, diri, &dx_info);
> > -	if (retval < 0)
> > +	if (retval)
> >  		goto free_buf;
> >  
> >  	retval = add_dirent_to_buf(fs,
> > -- 
> > 2.16.4
> > 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ