fs/ntfs3: Use __GFP_NOWARN allocation at wnd_init()
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Sun, 2 Oct 2022 14:39:15 +0000 (23:39 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 10:58:45 +0000 (11:58 +0100)
commitabd2ee2cf42f7fe5bb49c0d86e7d540765b0fbae
tree0e0b4bdf77f0d19061de5bb2118f4a04768cae64
parentd7ce7bb6881aae186e50f57eea935cff8d504751
fs/ntfs3: Use __GFP_NOWARN allocation at wnd_init()

[ Upstream commit 0d0f659bf713662fabed973f9996b8f23c59ca51 ]

syzbot is reporting too large allocation at wnd_init() [1], for a crafted
filesystem can become wnd->nwnd close to UINT_MAX. Add __GFP_NOWARN in
order to avoid too large allocation warning, than exhausting memory by
using kvcalloc().

Link: https://syzkaller.appspot.com/bug?extid=fa4648a5446460b7b963
Reported-by: syzot <syzbot+fa4648a5446460b7b963@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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ntfs3/bitmap.c