linux-stable/fs/ntfs
Dongliang Mu c641087d38 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-08 13:58:41 +02:00
..
Kconfig fs: ntfs: Limit NTFS_RW to page sizes smaller than 64k 2021-11-27 14:34:41 -08:00
Makefile
aops.c
aops.h
attrib.c fs/ntfs/attrib.c: fix one kernel-doc comment 2022-01-15 16:30:24 +02:00
attrib.h
bitmap.c
bitmap.h
collate.c
collate.h
compress.c
debug.c
debug.h
dir.c
dir.h
endian.h
file.c gfs2: Fix mmap + page fault deadlocks 2021-11-02 12:25:03 -07:00
index.c
index.h
inode.c ntfs: add sanity check on allocation size 2022-04-08 13:58:41 +02:00
inode.h fs: make helpers idmap mount aware 2021-01-24 14:27:20 +01:00
layout.h ntfs: layout.h: delete duplicated words 2021-02-24 13:38:26 -08:00
lcnalloc.c
lcnalloc.h
logfile.c fs/ntfs: remove unused varibles 2020-12-15 12:13:37 -08:00
logfile.h
malloc.h
mft.c
mft.h
mst.c
namei.c
ntfs.h
quota.c
quota.h
runlist.c
runlist.h
super.c ntfs: use sb_bdev_nr_blocks 2021-10-18 14:43:23 -06:00
sysctl.c
sysctl.h
time.h
types.h
unistr.c
upcase.c
usnjrnl.c
usnjrnl.h
volume.h