fs/ntfs3: Fix missing i_op in ntfs_read_mft
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Thu, 26 May 2022 09:51:03 +0000 (12:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:40:17 +0000 (11:40 +0200)
commitc293e8abc09e6e1faa50d967bd8862b1cbd575e5
tree7ab53730696e8dfef96d30480c56c9f33c40c8ac
parentefdcf4df7a362c679e0311630bd2bfcd7ddffc45
fs/ntfs3: Fix missing i_op in ntfs_read_mft

commit 37a530bfe56ca9a0d3129598803f2794c7428aae upstream.

There is null pointer dereference because i_op == NULL.
The bug happens because we don't initialize i_op for records in $Extend.
Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
Reported-by: Liangbin Lian <jjm2473@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ntfs3/inode.c