mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
fs/ntfs3: Additional check in ni_clear()
[ Upstream commit d178944db36b3369b78a08ba520de109b89bf2a9 ] Checking of NTFS_FLAGS_LOG_REPLAYING added to prevent access to uninitialized bitmap during replay process. Reported-by: syzbot+3bfd2cc059ab93efcdb4@syzkaller.appspotmail.com Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c8e7d3b72e
commit
14a23e15a5
@@ -102,7 +102,9 @@ void ni_clear(struct ntfs_inode *ni)
|
||||
{
|
||||
struct rb_node *node;
|
||||
|
||||
if (!ni->vfs_inode.i_nlink && ni->mi.mrec && is_rec_inuse(ni->mi.mrec))
|
||||
if (!ni->vfs_inode.i_nlink && ni->mi.mrec &&
|
||||
is_rec_inuse(ni->mi.mrec) &&
|
||||
!(ni->mi.sbi->flags & NTFS_FLAGS_LOG_REPLAYING))
|
||||
ni_delete_all(ni);
|
||||
|
||||
al_destroy(ni);
|
||||
|
||||
Reference in New Issue
Block a user