Skip to content

Commit 4e8011f

Browse files
Tetsuo Handaaalexandrovich
authored andcommitted
ntfs3: pretend $Extend records as regular files
Since commit af153bb ("vfs: catch invalid modes in may_open()") requires any inode be one of S_IFDIR/S_IFLNK/S_IFREG/S_IFCHR/S_IFBLK/ S_IFIFO/S_IFSOCK type, use S_IFREG for $Extend records. Reported-by: syzbot <[email protected]> Closes: https://syzkaller.appspot.com/bug?extid=895c23f6917da440ed0d Signed-off-by: Tetsuo Handa <[email protected]> Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 21dc07a commit 4e8011f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/ntfs3/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ static struct inode *ntfs_read_mft(struct inode *inode,
471471
fname->home.seq == cpu_to_le16(MFT_REC_EXTEND)) {
472472
/* Records in $Extend are not a files or general directories. */
473473
inode->i_op = &ntfs_file_inode_operations;
474+
mode = S_IFREG;
474475
} else {
475476
err = -EINVAL;
476477
goto out;

0 commit comments

Comments
 (0)