• Theodore Ts'o's avatar
    ext4: fix in-superblock mount options processing · dddc6d46
    Theodore Ts'o authored
    commit 5aee0f8a
    
     upstream.
    
    Fix a large number of problems with how we handle mount options in the
    superblock.  For one, if the string in the superblock is long enough
    that it is not null terminated, we could run off the end of the string
    and try to interpret superblocks fields as characters.  It's unlikely
    this will cause a security problem, but it could result in an invalid
    parse.  Also, parse_options is destructive to the string, so in some
    cases if there is a comma-separated string, it would be modified in
    the superblock.  (Fortunately it only happens on file systems with a
    1k block size.)
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    [bwh: Backported to 3.16: adjust indentation]
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    dddc6d46
super.c 161 KB