diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2022-10-02 17:54:11 +0300 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-11-12 20:59:41 +0300 |
commit | 59bfd7a483da36bd202532a3d9ea1f14f3bf3aaf (patch) | |
tree | 99d931894d1ed92fd1a9986dea999a1ea23b3cad /fs | |
parent | 0d0f659bf713662fabed973f9996b8f23c59ca51 (diff) | |
download | linux-59bfd7a483da36bd202532a3d9ea1f14f3bf3aaf.tar.xz |
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 <syzbot+33f3faaa0c08744f7d40@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ntfs3/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index 1e2c04e48f98..2fd1367a5982 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -1167,7 +1167,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc) goto put_inode_out; } bytes = inode->i_size; - sbi->def_table = t = kmalloc(bytes, GFP_NOFS); + sbi->def_table = t = kmalloc(bytes, GFP_NOFS | __GFP_NOWARN); if (!t) { err = -ENOMEM; goto put_inode_out; |