]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ntfs: check for valid standard information attribute
authorRustam Kovhaev <rkovhaev@gmail.com>
Wed, 24 Feb 2021 20:00:30 +0000 (12:00 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Mar 2021 17:22:36 +0000 (18:22 +0100)
commit49ee014a2070b209fd73ad96a7a36193dcdd149c
treeac129944afbad93ef30836267791d98ba3da62a3
parentafd4a33779bd37cf8b566ef1fbbbac06366c61f6
ntfs: check for valid standard information attribute

commit 4dfe6bd94959222e18d512bdf15f6bf9edb9c27c upstream.

Mounting a corrupted filesystem with NTFS resulted in a kernel crash.

We should check for valid STANDARD_INFORMATION attribute offset and length
before trying to access it

Link: https://lkml.kernel.org/r/20210217155930.1506815-1-rkovhaev@gmail.com
Link: https://syzkaller.appspot.com/bug?extid=c584225dabdea2f71969
Signed-off-by: Rustam Kovhaev <rkovhaev@gmail.com>
Reported-by: syzbot+c584225dabdea2f71969@syzkaller.appspotmail.com
Tested-by: syzbot+c584225dabdea2f71969@syzkaller.appspotmail.com
Acked-by: Anton Altaparmakov <anton@tuxera.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ntfs/inode.c