]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: fix in-superblock mount options processing
authorTheodore Ts'o <tytso@mit.edu>
Fri, 18 Nov 2016 18:24:26 +0000 (13:24 -0500)
committerJiri Slaby <jslaby@suse.cz>
Thu, 26 Jan 2017 16:22:34 +0000 (17:22 +0100)
commit399cf9694d2df236121351e3263e52c556ba2383
tree878abab769a6cab12e5eb578a694971da8f176c0
parentde4f994b3607b3f007fae21e77d07a0c970d40f0
ext4: fix in-superblock mount options processing

commit 5aee0f8a3f42c94c5012f1673420aee96315925a 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: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/ext4/super.c