linux-stable/fs/ntfs
Dongliang Mu 21d490232f ntfs: add sanity check on allocation size
[ Upstream commit 714fbf2647 ]

ntfs_read_inode_mount invokes ntfs_malloc_nofs with zero allocation
size.  It triggers one BUG in the __ntfs_malloc function.

Fix this by adding sanity check on ni->attr_list_size.

Link: https://lkml.kernel.org/r/20220120094914.47736-1-dzm91@hust.edu.cn
Reported-by: syzbot+3c765c5248797356edaa@syzkaller.appspotmail.com
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Acked-by: Anton Altaparmakov <anton@tuxera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-20 09:08:22 +02:00
..
aops.c fs: Add helper to clean bdev aliases under a bh and use it 2016-11-04 14:34:47 -06:00
aops.h mm, fs: remove remaining PAGE_CACHE_* and page_cache_{get,release} usage 2016-04-04 10:41:08 -07:00
attrib.c
attrib.h
bitmap.c
bitmap.h
collate.c
collate.h
compress.c fs: have submit_bh users pass in op and flags separately 2016-06-07 13:41:38 -06:00
debug.c
debug.h
dir.c fs: convert a pile of fsync routines to errseq_t based reporting 2017-08-01 08:39:29 -04:00
dir.h
endian.h
file.c fs: convert a pile of fsync routines to errseq_t based reporting 2017-08-01 08:39:29 -04:00
index.c mm, fs: remove remaining PAGE_CACHE_* and page_cache_{get,release} usage 2016-04-04 10:41:08 -07:00
index.h
inode.c ntfs: add sanity check on allocation size 2022-04-20 09:08:22 +02:00
inode.h
Kconfig
layout.h
lcnalloc.c
lcnalloc.h
logfile.c block,fs: untangle fs.h and blk_types.h 2016-11-01 09:43:26 -06:00
logfile.h
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
malloc.h
mft.c mm: only include blk_types in swap.h if CONFIG_SWAP is enabled 2016-11-01 09:43:26 -06:00
mft.h
mst.c
namei.c ntfs: Use ERR_CAST() to avoid cross-structure cast 2017-05-28 10:11:48 -07:00
ntfs.h
quota.c
quota.h
runlist.c
runlist.h
super.c VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) 2017-07-17 08:45:34 +01:00
sysctl.c
sysctl.h
time.h
types.h
unistr.c
upcase.c
usnjrnl.c
usnjrnl.h
volume.h