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: <000001d6956b$e7bab2e0$b73018a0$@samsung.com>
Date:   Mon, 28 Sep 2020 16:49:33 +0900
From:   "Namjae Jeon" <namjae.jeon@...sung.com>
To:     "'Tetsuhiro Kohada'" <kohada.t2@...il.com>
Cc:     <kohada.tetsuhiro@...mitsubishielectric.co.jp>,
        <mori.takahiro@...mitsubishielectric.co.jp>,
        <motai.hirotaka@...mitsubishielectric.co.jp>,
        <linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        "'Sungjong Seo'" <sj1557.seo@...sung.com>
Subject: RE: [PATCH 2/3] exfat: remove useless check in exfat_move_file()

> > >> --- a/fs/exfat/namei.c
> > >> +++ b/fs/exfat/namei.c
> > >> @@ -1095,11 +1095,6 @@ static int exfat_move_file(struct inode
> > >> *inode, struct exfat_chain *p_olddir,
> > >>   	if (!epmov)
> > >>   		return -EIO;
> > >>
> > >> -	/* check if the source and target directory is the same */
> > >> -	if (exfat_get_entry_type(epmov) == TYPE_DIR &&
> > >> -	    le32_to_cpu(epmov->dentry.stream.start_clu) == p_newdir->dir)
> > >> -		return -EINVAL;
> > >> -
> > >
> > > It might check if the cluster numbers are same between source entry
> > > and target directory.
> >
> > This checks if newdir is the move target itself.
> > Example:
> >    mv /mnt/dir0 /mnt/dir0/foo
> >
> > However, this check is not enough.
> > We need to check newdir and all ancestors.
> > Example:
> >    mv /mnt/dir0 /mnt/dir0/dir1/foo
> >    mv /mnt/dir0 /mnt/dir0/dir1/dir2/foo
> >    ...
> >
> > This is probably a taboo for all layered filesystems.
> >
> >
> > > Could you let me know what code you mentioned?
> > > Or do you mean the codes on vfs?
> >
> > You can find in do_renameat2(). --- around 'fs/namei.c:4440'
> > If the destination ancestors are itself, our driver will not be called.
> 
> I think, of course, vfs has been doing that.
> So that code is unnecessary in normal situations.
> 
> That code comes from the old exfat implementation.
> And as far as I understand, it seems to check once more "the cluster number"
> even though it comes through vfs so that it tries detecting abnormal of on-disk.
> 
> Anyway, I agonized if it is really needed.
> In conclusion, old code could be eliminated and your patch looks reasonable.
> Thanks
> 
> Acked-by: Sungjong Seo <sj1557.seo@...sung.com>
> 
> >
> >
> > BTW
> > Are you busy now?
> I'm sorry, I'm so busy for my full time work :( Anyway, I'm trying to review serious bug patches or
> bug reports first.
> Other patches, such as clean-up or code refactoring, may take some time to review.
> 
> > I am waiting for your reply about "integrates dir-entry getting and
> > validation" patch.
> As I know, your patch is being under review by Namjae.
I already gave comments and a patch, but you said you can't do it.
I'm sorry, But I can't accept an incomplete patch. I will directly fix it later.
> 
> >
> > BR
> > ---
> > Tetsuhiro Kohada <kohada.t2@...il.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ