udf: Fortify LVID loading
A user has reported an oops in udf_statfs() that was caused by numOfPartitions entry in LVID structure being corrupted. Fix the problem by verifying whether numOfPartitions makes sense at least to the extent that LVID fits into a single block as it should. Reported-by: Juergen Weigert <jw@suse.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
@@ -162,7 +162,7 @@ static inline struct udf_sb_info *UDF_SB(struct super_block *sb)
|
||||
return sb->s_fs_info;
|
||||
}
|
||||
|
||||
struct logicalVolIntegrityDescImpUse *udf_sb_lvidiu(struct udf_sb_info *sbi);
|
||||
struct logicalVolIntegrityDescImpUse *udf_sb_lvidiu(struct super_block *sb);
|
||||
|
||||
int udf_compute_nr_groups(struct super_block *sb, u32 partition);
|
||||
|
||||
|
Reference in New Issue
Block a user