Skip to content

Commit bf81100

Browse files
committed
apparmor: fix apparmorfs DAC access permissions
The DAC access permissions for several apparmorfs files are wrong. .access - needs to be writable by all tasks to perform queries the others in the set only provide a read fn so should be read only. With policy namespace virtualization all apparmor needs to control the permission and visibility checks directly which means DAC access has to be allowed for all user, group, and other. BugLink: http://bugs.launchpad.net/bugs/1713103 Fixes: c97204b ("apparmor: rename apparmor file fns and data to indicate use") Signed-off-by: John Johansen <[email protected]>
1 parent b1545db commit bf81100

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

security/apparmor/apparmorfs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,12 +2215,12 @@ static struct aa_sfs_entry aa_sfs_entry_features[] = {
22152215
};
22162216

22172217
static struct aa_sfs_entry aa_sfs_entry_apparmor[] = {
2218-
AA_SFS_FILE_FOPS(".access", 0640, &aa_sfs_access),
2218+
AA_SFS_FILE_FOPS(".access", 0666, &aa_sfs_access),
22192219
AA_SFS_FILE_FOPS(".stacked", 0444, &seq_ns_stacked_fops),
22202220
AA_SFS_FILE_FOPS(".ns_stacked", 0444, &seq_ns_nsstacked_fops),
2221-
AA_SFS_FILE_FOPS(".ns_level", 0666, &seq_ns_level_fops),
2222-
AA_SFS_FILE_FOPS(".ns_name", 0640, &seq_ns_name_fops),
2223-
AA_SFS_FILE_FOPS("profiles", 0440, &aa_sfs_profiles_fops),
2221+
AA_SFS_FILE_FOPS(".ns_level", 0444, &seq_ns_level_fops),
2222+
AA_SFS_FILE_FOPS(".ns_name", 0444, &seq_ns_name_fops),
2223+
AA_SFS_FILE_FOPS("profiles", 0444, &aa_sfs_profiles_fops),
22242224
AA_SFS_DIR("features", aa_sfs_entry_features),
22252225
{ }
22262226
};

0 commit comments

Comments
 (0)