Skip to content
Snippets Groups Projects
Commit 10ae4d5b authored by Abdun Nihaal's avatar Abdun Nihaal Committed by Upgrade Bot
Browse files

fs/ntfs3: Validate attribute data and valid sizes

commit 019d22eb upstream.

The data_size and valid_size fields of non resident attributes should be
less than the its alloc_size field, but this is not checked in
ntfs_read_mft function.

Syzbot reports a allocation order warning due to a large unchecked value
of data_size getting assigned to inode->i_size which is then passed to
kcalloc.

Add sanity check for ensuring that the data_size and valid_size fields
are not larger than alloc_size field.

Link: https://syzkaller.appspot.com/bug?extid=fa4648a5446460b7b963


Reported-and-tested-by: default avatar <syzbot+fa4648a5446460b7b963@syzkaller.appspotmail.com>
Fixes: (82cae269) fs/ntfs3: Add initialization of super block
Signed-off-by: default avatarAbdun Nihaal <abdun.nihaal@gmail.com>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bcc96bb6
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment