summaryrefslogtreecommitdiff
path: root/include/linux/i2c/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorZiyi Guo <n7l8m4@u.northwestern.edu>2026-02-10 15:56:34 +0000
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2026-02-24 20:03:14 +0100
commite10e72f69734a90c8719d160e8efb164ce5d9e26 (patch)
tree77557947ed24e709505768163be6d8398a057196 /include/linux/i2c/git@git.tavy.me:linux-stable.git
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f (diff)
ntfs3: reject inodes with zero non-DOS link count
ntfs_read_mft() counts file name attributes into two variables: names (all names including DOS 8.3) and links (non-DOS names only). The validation at line 424 checks names but set_nlink() at line 436 uses links. A corrupted NTFS image where all file name attributes have type FILE_NAME_DOS passes the names check but results in set_nlink(inode, 0). When such an inode is loaded via a code path that passes name=NULL to ntfs_iget5() and the nlink=0 inode enters the VFS. The subsequent unlink, rmdir, or rename targeting this inode calls drop_nlink() which triggers WARN_ON(inode->i_nlink == 0) in fs/inode.c. An all-DOS-name MFT record cannot exist on a valid NTFS volume. Reject such records by checking for links == 0 before calling set_nlink(). Signed-off-by: Ziyi Guo <n7l8m4@u.northwestern.edu> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'include/linux/i2c/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions