Patch "fs/ntfs3: Use __GFP_NOWARN allocation at wnd_init()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    fs/ntfs3: Use __GFP_NOWARN allocation at wnd_init()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     fs-ntfs3-use-__gfp_nowarn-allocation-at-wnd_init.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a20d88e199f076f2efdd1263f561c607cd6e63b1
Author: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
Date:   Sun Oct 2 23:39:15 2022 +0900

    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 [1]
    Reported-by: syzot <syzbot+fa4648a5446460b7b963@xxxxxxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Konstantin Komarov <almaz.alexandrovich@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/ntfs3/bitmap.c b/fs/ntfs3/bitmap.c
index 1930640be31a..45f95c1cb258 100644
--- a/fs/ntfs3/bitmap.c
+++ b/fs/ntfs3/bitmap.c
@@ -661,7 +661,7 @@ int wnd_init(struct wnd_bitmap *wnd, struct super_block *sb, size_t nbits)
 	if (!wnd->bits_last)
 		wnd->bits_last = wbits;
 
-	wnd->free_bits = kcalloc(wnd->nwnd, sizeof(u16), GFP_NOFS);
+	wnd->free_bits = kcalloc(wnd->nwnd, sizeof(u16), GFP_NOFS | __GFP_NOWARN);
 	if (!wnd->free_bits)
 		return -ENOMEM;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux