1udev_selinux(8) SELinux Policy udev udev_selinux(8)
2
3
4
6 udev_selinux - Security Enhanced Linux Policy for the udev processes
7
9 Security-Enhanced Linux secures the udev processes via flexible manda‐
10 tory access control.
11
12 The udev processes execute with the udev_t SELinux type. You can check
13 if you have these processes running by executing the ps command with
14 the -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep udev_t
19
20
21
23 The udev_t SELinux type can be entered via the file_type, unlabeled_t,
24 proc_type, filesystem_type, mtrr_device_t, udev_exec_t, sysctl_type,
25 udev_helper_exec_t file types.
26
27 The default entrypoint paths for the udev_t domain are the following:
28
29 all files on the system, /dev/cpu/mtrr, /sbin/udev, /sbin/udevd,
30 /sbin/udevadm, /sbin/udevsend, /sbin/udevstart, /sbin/start_udev,
31 /usr/bin/udevinfo, /lib/udev/udev-acl, /sbin/wait_for_sysfs,
32 /etc/dev.d/.+, /etc/udev/scripts/.+, /etc/hotplug.d/default/udev.*
33
35 SELinux defines process types (domains) for each process running on the
36 system
37
38 You can see the context of a process using the -Z option to ps
39
40 Policy governs the access confined processes have to files. SELinux
41 udev policy is very flexible allowing users to setup their udev pro‐
42 cesses in as secure a method as possible.
43
44 The following process types are defined for udev:
45
46 udev_t
47
48 Note: semanage permissive -a udev_t can be used to make the process
49 type udev_t permissive. SELinux does not deny access to permissive
50 process types, but the AVC (SELinux denials) messages are still gener‐
51 ated.
52
53
55 SELinux policy is customizable based on least access required. udev
56 policy is extremely flexible and has several booleans that allow you to
57 manipulate the policy and run udev with the tightest access possible.
58
59
60
61 If you want to allow all daemons to write corefiles to /, you must turn
62 on the allow_daemons_dump_core boolean. Disabled by default.
63
64 setsebool -P allow_daemons_dump_core 1
65
66
67
68 If you want to allow all daemons to use tcp wrappers, you must turn on
69 the allow_daemons_use_tcp_wrapper boolean. Disabled by default.
70
71 setsebool -P allow_daemons_use_tcp_wrapper 1
72
73
74
75 If you want to allow all daemons the ability to read/write terminals,
76 you must turn on the allow_daemons_use_tty boolean. Disabled by
77 default.
78
79 setsebool -P allow_daemons_use_tty 1
80
81
82
83 If you want to allow all domains to use other domains file descriptors,
84 you must turn on the allow_domain_fd_use boolean. Enabled by default.
85
86 setsebool -P allow_domain_fd_use 1
87
88
89
90 If you want to allow unconfined executables to make their heap memory
91 executable. Doing this is a really bad idea. Probably indicates a
92 badly coded executable, but could indicate an attack. This executable
93 should be reported in bugzilla, you must turn on the allow_execheap
94 boolean. Disabled by default.
95
96 setsebool -P allow_execheap 1
97
98
99
100 If you want to allow unconfined executables to map a memory region as
101 both executable and writable, this is dangerous and the executable
102 should be reported in bugzilla), you must turn on the allow_execmem
103 boolean. Enabled by default.
104
105 setsebool -P allow_execmem 1
106
107
108
109 If you want to allow all unconfined executables to use libraries
110 requiring text relocation that are not labeled textrel_shlib_t), you
111 must turn on the allow_execmod boolean. Enabled by default.
112
113 setsebool -P allow_execmod 1
114
115
116
117 If you want to allow unconfined executables to make their stack exe‐
118 cutable. This should never, ever be necessary. Probably indicates a
119 badly coded executable, but could indicate an attack. This executable
120 should be reported in bugzilla), you must turn on the allow_execstack
121 boolean. Enabled by default.
122
123 setsebool -P allow_execstack 1
124
125
126
127 If you want to allow confined applications to run with kerberos, you
128 must turn on the allow_kerberos boolean. Enabled by default.
129
130 setsebool -P allow_kerberos 1
131
132
133
134 If you want to allow sysadm to debug or ptrace all processes, you must
135 turn on the allow_ptrace boolean. Disabled by default.
136
137 setsebool -P allow_ptrace 1
138
139
140
141 If you want to allow system to run with NIS, you must turn on the
142 allow_ypbind boolean. Disabled by default.
143
144 setsebool -P allow_ypbind 1
145
146
147
148 If you want to enable cluster mode for daemons, you must turn on the
149 daemons_enable_cluster_mode boolean. Disabled by default.
150
151 setsebool -P daemons_enable_cluster_mode 1
152
153
154
155 If you want to allow all domains to have the kernel load modules, you
156 must turn on the domain_kernel_load_modules boolean. Disabled by
157 default.
158
159 setsebool -P domain_kernel_load_modules 1
160
161
162
163 If you want to allow all domains to execute in fips_mode, you must turn
164 on the fips_mode boolean. Enabled by default.
165
166 setsebool -P fips_mode 1
167
168
169
170 If you want to enable reading of urandom for all domains, you must turn
171 on the global_ssp boolean. Disabled by default.
172
173 setsebool -P global_ssp 1
174
175
176
177 If you want to enable support for upstart as the init program, you must
178 turn on the init_upstart boolean. Enabled by default.
179
180 setsebool -P init_upstart 1
181
182
183
184 If you want to allow certain domains to map low memory in the kernel,
185 you must turn on the mmap_low_allowed boolean. Disabled by default.
186
187 setsebool -P mmap_low_allowed 1
188
189
190
191 If you want to allow confined applications to use nscd shared memory,
192 you must turn on the nscd_use_shm boolean. Enabled by default.
193
194 setsebool -P nscd_use_shm 1
195
196
197
198 If you want to disable transitions to insmod, you must turn on the
199 secure_mode_insmod boolean. Disabled by default.
200
201 setsebool -P secure_mode_insmod 1
202
203
204
205 If you want to boolean to determine whether the system permits loading
206 policy, setting enforcing mode, and changing boolean values. Set this
207 to true and you have to reboot to set it back, you must turn on the
208 secure_mode_policyload boolean. Disabled by default.
209
210 setsebool -P secure_mode_policyload 1
211
212
213
214 If you want to support X userspace object manager, you must turn on the
215 xserver_object_manager boolean. Disabled by default.
216
217 setsebool -P xserver_object_manager 1
218
219
220
222 The SELinux process type udev_t can manage files labeled with the fol‐
223 lowing file types. The paths listed are the default paths for these
224 file types. Note the processes UID still need to have DAC permissions.
225
226 file_type
227
228 all files on the system
229
230
232 SELinux requires files to have an extended attribute to define the file
233 type.
234
235 You can see the context of a file using the -Z option to ls
236
237 Policy governs the access confined processes have to these files.
238 SELinux udev policy is very flexible allowing users to setup their udev
239 processes in as secure a method as possible.
240
241 STANDARD FILE CONTEXT
242
243 SELinux defines the file context types for the udev, if you wanted to
244 store files with these types in a diffent paths, you need to execute
245 the semanage command to sepecify alternate labeling and then use
246 restorecon to put the labels on disk.
247
248 semanage fcontext -a -t udev_var_run_t '/srv/myudev_content(/.*)?'
249 restorecon -R -v /srv/myudev_content
250
251 Note: SELinux often uses regular expressions to specify labels that
252 match multiple files.
253
254 The following file types are defined for udev:
255
256
257
258 udev_etc_t
259
260 - Set files with the udev_etc_t type, if you want to store udev files
261 in the /etc directories.
262
263
264
265 udev_exec_t
266
267 - Set files with the udev_exec_t type, if you want to transition an
268 executable to the udev_t domain.
269
270
271 Paths:
272 /sbin/udev, /sbin/udevd, /sbin/udevadm, /sbin/udevsend, /sbin/ude‐
273 vstart, /sbin/start_udev, /usr/bin/udevinfo, /lib/udev/udev-acl,
274 /sbin/wait_for_sysfs
275
276
277 udev_helper_exec_t
278
279 - Set files with the udev_helper_exec_t type, if you want to transition
280 an executable to the udev_helper_t domain.
281
282
283 Paths:
284 /etc/dev.d/.+, /etc/udev/scripts/.+, /etc/hotplug.d/default/udev.*
285
286
287 udev_tbl_t
288
289 - Set files with the udev_tbl_t type, if you want to treat the files as
290 udev tbl data.
291
292
293 Paths:
294 /dev/.udev(/.*)?, /dev/.udevdb, /dev/udev.tbl
295
296
297 udev_var_run_t
298
299 - Set files with the udev_var_run_t type, if you want to store the udev
300 files under the /run or /var/run directory.
301
302
303 Paths:
304 /etc/udev/rules.d(/.*)?, /var/run/libgpod(/.*)?, /var/run/Pack‐
305 ageKit/udev(/.*)?
306
307
308 Note: File context can be temporarily modified with the chcon command.
309 If you want to permanently change the file context you need to use the
310 semanage fcontext command. This will modify the SELinux labeling data‐
311 base. You will need to use restorecon to apply the labels.
312
313
315 semanage fcontext can also be used to manipulate default file context
316 mappings.
317
318 semanage permissive can also be used to manipulate whether or not a
319 process type is permissive.
320
321 semanage module can also be used to enable/disable/install/remove pol‐
322 icy modules.
323
324 semanage boolean can also be used to manipulate the booleans
325
326
327 system-config-selinux is a GUI tool available to customize SELinux pol‐
328 icy settings.
329
330
332 This manual page was auto-generated using sepolicy manpage .
333
334
336 selinux(8), udev(8), semanage(8), restorecon(8), chcon(1) , setse‐
337 bool(8)
338
339
340
341udev 15-06-03 udev_selinux(8)