diff options
author | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2021-09-29 19:29:52 +0300 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2021-09-30 19:58:25 +0300 |
commit | 35afb70dcfe4eb445060dd955e5b67d962869ce5 (patch) | |
tree | 4221491228a97b4c37f81a9f16177c1608190895 /fs | |
parent | dbf59e2a33d2cb5ae0534523fd3d6d8bda808be8 (diff) | |
download | linux-stable-35afb70dcfe4eb445060dd955e5b67d962869ce5.tar.gz linux-stable-35afb70dcfe4eb445060dd955e5b67d962869ce5.tar.bz2 linux-stable-35afb70dcfe4eb445060dd955e5b67d962869ce5.zip |
fs/ntfs3: Check for NULL if ATTR_EA_INFO is incorrect
This can be reason for reported panic
https://lore.kernel.org/ntfs3/f9de5807-2311-7374-afb0-bc5dffb522c0@gmail.com/
Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation")
Reported-by: Mohammad Rasim <mohammad.rasim96@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ntfs3/frecord.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index 9a53f809576d..007602badd90 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -3080,7 +3080,9 @@ static bool ni_update_parent(struct ntfs_inode *ni, struct NTFS_DUP_INFO *dup, const struct EA_INFO *info; info = resident_data_ex(attr, sizeof(struct EA_INFO)); - dup->ea_size = info->size_pack; + /* If ATTR_EA_INFO exists 'info' can't be NULL. */ + if (info) + dup->ea_size = info->size_pack; } } |