aboutsummaryrefslogtreecommitdiff
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorAbdun Nihaal <[email protected]>2022-10-04 08:45:02 +0530
committerKonstantin Komarov <[email protected]>2022-11-12 20:59:41 +0300
commit019d22eb0eb707fc099e6e8fad9b3933236a06d0 (patch)
tree7a9d6d59d1ae87f11ea4f9db29ac190cf71b1381 /net/switchdev/switchdev.c
parent59bfd7a483da36bd202532a3d9ea1f14f3bf3aaf (diff)
fs/ntfs3: Validate attribute data and valid sizes
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: [email protected] Fixes: (82cae269cfa95) fs/ntfs3: Add initialization of super block Signed-off-by: Abdun Nihaal <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions