File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1849,9 +1849,10 @@ int ntfs_security_init(struct ntfs_sb_info *sbi)
18491849 goto out ;
18501850 }
18511851
1852- root_sdh = resident_data (attr );
1852+ root_sdh = resident_data_ex (attr , sizeof ( struct INDEX_ROOT ) );
18531853 if (root_sdh -> type != ATTR_ZERO ||
1854- root_sdh -> rule != NTFS_COLLATION_TYPE_SECURITY_HASH ) {
1854+ root_sdh -> rule != NTFS_COLLATION_TYPE_SECURITY_HASH ||
1855+ offsetof(struct INDEX_ROOT , ihdr ) + root_sdh -> ihdr .used > attr -> res .data_size ) {
18551856 err = - EINVAL ;
18561857 goto out ;
18571858 }
@@ -1867,9 +1868,10 @@ int ntfs_security_init(struct ntfs_sb_info *sbi)
18671868 goto out ;
18681869 }
18691870
1870- root_sii = resident_data (attr );
1871+ root_sii = resident_data_ex (attr , sizeof ( struct INDEX_ROOT ) );
18711872 if (root_sii -> type != ATTR_ZERO ||
1872- root_sii -> rule != NTFS_COLLATION_TYPE_UINT ) {
1873+ root_sii -> rule != NTFS_COLLATION_TYPE_UINT ||
1874+ offsetof(struct INDEX_ROOT , ihdr ) + root_sii -> ihdr .used > attr -> res .data_size ) {
18731875 err = - EINVAL ;
18741876 goto out ;
18751877 }
You can’t perform that action at this time.
0 commit comments