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, /usr/bin/Xwayland,
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 deny user domains applications to map a memory region as
79 both executable and writable, this is dangerous and the executable
80 should be reported in bugzilla, you must turn on the deny_execmem bool‐
81 ean. Enabled by default.
82
83 setsebool -P deny_execmem 1
84
85
86
87 If you want to control the ability to mmap a low area of the address
88 space, as configured by /proc/sys/vm/mmap_min_addr, you must turn on
89 the mmap_low_allowed boolean. Disabled by default.
90
91 setsebool -P mmap_low_allowed 1
92
93
94
95 If you want to disable kernel module loading, you must turn on the se‐
96 cure_mode_insmod boolean. Enabled by default.
97
98 setsebool -P secure_mode_insmod 1
99
100
101
102 If you want to allow unconfined executables to make their heap memory
103 executable. Doing this is a really bad idea. Probably indicates a
104 badly coded executable, but could indicate an attack. This executable
105 should be reported in bugzilla, you must turn on the selinuxuser_ex‐
106 echeap boolean. Disabled by default.
107
108 setsebool -P selinuxuser_execheap 1
109
110
111
112 If you want to allow unconfined executables to make their stack exe‐
113 cutable. This should never, ever be necessary. Probably indicates a
114 badly coded executable, but could indicate an attack. This executable
115 should be reported in bugzilla, you must turn on the selinuxuser_exec‐
116 stack boolean. Enabled by default.
117
118 setsebool -P selinuxuser_execstack 1
119
120
121
123 SELinux defines port types to represent TCP and UDP ports.
124
125 You can see the types associated with a port by using the following
126 command:
127
128 semanage port -l
129
130
131 Policy governs the access confined processes have to these ports.
132 SELinux xserver policy is very flexible allowing users to setup their
133 xserver processes in as secure a method as possible.
134
135 The following port types are defined for xserver:
136
137
138 xserver_port_t
139
140
141
142 Default Defined Ports:
143 tcp 6000-6020
144
146 The SELinux process type xserver_t can manage files labeled with the
147 following file types. The paths listed are the default paths for these
148 file types. Note the processes UID still need to have DAC permissions.
149
150 file_type
151
152 all files on the system
153
154
156 SELinux requires files to have an extended attribute to define the file
157 type.
158
159 You can see the context of a file using the -Z option to ls
160
161 Policy governs the access confined processes have to these files.
162 SELinux xserver policy is very flexible allowing users to setup their
163 xserver processes in as secure a method as possible.
164
165 STANDARD FILE CONTEXT
166
167 SELinux defines the file context types for the xserver, if you wanted
168 to store files with these types in a diffent paths, you need to execute
169 the semanage command to specify alternate labeling and then use re‐
170 storecon to put the labels on disk.
171
172 semanage fcontext -a -t xserver_log_t '/srv/myxserver_content(/.*)?'
173 restorecon -R -v /srv/myxserver_content
174
175 Note: SELinux often uses regular expressions to specify labels that
176 match multiple files.
177
178 The following file types are defined for xserver:
179
180
181
182 xserver_etc_t
183
184 - Set files with the xserver_etc_t type, if you want to store xserver
185 files in the /etc directories.
186
187
188
189 xserver_exec_t
190
191 - Set files with the xserver_exec_t type, if you want to transition an
192 executable to the xserver_t domain.
193
194
195 Paths:
196 /usr/bin/nvidia.*, /usr/bin/Xair, /usr/bin/Xorg, /usr/bin/Xvnc,
197 /usr/bin/Xephyr, /usr/bin/x11vnc, /usr/X11R6/bin/X, /usr/bin/Xway‐
198 land, /usr/X11R6/bin/Xorg, /usr/X11R6/bin/Xipaq,
199 /usr/libexec/Xorg.bin, /usr/X11R6/bin/XFree86,
200 /usr/libexec/Xorg.wrap, /usr/X11R6/bin/Xwrapper, /usr/libexec/gsd-
201 backlight-helper
202
203
204 xserver_log_t
205
206 - Set files with the xserver_log_t type, if you want to treat the data
207 as xserver log data, usually stored under the /var/log directory.
208
209
210 Paths:
211 /var/[xgkw]dm(/.*)?, /usr/var/[xgkw]dm(/.*)?,
212 /var/log/gdm(3)?(/.*)?, /var/log/Xorg.*, /var/log/XFree86.*,
213 /var/log/lightdm(/.*)?, /var/log/nvidia-installer.log.*
214
215
216 xserver_tmpfs_t
217
218 - Set files with the xserver_tmpfs_t type, if you want to store xserver
219 files on a tmpfs file system.
220
221
222
223 xserver_var_lib_t
224
225 - Set files with the xserver_var_lib_t type, if you want to store the
226 xserver files under the /var/lib directory.
227
228
229
230 xserver_var_run_t
231
232 - Set files with the xserver_var_run_t type, if you want to store the
233 xserver files under the /run or /var/run directory.
234
235
236 Paths:
237 /var/run/xorg(/.*)?, /var/run/video.rom
238
239
240 Note: File context can be temporarily modified with the chcon command.
241 If you want to permanently change the file context you need to use the
242 semanage fcontext command. This will modify the SELinux labeling data‐
243 base. You will need to use restorecon to apply the labels.
244
245
247 semanage fcontext can also be used to manipulate default file context
248 mappings.
249
250 semanage permissive can also be used to manipulate whether or not a
251 process type is permissive.
252
253 semanage module can also be used to enable/disable/install/remove pol‐
254 icy modules.
255
256 semanage port can also be used to manipulate the port definitions
257
258 semanage boolean can also be used to manipulate the booleans
259
260
261 system-config-selinux is a GUI tool available to customize SELinux pol‐
262 icy settings.
263
264
266 This manual page was auto-generated using sepolicy manpage .
267
268
270 selinux(8), xserver(8), semanage(8), restorecon(8), chcon(1), sepol‐
271 icy(8), setsebool(8)
272
273
274
275xserver 21-11-19 xserver_selinux(8)