Skip to content

Commit a9847a1

Browse files
Tetsuo Handagregkh
authored andcommitted
fs/ntfs3: Use __GFP_NOWARN allocation at ntfs_fill_super()
[ Upstream commit 59bfd7a ] syzbot is reporting too large allocation at ntfs_fill_super() [1], for a crafted filesystem can contain bogus inode->i_size. Add __GFP_NOWARN in order to avoid too large allocation warning, than exhausting memory by using kvmalloc(). Link: https://syzkaller.appspot.com/bug?extid=33f3faaa0c08744f7d40 [1] Reported-by: syzot <[email protected]> Signed-off-by: Tetsuo Handa <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent abd2ee2 commit a9847a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ntfs3/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
11361136
goto put_inode_out;
11371137
}
11381138
bytes = inode->i_size;
1139-
sbi->def_table = t = kmalloc(bytes, GFP_NOFS);
1139+
sbi->def_table = t = kmalloc(bytes, GFP_NOFS | __GFP_NOWARN);
11401140
if (!t) {
11411141
err = -ENOMEM;
11421142
goto put_inode_out;

0 commit comments

Comments
 (0)