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] [day] [month] [year] [list]
Message-ID: <Y8ULxwOtdKWu/CzX@kernel-devel>
Date:   Mon, 16 Jan 2023 17:33:11 +0900
From:   Shigeru Yoshida <syoshida@...hat.com>
To:     Konstantin Komarov <almaz.alexandrovich@...agon-software.com>
Cc:     ntfs3@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs/ntfs3: Fix error handling in ntfs_new_inode()

Hi,

On Fri, Jan 13, 2023 at 01:44:48PM +0400, Konstantin Komarov wrote:
> On 04.01.2023 16:39, Shigeru Yoshida wrote:
> > When memory allocation for mi->mrec fails, ntfs_new_inode() calls
> > iput().  iput() calls ni_write_inode() indirectly, it references
> > uninitialized mi->mrec, and this causes the kernel crash.  This patch
> > fixes the issue by making the inode bad before calling iput().
> > 
> > Signed-off-by: Shigeru Yoshida <syoshida@...hat.com>
> > ---
> >   fs/ntfs3/fsntfs.c | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c
> > index 567563771bf8..7b93f2aeb6f6 100644
> > --- a/fs/ntfs3/fsntfs.c
> > +++ b/fs/ntfs3/fsntfs.c
> > @@ -1683,6 +1683,7 @@ struct ntfs_inode *ntfs_new_inode(struct ntfs_sb_info *sbi, CLST rno, bool dir)
> >   out:
> >   	if (err) {
> > +		_ntfs_bad_inode(inode);
> >   		iput(inode);
> >   		ni = ERR_PTR(err);
> >   	}
> 
> Hello.
> 
> This bug have been already fixed by Ye Bin (https://lore.kernel.org/lkml/20221117091912.3436127-1-yebin@huaweicloud.com/).

I've missed the fix you mentioned.
Thank you so much for your reply!

Shigeru

> 
>  * Thanks for your work.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ