summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy/0080-policy-modules-system-systemd-systemd-make-systemd_-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/refpolicy/refpolicy/0080-policy-modules-system-systemd-systemd-make-systemd_-.patch')
-rw-r--r--recipes-security/refpolicy/refpolicy/0080-policy-modules-system-systemd-systemd-make-systemd_-.patch162
1 files changed, 0 insertions, 162 deletions
diff --git a/recipes-security/refpolicy/refpolicy/0080-policy-modules-system-systemd-systemd-make-systemd_-.patch b/recipes-security/refpolicy/refpolicy/0080-policy-modules-system-systemd-systemd-make-systemd_-.patch
deleted file mode 100644
index cb8e821..0000000
--- a/recipes-security/refpolicy/refpolicy/0080-policy-modules-system-systemd-systemd-make-systemd_-.patch
+++ /dev/null
@@ -1,162 +0,0 @@
1From 05ec2d78b44e57ecf188472b903fe66eeb568951 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Thu, 18 Jun 2020 09:59:58 +0800
4Subject: [PATCH] policy/modules/system/systemd: systemd-*: make systemd_*_t
5 MLS trusted for writing/reading from files up to its clearance
6
7Fixes:
8avc: denied { search } for pid=219 comm="systemd-network"
9name="journal" dev="tmpfs" ino=10956
10scontext=system_u:system_r:systemd_networkd_t:s0-s15:c0.c1023
11tcontext=system_u:object_r:syslogd_runtime_t:s15:c0.c1023 tclass=dir
12permissive=0
13
14avc: denied { search } for pid=220 comm="systemd-resolve"
15name="journal" dev="tmpfs" ino=10956
16scontext=system_u:system_r:systemd_resolved_t:s0-s15:c0.c1023
17tcontext=system_u:object_r:syslogd_runtime_t:s15:c0.c1023 tclass=dir
18permissive=0
19avc: denied { search } for pid=220 comm="systemd-resolve" name="/"
20dev="tmpfs" ino=15102
21scontext=system_u:system_r:systemd_resolved_t:s0-s15:c0.c1023
22tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir permissive=0
23
24avc: denied { search } for pid=142 comm="systemd-modules"
25name="journal" dev="tmpfs" ino=10990
26scontext=system_u:system_r:systemd_modules_load_t:s0-s15:c0.c1023
27tcontext=system_u:object_r:syslogd_runtime_t:s15:c0.c1023 tclass=dir
28permissive=0
29
30audit: type=1400 audit(1592892455.376:3): avc: denied { write } for
31pid=120 comm="systemd-gpt-aut" name="kmsg" dev="devtmpfs" ino=10032
32scontext=system_u:system_r:systemd_generator_t:s0-s15:c0.c1023
33tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
34permissive=0
35
36audit: type=1400 audit(1592892455.381:4): avc: denied { write } for
37pid=119 comm="systemd-getty-g" name="kmsg" dev="devtmpfs" ino=10032
38scontext=system_u:system_r:systemd_generator_t:s0-s15:c0.c1023
39tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
40permissive=0
41
42avc: denied { read } for pid=125 comm="systemd-gpt-aut" name="sdb"
43dev="devtmpfs" ino=42
44scontext=system_u:system_r:systemd_generator_t:s0-s15:c0.c1023
45tcontext=system_u:object_r:fixed_disk_device_t:s15:c0.c1023
46tclass=blk_file permissive=0
47
48avc: denied { search } for pid=302 comm="systemd-hostnam"
49name="journal" dev="tmpfs" ino=14165
50scontext=system_u:system_r:systemd_hostnamed_t:s0-s15:c0.c1023
51tcontext=system_u:object_r:syslogd_runtime_t:s15:c0.c1023 tclass=dir
52permissive=0
53
54avc: denied { search } for pid=302 comm="systemd-hostnam" name="/"
55dev="tmpfs" ino=17310
56scontext=system_u:system_r:systemd_hostnamed_t:s0-s15:c0.c1023
57tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir permissive=0
58
59avc: denied { search } for pid=233 comm="systemd-rfkill"
60name="journal" dev="tmpfs" ino=14165
61scontext=system_u:system_r:systemd_rfkill_t:s0-s15:c0.c1023
62tcontext=system_u:object_r:syslogd_runtime_t:s15:c0.c1023 tclass=dir
63permissive=0
64
65avc: denied { write } for pid=233 comm="systemd-rfkill" name="kmsg"
66dev="devtmpfs" ino=2060
67scontext=system_u:system_r:systemd_rfkill_t:s0-s15:c0.c1023
68tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
69permissive=0
70
71avc: denied { search } for pid=354 comm="systemd-backlig"
72name="journal" dev="tmpfs" ino=1183
73scontext=system_u:system_r:systemd_backlight_t:s0-s15:c0.c1023
74tcontext=system_u:object_r:syslogd_runtime_t:s15:c0.c1023 tclass=dir
75permissive=0
76
77avc: denied { write } for pid=354 comm="systemd-backlig" name="kmsg"
78dev="devtmpfs" ino=3081
79scontext=system_u:system_r:systemd_backlight_t:s0-s15:c0.c1023
80tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
81permissive=0
82
83Upstream-Status: Inappropriate [embedded specific]
84
85Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
86---
87 policy/modules/system/systemd.te | 17 +++++++++++++++++
88 1 file changed, 17 insertions(+)
89
90diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te
91index f0b0e8b92..7b2d359b7 100644
92--- a/policy/modules/system/systemd.te
93+++ b/policy/modules/system/systemd.te
94@@ -326,6 +326,9 @@ files_search_var_lib(systemd_backlight_t)
95
96 kernel_read_kernel_sysctls(systemd_backlight_t)
97
98+mls_file_write_to_clearance(systemd_backlight_t)
99+mls_file_read_to_clearance(systemd_backlight_t)
100+
101 #######################################
102 #
103 # Binfmt local policy
104@@ -460,6 +463,9 @@ systemd_log_parse_environment(systemd_generator_t)
105
106 term_use_unallocated_ttys(systemd_generator_t)
107
108+mls_file_write_to_clearance(systemd_generator_t)
109+mls_file_read_to_clearance(systemd_generator_t)
110+
111 ifdef(`distro_gentoo',`
112 corecmd_shell_entry_type(systemd_generator_t)
113 ')
114@@ -497,6 +503,8 @@ sysnet_manage_config(systemd_hostnamed_t)
115
116 systemd_log_parse_environment(systemd_hostnamed_t)
117
118+mls_file_read_to_clearance(systemd_hostnamed_t)
119+
120 optional_policy(`
121 dbus_connect_system_bus(systemd_hostnamed_t)
122 dbus_system_bus_client(systemd_hostnamed_t)
123@@ -818,6 +826,8 @@ modutils_read_module_deps(systemd_modules_load_t)
124
125 systemd_log_parse_environment(systemd_modules_load_t)
126
127+mls_file_read_to_clearance(systemd_modules_load_t)
128+
129 ########################################
130 #
131 # networkd local policy
132@@ -876,6 +886,8 @@ sysnet_read_config(systemd_networkd_t)
133
134 systemd_log_parse_environment(systemd_networkd_t)
135
136+mls_file_read_to_clearance(systemd_networkd_t)
137+
138 optional_policy(`
139 dbus_system_bus_client(systemd_networkd_t)
140 dbus_connect_system_bus(systemd_networkd_t)
141@@ -1159,6 +1171,9 @@ udev_read_runtime_files(systemd_rfkill_t)
142
143 systemd_log_parse_environment(systemd_rfkill_t)
144
145+mls_file_write_to_clearance(systemd_rfkill_t)
146+mls_file_read_to_clearance(systemd_rfkill_t)
147+
148 #########################################
149 #
150 # Resolved local policy
151@@ -1202,6 +1217,8 @@ init_dgram_send(systemd_resolved_t)
152
153 seutil_read_file_contexts(systemd_resolved_t)
154
155+mls_file_read_to_clearance(systemd_resolved_t)
156+
157 systemd_log_parse_environment(systemd_resolved_t)
158 systemd_read_networkd_runtime(systemd_resolved_t)
159
160--
1612.17.1
162