1 |
commit: 2691ab991317ef15b9fbba6394c678aed2e3d758 |
2 |
Author: Chris PeBenito <chpebeni <AT> linux <DOT> microsoft <DOT> com> |
3 |
AuthorDate: Tue Sep 20 14:59:19 2022 +0000 |
4 |
Commit: Kenton Groombridge <concord <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 2 14:07:00 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=2691ab99 |
7 |
|
8 |
Drop audit_access allows. |
9 |
|
10 |
This permission is only used for auditing purposes. It is a no-op for allows. |
11 |
|
12 |
Signed-off-by: Chris PeBenito <chpebeni <AT> linux.microsoft.com> |
13 |
Signed-off-by: Kenton Groombridge <concord <AT> gentoo.org> |
14 |
|
15 |
policy/modules/kernel/devices.te | 6 +++--- |
16 |
policy/modules/kernel/files.te | 14 +++++++------- |
17 |
policy/modules/kernel/filesystem.te | 14 +++++++------- |
18 |
policy/modules/kernel/kernel.te | 24 ++++++++++++------------ |
19 |
policy/modules/kernel/storage.te | 4 ++-- |
20 |
5 files changed, 31 insertions(+), 31 deletions(-) |
21 |
|
22 |
diff --git a/policy/modules/kernel/devices.te b/policy/modules/kernel/devices.te |
23 |
index 49718cc26..5e2c77cbb 100644 |
24 |
--- a/policy/modules/kernel/devices.te |
25 |
+++ b/policy/modules/kernel/devices.te |
26 |
@@ -434,6 +434,6 @@ files_associate_tmp(device_node) |
27 |
# |
28 |
|
29 |
allow devices_unconfined_type self:capability sys_rawio; |
30 |
-allow devices_unconfined_type device_node:blk_file { manage_blk_file_perms relabel_blk_file_perms map execute quotaon mounton audit_access execmod watch }; |
31 |
-allow devices_unconfined_type device_node:chr_file { manage_chr_file_perms relabel_chr_file_perms map execute quotaon mounton execmod audit_access watch }; |
32 |
-allow devices_unconfined_type mtrr_device_t:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton entrypoint execmod audit_access watch }; |
33 |
+allow devices_unconfined_type device_node:blk_file { manage_blk_file_perms relabel_blk_file_perms map execute quotaon mounton execmod watch }; |
34 |
+allow devices_unconfined_type device_node:chr_file { manage_chr_file_perms relabel_chr_file_perms map execute quotaon mounton execmod watch }; |
35 |
+allow devices_unconfined_type mtrr_device_t:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton entrypoint execmod watch }; |
36 |
|
37 |
diff --git a/policy/modules/kernel/files.te b/policy/modules/kernel/files.te |
38 |
index 2691a8611..e8fe42214 100644 |
39 |
--- a/policy/modules/kernel/files.te |
40 |
+++ b/policy/modules/kernel/files.te |
41 |
@@ -227,13 +227,13 @@ fs_associate_tmpfs(tmpfsfile) |
42 |
# |
43 |
|
44 |
# Create/access any file in a labeled filesystem; |
45 |
-allow files_unconfined_type file_type:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton audit_access watch }; |
46 |
-allow files_unconfined_type file_type:lnk_file { manage_lnk_file_perms relabel_lnk_file_perms append map execute quotaon mounton open audit_access execmod watch }; |
47 |
-allow files_unconfined_type file_type:sock_file { manage_sock_file_perms relabel_sock_file_perms map execute quotaon mounton audit_access execmod watch }; |
48 |
-allow files_unconfined_type file_type:fifo_file { manage_fifo_file_perms relabel_fifo_file_perms map execute quotaon mounton audit_access execmod watch }; |
49 |
-allow files_unconfined_type file_type:blk_file { manage_blk_file_perms relabel_blk_file_perms map execute quotaon mounton audit_access execmod watch }; |
50 |
-allow files_unconfined_type file_type:chr_file { manage_chr_file_perms relabel_chr_file_perms map execute quotaon mounton audit_access watch }; |
51 |
-allow files_unconfined_type file_type:dir { manage_dir_perms relabel_dir_perms append map execute quotaon mounton add_name remove_name reparent search rmdir audit_access execmod watch }; |
52 |
+allow files_unconfined_type file_type:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton watch }; |
53 |
+allow files_unconfined_type file_type:lnk_file { manage_lnk_file_perms relabel_lnk_file_perms append map execute quotaon mounton open execmod watch }; |
54 |
+allow files_unconfined_type file_type:sock_file { manage_sock_file_perms relabel_sock_file_perms map execute quotaon mounton execmod watch }; |
55 |
+allow files_unconfined_type file_type:fifo_file { manage_fifo_file_perms relabel_fifo_file_perms map execute quotaon mounton execmod watch }; |
56 |
+allow files_unconfined_type file_type:blk_file { manage_blk_file_perms relabel_blk_file_perms map execute quotaon mounton execmod watch }; |
57 |
+allow files_unconfined_type file_type:chr_file { manage_chr_file_perms relabel_chr_file_perms map execute quotaon mounton watch }; |
58 |
+allow files_unconfined_type file_type:dir { manage_dir_perms relabel_dir_perms append map execute quotaon mounton add_name remove_name reparent search rmdir execmod watch }; |
59 |
|
60 |
# Mount/unmount any filesystem with the context= option. |
61 |
allow files_unconfined_type file_type:filesystem { mount remount unmount getattr relabelfrom relabelto associate quotamod quotaget watch }; |
62 |
|
63 |
diff --git a/policy/modules/kernel/filesystem.te b/policy/modules/kernel/filesystem.te |
64 |
index 810bdaaa0..b3fd4abf8 100644 |
65 |
--- a/policy/modules/kernel/filesystem.te |
66 |
+++ b/policy/modules/kernel/filesystem.te |
67 |
@@ -339,13 +339,13 @@ allow filesystem_unconfined_type filesystem_type:filesystem { mount remount unmo |
68 |
# Create/access other files. fs_type is to pick up various |
69 |
# pseudo filesystem types that are applied to both the filesystem |
70 |
# and its files. |
71 |
-allow filesystem_unconfined_type filesystem_type:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton entrypoint audit_access execmod watch }; |
72 |
-allow filesystem_unconfined_type filesystem_type:lnk_file { manage_lnk_file_perms relabel_lnk_file_perms append map execute quotaon mounton open audit_access execmod watch }; |
73 |
-allow filesystem_unconfined_type filesystem_type:sock_file { manage_sock_file_perms relabel_sock_file_perms map execute quotaon mounton audit_access execmod watch }; |
74 |
-allow filesystem_unconfined_type filesystem_type:fifo_file { manage_fifo_file_perms relabel_fifo_file_perms map execute quotaon mounton audit_access execmod watch }; |
75 |
-allow filesystem_unconfined_type filesystem_type:blk_file { manage_blk_file_perms relabel_blk_file_perms map execute quotaon mounton audit_access execmod watch }; |
76 |
-allow filesystem_unconfined_type filesystem_type:chr_file { manage_chr_file_perms relabel_chr_file_perms map execute quotaon mounton audit_access execmod watch }; |
77 |
-allow filesystem_unconfined_type filesystem_type:dir { manage_dir_perms relabel_dir_perms append map execute quotaon mounton add_name remove_name reparent search rmdir audit_access execmod watch }; |
78 |
+allow filesystem_unconfined_type filesystem_type:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton entrypoint execmod watch }; |
79 |
+allow filesystem_unconfined_type filesystem_type:lnk_file { manage_lnk_file_perms relabel_lnk_file_perms append map execute quotaon mounton open execmod watch }; |
80 |
+allow filesystem_unconfined_type filesystem_type:sock_file { manage_sock_file_perms relabel_sock_file_perms map execute quotaon mounton execmod watch }; |
81 |
+allow filesystem_unconfined_type filesystem_type:fifo_file { manage_fifo_file_perms relabel_fifo_file_perms map execute quotaon mounton execmod watch }; |
82 |
+allow filesystem_unconfined_type filesystem_type:blk_file { manage_blk_file_perms relabel_blk_file_perms map execute quotaon mounton execmod watch }; |
83 |
+allow filesystem_unconfined_type filesystem_type:chr_file { manage_chr_file_perms relabel_chr_file_perms map execute quotaon mounton execmod watch }; |
84 |
+allow filesystem_unconfined_type filesystem_type:dir { manage_dir_perms relabel_dir_perms append map execute quotaon mounton add_name remove_name reparent search rmdir execmod watch }; |
85 |
|
86 |
ifdef(`distro_gentoo',` |
87 |
# Fix bug 535986 - Mark configfs_t as file type (and mountpoint probably as well) |
88 |
|
89 |
diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te |
90 |
index b4e5bdc0b..d44d07d16 100644 |
91 |
--- a/policy/modules/kernel/kernel.te |
92 |
+++ b/policy/modules/kernel/kernel.te |
93 |
@@ -548,22 +548,22 @@ if(secure_mode_insmod) { |
94 |
# Rules for unconfined access to this module |
95 |
# |
96 |
|
97 |
-allow kern_unconfined proc_type:dir { manage_dir_perms relabel_dir_perms append map execute quotaon mounton audit_access execmod watch }; |
98 |
-allow kern_unconfined proc_type:lnk_file { manage_lnk_file_perms relabel_lnk_file_perms append map execute quotaon mounton open audit_access execmod watch }; |
99 |
-allow kern_unconfined proc_type:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton audit_access watch }; |
100 |
+allow kern_unconfined proc_type:dir { manage_dir_perms relabel_dir_perms append map execute quotaon mounton execmod watch }; |
101 |
+allow kern_unconfined proc_type:lnk_file { manage_lnk_file_perms relabel_lnk_file_perms append map execute quotaon mounton open execmod watch }; |
102 |
+allow kern_unconfined proc_type:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton watch }; |
103 |
|
104 |
-allow kern_unconfined sysctl_type:dir { manage_dir_perms relabel_dir_perms append map execute quotaon mounton audit_access execmod watch }; |
105 |
-allow kern_unconfined sysctl_type:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton audit_access watch }; |
106 |
+allow kern_unconfined sysctl_type:dir { manage_dir_perms relabel_dir_perms append map execute quotaon mounton execmod watch }; |
107 |
+allow kern_unconfined sysctl_type:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton watch }; |
108 |
|
109 |
allow kern_unconfined kernel_t:system { ipc_info syslog_read syslog_mod syslog_console module_request module_load halt reboot status start stop enable disable reload }; |
110 |
|
111 |
-allow kern_unconfined unlabeled_t:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton audit_access watch }; |
112 |
-allow kern_unconfined unlabeled_t:lnk_file { manage_lnk_file_perms relabel_lnk_file_perms append map execute quotaon mounton open audit_access execmod watch }; |
113 |
-allow kern_unconfined unlabeled_t:sock_file { manage_sock_file_perms relabel_sock_file_perms map execute quotaon mounton audit_access execmod watch }; |
114 |
-allow kern_unconfined unlabeled_t:fifo_file { manage_fifo_file_perms relabel_fifo_file_perms map execute quotaon mounton audit_access execmod watch }; |
115 |
-allow kern_unconfined unlabeled_t:blk_file { manage_blk_file_perms relabel_blk_file_perms map execute quotaon mounton audit_access execmod watch }; |
116 |
-allow kern_unconfined unlabeled_t:chr_file { manage_chr_file_perms relabel_chr_file_perms map execute quotaon mounton audit_access watch }; |
117 |
-allow kern_unconfined unlabeled_t:dir { manage_dir_perms relabelfrom relabelto append map execute quotaon mounton add_name remove_name reparent search rmdir audit_access execmod watch }; |
118 |
+allow kern_unconfined unlabeled_t:file { manage_file_perms relabel_file_perms exec_file_perms quotaon mounton watch }; |
119 |
+allow kern_unconfined unlabeled_t:lnk_file { manage_lnk_file_perms relabel_lnk_file_perms append map execute quotaon mounton open execmod watch }; |
120 |
+allow kern_unconfined unlabeled_t:sock_file { manage_sock_file_perms relabel_sock_file_perms map execute quotaon mounton execmod watch }; |
121 |
+allow kern_unconfined unlabeled_t:fifo_file { manage_fifo_file_perms relabel_fifo_file_perms map execute quotaon mounton execmod watch }; |
122 |
+allow kern_unconfined unlabeled_t:blk_file { manage_blk_file_perms relabel_blk_file_perms map execute quotaon mounton execmod watch }; |
123 |
+allow kern_unconfined unlabeled_t:chr_file { manage_chr_file_perms relabel_chr_file_perms map execute quotaon mounton watch }; |
124 |
+allow kern_unconfined unlabeled_t:dir { manage_dir_perms relabelfrom relabelto append map execute quotaon mounton add_name remove_name reparent search rmdir execmod watch }; |
125 |
allow kern_unconfined unlabeled_t:filesystem { mount remount unmount getattr relabelfrom relabelto associate quotamod quotaget watch }; |
126 |
allow kern_unconfined unlabeled_t:association { sendto recvfrom setcontext polmatch }; |
127 |
allow kern_unconfined unlabeled_t:packet { send recv relabelto forward_in forward_out }; |
128 |
|
129 |
diff --git a/policy/modules/kernel/storage.te b/policy/modules/kernel/storage.te |
130 |
index dfe1a1663..7d30dc450 100644 |
131 |
--- a/policy/modules/kernel/storage.te |
132 |
+++ b/policy/modules/kernel/storage.te |
133 |
@@ -59,5 +59,5 @@ dev_node(tape_device_t) |
134 |
# Unconfined access to this module |
135 |
# |
136 |
|
137 |
-allow storage_unconfined_type { fixed_disk_device_t removable_device_t }:blk_file { manage_blk_file_perms relabel_blk_file_perms map execute quotaon mounton audit_access execmod }; |
138 |
-allow storage_unconfined_type { scsi_generic_device_t tape_device_t }:chr_file { manage_chr_file_perms relabel_chr_file_perms map execute quotaon mounton execmod audit_access }; |
139 |
+allow storage_unconfined_type { fixed_disk_device_t removable_device_t }:blk_file { manage_blk_file_perms relabel_blk_file_perms map execute quotaon mounton execmod }; |
140 |
+allow storage_unconfined_type { scsi_generic_device_t tape_device_t }:chr_file { manage_chr_file_perms relabel_chr_file_perms map execute quotaon mounton execmod }; |