Skip to content

Commit 59bfd7a

Browse files
Tetsuo Handaaalexandrovich
authored andcommitted
fs/ntfs3: Use __GFP_NOWARN allocation at ntfs_fill_super()
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]>
1 parent 0d0f659 commit 59bfd7a

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
@@ -1167,7 +1167,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
11671167
goto put_inode_out;
11681168
}
11691169
bytes = inode->i_size;
1170-
sbi->def_table = t = kmalloc(bytes, GFP_NOFS);
1170+
sbi->def_table = t = kmalloc(bytes, GFP_NOFS | __GFP_NOWARN);
11711171
if (!t) {
11721172
err = -ENOMEM;
11731173
goto put_inode_out;

0 commit comments

Comments
 (0)