1kmod_selinux(8)               SELinux Policy kmod              kmod_selinux(8)
2
3
4

NAME

6       kmod_selinux - Security Enhanced Linux Policy for the kmod processes
7

DESCRIPTION

9       Security-Enhanced  Linux secures the kmod processes via flexible manda‐
10       tory access control.
11
12       The kmod processes execute with the kmod_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 kmod_t
19
20
21

ENTRYPOINTS

23       The kmod_t SELinux type can be entered via the kmod_exec_t file type.
24
25       The default entrypoint paths for the kmod_t domain are the following:
26
27       /sbin/rmmod.*,   /sbin/depmod.*,   /sbin/insmod.*,    /sbin/modprobe.*,
28       /usr/sbin/rmmod.*,        /usr/sbin/depmod.*,       /usr/sbin/insmod.*,
29       /usr/sbin/modprobe.*, /bin/kmod,  /usr/bin/kmod,  /sbin/modules-update,
30       /sbin/update-modules,  /usr/sbin/modules-update,  /usr/sbin/update-mod‐
31       ules, /sbin/generate-modprobe.conf, /usr/sbin/generate-modprobe.conf
32

PROCESS TYPES

34       SELinux defines process types (domains) for each process running on the
35       system
36
37       You can see the context of a process using the -Z option to ps
38
39       Policy  governs  the  access confined processes have to files.  SELinux
40       kmod policy is very flexible allowing users to setup  their  kmod  pro‐
41       cesses in as secure a method as possible.
42
43       The following process types are defined for kmod:
44
45       kmod_t
46
47       Note:  semanage  permissive  -a  kmod_t can be used to make the process
48       type kmod_t permissive. SELinux does  not  deny  access  to  permissive
49       process  types, but the AVC (SELinux denials) messages are still gener‐
50       ated.
51
52

BOOLEANS

54       SELinux policy is customizable based on least  access  required.   kmod
55       policy is extremely flexible and has several booleans that allow you to
56       manipulate the policy and run kmod with the tightest access possible.
57
58
59
60       If you want to control the ability to mmap a low area  of  the  address
61       space,  as  configured  by /proc/sys/vm/mmap_min_addr, you must turn on
62       the mmap_low_allowed boolean. Disabled by default.
63
64       setsebool -P mmap_low_allowed 1
65
66
67
68       If you want to allow system to run with  NIS,  you  must  turn  on  the
69       nis_enabled boolean. Disabled by default.
70
71       setsebool -P nis_enabled 1
72
73
74
75       If  you want to disable kernel module loading, you must turn on the se‐
76       cure_mode_insmod boolean. Disabled by default.
77
78       setsebool -P secure_mode_insmod 1
79
80
81
82       If you want to allow unconfined executables to make their  heap  memory
83       executable.   Doing  this  is  a  really bad idea. Probably indicates a
84       badly coded executable, but could indicate an attack.  This  executable
85       should  be  reported  in bugzilla, you must turn on the selinuxuser_ex‐
86       echeap boolean. Disabled by default.
87
88       setsebool -P selinuxuser_execheap 1
89
90
91
92       If you want to allow unconfined executables to make  their  stack  exe‐
93       cutable.   This  should  never, ever be necessary. Probably indicates a
94       badly coded executable, but could indicate an attack.  This  executable
95       should  be reported in bugzilla, you must turn on the selinuxuser_exec‐
96       stack boolean. Enabled by default.
97
98       setsebool -P selinuxuser_execstack 1
99
100
101

MANAGED FILES

103       The SELinux process type kmod_t can manage files labeled with the  fol‐
104       lowing  file  types.   The paths listed are the default paths for these
105       file types.  Note the processes UID still need to have DAC permissions.
106
107       file_type
108
109            all files on the system
110
111

FILE CONTEXTS

113       SELinux requires files to have an extended attribute to define the file
114       type.
115
116       You can see the context of a file using the -Z option to ls
117
118       Policy  governs  the  access  confined  processes  have to these files.
119       SELinux kmod policy is very flexible allowing users to setup their kmod
120       processes in as secure a method as possible.
121
122       STANDARD FILE CONTEXT
123
124       SELinux  defines  the file context types for the kmod, if you wanted to
125       store files with these types in a different paths, you need to  execute
126       the  semanage  command  to  specify alternate labeling and then use re‐
127       storecon to put the labels on disk.
128
129       semanage fcontext -a -t kmod_exec_t '/srv/kmod/content(/.*)?'
130       restorecon -R -v /srv/mykmod_content
131
132       Note: SELinux often uses regular expressions  to  specify  labels  that
133       match multiple files.
134
135       The following file types are defined for kmod:
136
137
138
139       kmod_exec_t
140
141       - Set files with the kmod_exec_t type, if you want to transition an ex‐
142       ecutable to the kmod_t domain.
143
144
145       Paths:
146            /sbin/rmmod.*, /sbin/depmod.*,  /sbin/insmod.*,  /sbin/modprobe.*,
147            /usr/sbin/rmmod.*,     /usr/sbin/depmod.*,     /usr/sbin/insmod.*,
148            /usr/sbin/modprobe.*, /bin/kmod, /usr/bin/kmod,  /sbin/modules-up‐
149            date,        /sbin/update-modules,       /usr/sbin/modules-update,
150            /usr/sbin/update-modules,            /sbin/generate-modprobe.conf,
151            /usr/sbin/generate-modprobe.conf
152
153
154       kmod_tmp_t
155
156       -  Set files with the kmod_tmp_t type, if you want to store kmod tempo‐
157       rary files in the /tmp directories.
158
159
160
161       kmod_tmpfs_t
162
163       - Set files with the kmod_tmpfs_t type, if you want to store kmod files
164       on a tmpfs file system.
165
166
167
168       kmod_var_run_t
169
170       - Set files with the kmod_var_run_t type, if you want to store the kmod
171       files under the /run or /var/run directory.
172
173
174       Paths:
175            /var/run/tmpfiles.d/kmod.conf,         /var/run/tmpfiles.d/static-
176            nodes.conf
177
178
179       Note:  File context can be temporarily modified with the chcon command.
180       If you want to permanently change the file context you need to use  the
181       semanage fcontext command.  This will modify the SELinux labeling data‐
182       base.  You will need to use restorecon to apply the labels.
183
184

COMMANDS

186       semanage fcontext can also be used to manipulate default  file  context
187       mappings.
188
189       semanage  permissive  can  also  be used to manipulate whether or not a
190       process type is permissive.
191
192       semanage module can also be used to enable/disable/install/remove  pol‐
193       icy modules.
194
195       semanage boolean can also be used to manipulate the booleans
196
197
198       system-config-selinux is a GUI tool available to customize SELinux pol‐
199       icy settings.
200
201

AUTHOR

203       This manual page was auto-generated using sepolicy manpage .
204
205

SEE ALSO

207       selinux(8), kmod(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
208       setsebool(8)
209
210
211
212kmod                               23-10-20                    kmod_selinux(8)
Impressum