mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-15 19:55:32 +00:00
fs/ntfs3: Use __GFP_NOWARN allocation at ntfs_load_attr_list()
commit ea303f72d7
upstream.
syzbot is reporting too large allocation at ntfs_load_attr_list(), for
a crafted filesystem can have huge data_size.
Reported-by: syzbot <syzbot+89dbb3a789a5b9711793@syzkaller.appspotmail.com>
Link: https://syzkaller.appspot.com/bug?extid=89dbb3a789a5b9711793
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ab400bb306
commit
247409df51
1 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ int ntfs_load_attr_list(struct ntfs_inode *ni, struct ATTRIB *attr)
|
|||
|
||||
if (!attr->non_res) {
|
||||
lsize = le32_to_cpu(attr->res.data_size);
|
||||
le = kmalloc(al_aligned(lsize), GFP_NOFS);
|
||||
le = kmalloc(al_aligned(lsize), GFP_NOFS | __GFP_NOWARN);
|
||||
if (!le) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
|
@ -80,7 +80,7 @@ int ntfs_load_attr_list(struct ntfs_inode *ni, struct ATTRIB *attr)
|
|||
if (err < 0)
|
||||
goto out;
|
||||
|
||||
le = kmalloc(al_aligned(lsize), GFP_NOFS);
|
||||
le = kmalloc(al_aligned(lsize), GFP_NOFS | __GFP_NOWARN);
|
||||
if (!le) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
|
|
Loading…
Add table
Reference in a new issue