mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-15 01:50:40 +09:00
UBIFS: restrict world-writable debugfs files
commit 8c559d30b4 upstream.
Don't allow everybody to dump sensitive information about filesystems.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
55d39791d0
commit
6b29cc2f85
@@ -2691,19 +2691,19 @@ int dbg_debugfs_init_fs(struct ubifs_info *c)
|
||||
}
|
||||
|
||||
fname = "dump_lprops";
|
||||
dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops);
|
||||
dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops);
|
||||
if (IS_ERR(dent))
|
||||
goto out_remove;
|
||||
d->dfs_dump_lprops = dent;
|
||||
|
||||
fname = "dump_budg";
|
||||
dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops);
|
||||
dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops);
|
||||
if (IS_ERR(dent))
|
||||
goto out_remove;
|
||||
d->dfs_dump_budg = dent;
|
||||
|
||||
fname = "dump_tnc";
|
||||
dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops);
|
||||
dent = debugfs_create_file(fname, S_IWUSR, d->dfs_dir, c, &dfs_fops);
|
||||
if (IS_ERR(dent))
|
||||
goto out_remove;
|
||||
d->dfs_dump_tnc = dent;
|
||||
|
||||
Reference in New Issue
Block a user