1xserver_selinux(8) SELinux Policy xserver xserver_selinux(8)
2
3
4
6 xserver_selinux - Security Enhanced Linux Policy for the xserver pro‐
7 cesses
8
10 Security-Enhanced Linux secures the xserver processes via flexible
11 mandatory access control.
12
13 The xserver processes execute with the xserver_t SELinux type. You can
14 check if you have these processes running by executing the ps command
15 with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep xserver_t
20
21
22
24 The xserver_t SELinux type can be entered via the xserver_exec_t file
25 type.
26
27 The default entrypoint paths for the xserver_t domain are the follow‐
28 ing:
29
30 /usr/bin/nvidia.*, /usr/bin/Xair, /usr/bin/Xorg, /usr/bin/Xvnc,
31 /usr/bin/Xephyr, /usr/bin/x11vnc, /usr/X11R6/bin/X,
32 /usr/X11R6/bin/Xorg, /usr/X11R6/bin/Xipaq, /usr/libexec/Xorg.bin,
33 /usr/X11R6/bin/XFree86, /usr/libexec/Xorg.wrap, /usr/X11R6/bin/Xwrap‐
34 per, /usr/libexec/gsd-backlight-helper
35
37 SELinux defines process types (domains) for each process running on the
38 system
39
40 You can see the context of a process using the -Z option to ps
41
42 Policy governs the access confined processes have to files. SELinux
43 xserver policy is very flexible allowing users to setup their xserver
44 processes in as secure a method as possible.
45
46 The following process types are defined for xserver:
47
48 xserver_t
49
50 Note: semanage permissive -a xserver_t can be used to make the process
51 type xserver_t permissive. SELinux does not deny access to permissive
52 process types, but the AVC (SELinux denials) messages are still gener‐
53 ated.
54
55
57 SELinux policy is customizable based on least access required. xserver
58 policy is extremely flexible and has several booleans that allow you to
59 manipulate the policy and run xserver with the tightest access possi‐
60 ble.
61
62
63
64 If you want to allows XServer to execute writable memory, you must turn
65 on the xserver_execmem boolean. Disabled by default.
66
67 setsebool -P xserver_execmem 1
68
69
70
71 If you want to support X userspace object manager, you must turn on the
72 xserver_object_manager boolean. Enabled by default.
73
74 setsebool -P xserver_object_manager 1
75
76
77
78 If you want to allow users to resolve user passwd entries directly from
79 ldap rather then using a sssd server, you must turn on the authlo‐
80 gin_nsswitch_use_ldap boolean. Disabled by default.
81
82 setsebool -P authlogin_nsswitch_use_ldap 1
83
84
85
86 If you want to deny user domains applications to map a memory region as
87 both executable and writable, this is dangerous and the executable
88 should be reported in bugzilla, you must turn on the deny_execmem bool‐
89 ean. Enabled by default.
90
91 setsebool -P deny_execmem 1
92
93
94
95 If you want to allow all domains to execute in fips_mode, you must turn
96 on the fips_mode boolean. Enabled by default.
97
98 setsebool -P fips_mode 1
99
100
101
102 If you want to allow confined applications to run with kerberos, you
103 must turn on the kerberos_enabled boolean. Enabled by default.
104
105 setsebool -P kerberos_enabled 1
106
107
108
109 If you want to control the ability to mmap a low area of the address
110 space, as configured by /proc/sys/vm/mmap_min_addr, you must turn on
111 the mmap_low_allowed boolean. Disabled by default.
112
113 setsebool -P mmap_low_allowed 1
114
115
116
117 If you want to allow system to run with NIS, you must turn on the
118 nis_enabled boolean. Disabled by default.
119
120 setsebool -P nis_enabled 1
121
122
123
124 If you want to allow confined applications to use nscd shared memory,
125 you must turn on the nscd_use_shm boolean. Disabled by default.
126
127 setsebool -P nscd_use_shm 1
128
129
130
131 If you want to disable kernel module loading, you must turn on the
132 secure_mode_insmod boolean. Enabled by default.
133
134 setsebool -P secure_mode_insmod 1
135
136
137
138 If you want to allow unconfined executables to make their heap memory
139 executable. Doing this is a really bad idea. Probably indicates a
140 badly coded executable, but could indicate an attack. This executable
141 should be reported in bugzilla, you must turn on the selin‐
142 uxuser_execheap boolean. Disabled by default.
143
144 setsebool -P selinuxuser_execheap 1
145
146
147
148 If you want to allow unconfined executables to make their stack exe‐
149 cutable. This should never, ever be necessary. Probably indicates a
150 badly coded executable, but could indicate an attack. This executable
151 should be reported in bugzilla, you must turn on the selinuxuser_exec‐
152 stack boolean. Enabled by default.
153
154 setsebool -P selinuxuser_execstack 1
155
156
157
158 If you want to allow confined virtual guests to interact with the
159 xserver, you must turn on the virt_use_xserver boolean. Disabled by
160 default.
161
162 setsebool -P virt_use_xserver 1
163
164
165
167 SELinux defines port types to represent TCP and UDP ports.
168
169 You can see the types associated with a port by using the following
170 command:
171
172 semanage port -l
173
174
175 Policy governs the access confined processes have to these ports.
176 SELinux xserver policy is very flexible allowing users to setup their
177 xserver processes in as secure a method as possible.
178
179 The following port types are defined for xserver:
180
181
182 xserver_port_t
183
184
185
186 Default Defined Ports:
187 tcp 6000-6020
188
190 The SELinux process type xserver_t can manage files labeled with the
191 following file types. The paths listed are the default paths for these
192 file types. Note the processes UID still need to have DAC permissions.
193
194 file_type
195
196 all files on the system
197
198
200 SELinux requires files to have an extended attribute to define the file
201 type.
202
203 You can see the context of a file using the -Z option to ls
204
205 Policy governs the access confined processes have to these files.
206 SELinux xserver policy is very flexible allowing users to setup their
207 xserver processes in as secure a method as possible.
208
209 STANDARD FILE CONTEXT
210
211 SELinux defines the file context types for the xserver, if you wanted
212 to store files with these types in a diffent paths, you need to execute
213 the semanage command to sepecify alternate labeling and then use
214 restorecon to put the labels on disk.
215
216 semanage fcontext -a -t xserver_log_t '/srv/myxserver_content(/.*)?'
217 restorecon -R -v /srv/myxserver_content
218
219 Note: SELinux often uses regular expressions to specify labels that
220 match multiple files.
221
222 The following file types are defined for xserver:
223
224
225
226 xserver_etc_t
227
228 - Set files with the xserver_etc_t type, if you want to store xserver
229 files in the /etc directories.
230
231
232
233 xserver_exec_t
234
235 - Set files with the xserver_exec_t type, if you want to transition an
236 executable to the xserver_t domain.
237
238
239 Paths:
240 /usr/bin/nvidia.*, /usr/bin/Xair, /usr/bin/Xorg, /usr/bin/Xvnc,
241 /usr/bin/Xephyr, /usr/bin/x11vnc, /usr/X11R6/bin/X,
242 /usr/X11R6/bin/Xorg, /usr/X11R6/bin/Xipaq, /usr/libexec/Xorg.bin,
243 /usr/X11R6/bin/XFree86, /usr/libexec/Xorg.wrap,
244 /usr/X11R6/bin/Xwrapper, /usr/libexec/gsd-backlight-helper
245
246
247 xserver_log_t
248
249 - Set files with the xserver_log_t type, if you want to treat the data
250 as xserver log data, usually stored under the /var/log directory.
251
252
253 Paths:
254 /var/[xgkw]dm(/.*)?, /usr/var/[xgkw]dm(/.*)?,
255 /var/log/gdm(3)?(/.*)?, /var/log/Xorg.*, /var/log/XFree86.*,
256 /var/log/lightdm(/.*)?, /var/log/nvidia-installer.log.*
257
258
259 xserver_tmpfs_t
260
261 - Set files with the xserver_tmpfs_t type, if you want to store xserver
262 files on a tmpfs file system.
263
264
265
266 xserver_var_lib_t
267
268 - Set files with the xserver_var_lib_t type, if you want to store the
269 xserver files under the /var/lib directory.
270
271
272
273 xserver_var_run_t
274
275 - Set files with the xserver_var_run_t type, if you want to store the
276 xserver files under the /run or /var/run directory.
277
278
279 Paths:
280 /var/run/xorg(/.*)?, /var/run/video.rom
281
282
283 Note: File context can be temporarily modified with the chcon command.
284 If you want to permanently change the file context you need to use the
285 semanage fcontext command. This will modify the SELinux labeling data‐
286 base. You will need to use restorecon to apply the labels.
287
288
290 semanage fcontext can also be used to manipulate default file context
291 mappings.
292
293 semanage permissive can also be used to manipulate whether or not a
294 process type is permissive.
295
296 semanage module can also be used to enable/disable/install/remove pol‐
297 icy modules.
298
299 semanage port can also be used to manipulate the port definitions
300
301 semanage boolean can also be used to manipulate the booleans
302
303
304 system-config-selinux is a GUI tool available to customize SELinux pol‐
305 icy settings.
306
307
309 This manual page was auto-generated using sepolicy manpage .
310
311
313 selinux(8), xserver(8), semanage(8), restorecon(8), chcon(1), sepol‐
314 icy(8), setsebool(8)
315
316
317
318xserver 19-05-30 xserver_selinux(8)