| 1 |
# |
|---|
| 2 |
# Define sensitivities |
|---|
| 3 |
# |
|---|
| 4 |
# Each sensitivity has a name and zero or more aliases. |
|---|
| 5 |
# |
|---|
| 6 |
sensitivity s0; |
|---|
| 7 |
sensitivity s1; |
|---|
| 8 |
sensitivity s2; |
|---|
| 9 |
sensitivity s3; |
|---|
| 10 |
sensitivity s4; |
|---|
| 11 |
sensitivity s5; |
|---|
| 12 |
sensitivity s6; |
|---|
| 13 |
sensitivity s7; |
|---|
| 14 |
sensitivity s8; |
|---|
| 15 |
sensitivity s9; |
|---|
| 16 |
sensitivity s10; |
|---|
| 17 |
sensitivity s11; |
|---|
| 18 |
sensitivity s12; |
|---|
| 19 |
sensitivity s13; |
|---|
| 20 |
sensitivity s14; |
|---|
| 21 |
sensitivity s15; |
|---|
| 22 |
|
|---|
| 23 |
# |
|---|
| 24 |
# Define the ordering of the sensitivity levels (least to greatest) |
|---|
| 25 |
# |
|---|
| 26 |
dominance { s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 } |
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
# |
|---|
| 30 |
# Define the categories |
|---|
| 31 |
# |
|---|
| 32 |
# Each category has a name and zero or more aliases. |
|---|
| 33 |
# |
|---|
| 34 |
category c0; category c1; category c2; category c3; |
|---|
| 35 |
category c4; category c5; category c6; category c7; |
|---|
| 36 |
category c8; category c9; category c10; category c11; |
|---|
| 37 |
category c12; category c13; category c14; category c15; |
|---|
| 38 |
category c16; category c17; category c18; category c19; |
|---|
| 39 |
category c20; category c21; category c22; category c23; |
|---|
| 40 |
category c24; category c25; category c26; category c27; |
|---|
| 41 |
category c28; category c29; category c30; category c31; |
|---|
| 42 |
category c32; category c33; category c34; category c35; |
|---|
| 43 |
category c36; category c37; category c38; category c39; |
|---|
| 44 |
category c40; category c41; category c42; category c43; |
|---|
| 45 |
category c44; category c45; category c46; category c47; |
|---|
| 46 |
category c48; category c49; category c50; category c51; |
|---|
| 47 |
category c52; category c53; category c54; category c55; |
|---|
| 48 |
category c56; category c57; category c58; category c59; |
|---|
| 49 |
category c60; category c61; category c62; category c63; |
|---|
| 50 |
category c64; category c65; category c66; category c67; |
|---|
| 51 |
category c68; category c69; category c70; category c71; |
|---|
| 52 |
category c72; category c73; category c74; category c75; |
|---|
| 53 |
category c76; category c77; category c78; category c79; |
|---|
| 54 |
category c80; category c81; category c82; category c83; |
|---|
| 55 |
category c84; category c85; category c86; category c87; |
|---|
| 56 |
category c88; category c89; category c90; category c91; |
|---|
| 57 |
category c92; category c93; category c94; category c95; |
|---|
| 58 |
category c96; category c97; category c98; category c99; |
|---|
| 59 |
category c100; category c101; category c102; category c103; |
|---|
| 60 |
category c104; category c105; category c106; category c107; |
|---|
| 61 |
category c108; category c109; category c110; category c111; |
|---|
| 62 |
category c112; category c113; category c114; category c115; |
|---|
| 63 |
category c116; category c117; category c118; category c119; |
|---|
| 64 |
category c120; category c121; category c122; category c123; |
|---|
| 65 |
category c124; category c125; category c126; category c127; |
|---|
| 66 |
category c128; category c129; category c130; category c131; |
|---|
| 67 |
category c132; category c133; category c134; category c135; |
|---|
| 68 |
category c136; category c137; category c138; category c139; |
|---|
| 69 |
category c140; category c141; category c142; category c143; |
|---|
| 70 |
category c144; category c145; category c146; category c147; |
|---|
| 71 |
category c148; category c149; category c150; category c151; |
|---|
| 72 |
category c152; category c153; category c154; category c155; |
|---|
| 73 |
category c156; category c157; category c158; category c159; |
|---|
| 74 |
category c160; category c161; category c162; category c163; |
|---|
| 75 |
category c164; category c165; category c166; category c167; |
|---|
| 76 |
category c168; category c169; category c170; category c171; |
|---|
| 77 |
category c172; category c173; category c174; category c175; |
|---|
| 78 |
category c176; category c177; category c178; category c179; |
|---|
| 79 |
category c180; category c181; category c182; category c183; |
|---|
| 80 |
category c184; category c185; category c186; category c187; |
|---|
| 81 |
category c188; category c189; category c190; category c191; |
|---|
| 82 |
category c192; category c193; category c194; category c195; |
|---|
| 83 |
category c196; category c197; category c198; category c199; |
|---|
| 84 |
category c200; category c201; category c202; category c203; |
|---|
| 85 |
category c204; category c205; category c206; category c207; |
|---|
| 86 |
category c208; category c209; category c210; category c211; |
|---|
| 87 |
category c212; category c213; category c214; category c215; |
|---|
| 88 |
category c216; category c217; category c218; category c219; |
|---|
| 89 |
category c220; category c221; category c222; category c223; |
|---|
| 90 |
category c224; category c225; category c226; category c227; |
|---|
| 91 |
category c228; category c229; category c230; category c231; |
|---|
| 92 |
category c232; category c233; category c234; category c235; |
|---|
| 93 |
category c236; category c237; category c238; category c239; |
|---|
| 94 |
category c240; category c241; category c242; category c243; |
|---|
| 95 |
category c244; category c245; category c246; category c247; |
|---|
| 96 |
category c248; category c249; category c250; category c251; |
|---|
| 97 |
category c252; category c253; category c254; category c255; |
|---|
| 98 |
|
|---|
| 99 |
|
|---|
| 100 |
# |
|---|
| 101 |
# Each MLS level specifies a sensitivity and zero or more categories which may |
|---|
| 102 |
# be associated with that sensitivity. |
|---|
| 103 |
# |
|---|
| 104 |
level s0:c0.c255; |
|---|
| 105 |
level s1:c0.c255; |
|---|
| 106 |
level s2:c0.c255; |
|---|
| 107 |
level s3:c0.c255; |
|---|
| 108 |
level s4:c0.c255; |
|---|
| 109 |
level s5:c0.c255; |
|---|
| 110 |
level s6:c0.c255; |
|---|
| 111 |
level s7:c0.c255; |
|---|
| 112 |
level s8:c0.c255; |
|---|
| 113 |
level s9:c0.c255; |
|---|
| 114 |
level s10:c0.c255; |
|---|
| 115 |
level s11:c0.c255; |
|---|
| 116 |
level s12:c0.c255; |
|---|
| 117 |
level s13:c0.c255; |
|---|
| 118 |
level s14:c0.c255; |
|---|
| 119 |
level s15:c0.c255; |
|---|
| 120 |
|
|---|
| 121 |
|
|---|
| 122 |
# |
|---|
| 123 |
# Define the MLS policy |
|---|
| 124 |
# |
|---|
| 125 |
# mlsconstrain class_set perm_set expression ; |
|---|
| 126 |
# |
|---|
| 127 |
# mlsvalidatetrans class_set expression ; |
|---|
| 128 |
# |
|---|
| 129 |
# expression : ( expression ) |
|---|
| 130 |
# | not expression |
|---|
| 131 |
# | expression and expression |
|---|
| 132 |
# | expression or expression |
|---|
| 133 |
# | u1 op u2 |
|---|
| 134 |
# | r1 role_mls_op r2 |
|---|
| 135 |
# | t1 op t2 |
|---|
| 136 |
# | l1 role_mls_op l2 |
|---|
| 137 |
# | l1 role_mls_op h2 |
|---|
| 138 |
# | h1 role_mls_op l2 |
|---|
| 139 |
# | h1 role_mls_op h2 |
|---|
| 140 |
# | l1 role_mls_op h1 |
|---|
| 141 |
# | l2 role_mls_op h2 |
|---|
| 142 |
# | u1 op names |
|---|
| 143 |
# | u2 op names |
|---|
| 144 |
# | r1 op names |
|---|
| 145 |
# | r2 op names |
|---|
| 146 |
# | t1 op names |
|---|
| 147 |
# | t2 op names |
|---|
| 148 |
# | u3 op names (NOTE: this is only available for mlsvalidatetrans) |
|---|
| 149 |
# | r3 op names (NOTE: this is only available for mlsvalidatetrans) |
|---|
| 150 |
# | t3 op names (NOTE: this is only available for mlsvalidatetrans) |
|---|
| 151 |
# |
|---|
| 152 |
# op : == | != |
|---|
| 153 |
# role_mls_op : == | != | eq | dom | domby | incomp |
|---|
| 154 |
# |
|---|
| 155 |
# names : name | { name_list } |
|---|
| 156 |
# name_list : name | name_list name |
|---|
| 157 |
# |
|---|
| 158 |
|
|---|
| 159 |
# |
|---|
| 160 |
# MLS policy for the file classes |
|---|
| 161 |
# |
|---|
| 162 |
|
|---|
| 163 |
# make sure these file classes are "single level" |
|---|
| 164 |
mlsconstrain { file lnk_file fifo_file } { create relabelto } |
|---|
| 165 |
( l2 eq h2 ); |
|---|
| 166 |
|
|---|
| 167 |
# new file labels must be dominated by the relabeling subject's clearance |
|---|
| 168 |
mlsconstrain { dir file lnk_file chr_file blk_file sock_file fifo_file } relabelto |
|---|
| 169 |
( h1 dom h2 ); |
|---|
| 170 |
|
|---|
| 171 |
# the file "read" ops (note the check is dominance of the low level) |
|---|
| 172 |
mlsconstrain { dir file lnk_file chr_file blk_file sock_file fifo_file } { read getattr execute } |
|---|
| 173 |
(( l1 dom l2 ) or |
|---|
| 174 |
(( t1 == mlsfilereadtoclr ) and ( h1 dom l2 )) or |
|---|
| 175 |
( t1 == mlsfileread ) or |
|---|
| 176 |
( t2 == mlstrustedobject )); |
|---|
| 177 |
|
|---|
| 178 |
mlsconstrain dir search |
|---|
| 179 |
(( l1 dom l2 ) or |
|---|
| 180 |
(( t1 == mlsfilereadtoclr ) and ( h1 dom l2 )) or |
|---|
| 181 |
( t1 == mlsfileread ) or |
|---|
| 182 |
( t2 == mlstrustedobject )); |
|---|
| 183 |
|
|---|
| 184 |
# the "single level" file "write" ops |
|---|
| 185 |
mlsconstrain { file lnk_file fifo_file } { write create setattr relabelfrom append unlink link rename mounton } |
|---|
| 186 |
(( l1 eq l2 ) or |
|---|
| 187 |
(( t1 == mlsfilewritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 188 |
( t1 == mlsfilewrite ) or |
|---|
| 189 |
( t2 == mlstrustedobject )); |
|---|
| 190 |
|
|---|
| 191 |
# the "ranged" file "write" ops |
|---|
| 192 |
mlsconstrain { dir chr_file blk_file sock_file } { write create setattr relabelfrom append unlink link rename mounton } |
|---|
| 193 |
((( l1 dom l2 ) and ( l1 domby h2 )) or |
|---|
| 194 |
(( t1 == mlsfilewritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 195 |
( t1 == mlsfilewrite ) or |
|---|
| 196 |
( t2 == mlstrustedobject )); |
|---|
| 197 |
|
|---|
| 198 |
mlsconstrain dir { add_name remove_name reparent rmdir } |
|---|
| 199 |
((( l1 dom l2 ) and ( l1 domby h2 )) or |
|---|
| 200 |
(( t1 == mlsfilewritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 201 |
( t1 == mlsfilewrite ) or |
|---|
| 202 |
( t2 == mlstrustedobject )); |
|---|
| 203 |
|
|---|
| 204 |
# these access vectors have no MLS restrictions |
|---|
| 205 |
# { dir file lnk_file chr_file blk_file sock_file fifo_file } { ioctl lock swapon quotaon } |
|---|
| 206 |
# |
|---|
| 207 |
# { file chr_file } { execute_no_trans entrypoint execmod } |
|---|
| 208 |
|
|---|
| 209 |
# the file upgrade/downgrade rule |
|---|
| 210 |
mlsvalidatetrans { dir file lnk_file chr_file blk_file sock_file fifo_file } |
|---|
| 211 |
((( l1 eq l2 ) or |
|---|
| 212 |
(( t3 == mlsfileupgrade ) and ( l1 domby l2 )) or |
|---|
| 213 |
(( t3 == mlsfiledowngrade ) and ( l1 dom l2 )) or |
|---|
| 214 |
(( t3 == mlsfiledowngrade ) and ( l1 incomp l2 ))) and |
|---|
| 215 |
(( h1 eq h2 ) or |
|---|
| 216 |
(( t3 == mlsfileupgrade ) and ( h1 domby h2 )) or |
|---|
| 217 |
(( t3 == mlsfiledowngrade ) and ( h1 dom h2 )) or |
|---|
| 218 |
(( t3 == mlsfiledowngrade ) and ( h1 incomp h2 )))); |
|---|
| 219 |
|
|---|
| 220 |
# create can also require the upgrade/downgrade checks if the creating process |
|---|
| 221 |
# has used setfscreate (note that both the high and low level of the object |
|---|
| 222 |
# default to the process' sensitivity level) |
|---|
| 223 |
mlsconstrain { dir file lnk_file chr_file blk_file sock_file fifo_file } create |
|---|
| 224 |
((( l1 eq l2 ) or |
|---|
| 225 |
(( t1 == mlsfileupgrade ) and ( l1 domby l2 )) or |
|---|
| 226 |
(( t1 == mlsfiledowngrade ) and ( l1 dom l2 )) or |
|---|
| 227 |
(( t1 == mlsfiledowngrade ) and ( l1 incomp l2 ))) and |
|---|
| 228 |
(( l1 eq h2 ) or |
|---|
| 229 |
(( t1 == mlsfileupgrade ) and ( l1 domby h2 )) or |
|---|
| 230 |
(( t1 == mlsfiledowngrade ) and ( l1 dom h2 )) or |
|---|
| 231 |
(( t1 == mlsfiledowngrade ) and ( l1 incomp h2 )))); |
|---|
| 232 |
|
|---|
| 233 |
|
|---|
| 234 |
|
|---|
| 235 |
|
|---|
| 236 |
# |
|---|
| 237 |
# MLS policy for the filesystem class |
|---|
| 238 |
# |
|---|
| 239 |
|
|---|
| 240 |
# new filesystem labels must be dominated by the relabeling subject's clearance |
|---|
| 241 |
mlsconstrain filesystem relabelto |
|---|
| 242 |
( h1 dom h2 ); |
|---|
| 243 |
|
|---|
| 244 |
# the filesystem "read" ops (implicit single level) |
|---|
| 245 |
mlsconstrain filesystem { getattr quotaget } |
|---|
| 246 |
(( l1 dom l2 ) or |
|---|
| 247 |
(( t1 == mlsfilereadtoclr ) and ( h1 dom l2 )) or |
|---|
| 248 |
( t1 == mlsfileread )); |
|---|
| 249 |
|
|---|
| 250 |
# all the filesystem "write" ops (implicit single level) |
|---|
| 251 |
mlsconstrain filesystem { mount remount unmount relabelfrom quotamod } |
|---|
| 252 |
(( l1 eq l2 ) or |
|---|
| 253 |
(( t1 == mlsfilewritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 254 |
( t1 == mlsfilewrite )); |
|---|
| 255 |
|
|---|
| 256 |
# these access vectors have no MLS restrictions |
|---|
| 257 |
# filesystem { transition associate } |
|---|
| 258 |
|
|---|
| 259 |
|
|---|
| 260 |
|
|---|
| 261 |
|
|---|
| 262 |
# |
|---|
| 263 |
# MLS policy for the socket classes |
|---|
| 264 |
# |
|---|
| 265 |
|
|---|
| 266 |
# new socket labels must be dominated by the relabeling subject's clearance |
|---|
| 267 |
mlsconstrain { socket tcp_socket udp_socket rawip_socket netlink_socket packet_socket key_socket unix_stream_socket unix_dgram_socket netlink_route_socket netlink_firewall_socket netlink_tcpdiag_socket netlink_nflog_socket netlink_xfrm_socket netlink_selinux_socket netlink_audit_socket netlink_ip6fw_socket netlink_dnrt_socket } relabelto |
|---|
| 268 |
( h1 dom h2 ); |
|---|
| 269 |
|
|---|
| 270 |
# the socket "read" ops (note the check is dominance of the low level) |
|---|
| 271 |
mlsconstrain { socket tcp_socket udp_socket rawip_socket netlink_socket packet_socket key_socket unix_stream_socket unix_dgram_socket netlink_route_socket netlink_firewall_socket netlink_tcpdiag_socket netlink_nflog_socket netlink_xfrm_socket netlink_selinux_socket netlink_audit_socket netlink_ip6fw_socket netlink_dnrt_socket } { read getattr listen accept getopt recvfrom recv_msg } |
|---|
| 272 |
(( l1 dom l2 ) or |
|---|
| 273 |
(( t1 == mlsnetreadtoclr ) and ( h1 dom l2 )) or |
|---|
| 274 |
( t1 == mlsnetread )); |
|---|
| 275 |
|
|---|
| 276 |
mlsconstrain { netlink_route_socket netlink_firewall_socket netlink_tcpdiag_socket netlink_xfrm_socket netlink_audit_socket netlink_ip6fw_socket } nlmsg_read |
|---|
| 277 |
(( l1 dom l2 ) or |
|---|
| 278 |
(( t1 == mlsnetreadtoclr ) and ( h1 dom l2 )) or |
|---|
| 279 |
( t1 == mlsnetread )); |
|---|
| 280 |
|
|---|
| 281 |
# the socket "write" ops |
|---|
| 282 |
mlsconstrain { socket tcp_socket udp_socket rawip_socket netlink_socket packet_socket key_socket unix_stream_socket unix_dgram_socket netlink_route_socket netlink_firewall_socket netlink_tcpdiag_socket netlink_nflog_socket netlink_xfrm_socket netlink_selinux_socket netlink_audit_socket netlink_ip6fw_socket netlink_dnrt_socket } { write setattr relabelfrom connect setopt shutdown } |
|---|
| 283 |
((( l1 dom l2 ) and ( l1 domby h2 )) or |
|---|
| 284 |
(( t1 == mlsnetwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 285 |
( t1 == mlsnetwrite )); |
|---|
| 286 |
|
|---|
| 287 |
# these access vectors have no MLS restrictions |
|---|
| 288 |
# { socket tcp_socket udp_socket rawip_socket netlink_socket packet_socket key_socket unix_stream_socket unix_dgram_socket netlink_route_socket netlink_firewall_socket netlink_tcpdiag_socket netlink_nflog_socket netlink_xfrm_socket netlink_selinux_socket netlink_audit_socket netlink_ip6fw_socket netlink_dnrt_socket } { ioctl create lock append bind sendto send_msg name_bind } |
|---|
| 289 |
# |
|---|
| 290 |
# { tcp_socket udp_socket rawip_socket } node_bind |
|---|
| 291 |
# |
|---|
| 292 |
# { tcp_socket unix_stream_socket } { connectto newconn acceptfrom } |
|---|
| 293 |
# |
|---|
| 294 |
# { netlink_route_socket netlink_firewall_socket netlink_tcpdiag_socket netlink_xfrm_socket netlink_audit_socket netlink_ip6fw_socket } nlmsg_write |
|---|
| 295 |
# |
|---|
| 296 |
|
|---|
| 297 |
|
|---|
| 298 |
|
|---|
| 299 |
|
|---|
| 300 |
# |
|---|
| 301 |
# MLS policy for the ipc classes |
|---|
| 302 |
# |
|---|
| 303 |
|
|---|
| 304 |
# the ipc "read" ops (implicit single level) |
|---|
| 305 |
mlsconstrain { ipc sem msgq shm } { getattr read unix_read } |
|---|
| 306 |
(( l1 dom l2 ) or |
|---|
| 307 |
(( t1 == mlsipcreadtoclr ) and ( h1 dom l2 )) or |
|---|
| 308 |
( t1 == mlsipcread )); |
|---|
| 309 |
|
|---|
| 310 |
mlsconstrain msg receive |
|---|
| 311 |
(( l1 dom l2 ) or |
|---|
| 312 |
(( t1 == mlsipcreadtoclr ) and ( h1 dom l2 )) or |
|---|
| 313 |
( t1 == mlsipcread )); |
|---|
| 314 |
|
|---|
| 315 |
# the ipc "write" ops (implicit single level) |
|---|
| 316 |
mlsconstrain { ipc sem msgq shm } { create destroy setattr write unix_write } |
|---|
| 317 |
(( l1 eq l2 ) or |
|---|
| 318 |
(( t1 == mlsipcwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 319 |
( t1 == mlsipcwrite )); |
|---|
| 320 |
|
|---|
| 321 |
mlsconstrain msgq enqueue |
|---|
| 322 |
(( l1 eq l2 ) or |
|---|
| 323 |
(( t1 == mlsipcwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 324 |
( t1 == mlsipcwrite )); |
|---|
| 325 |
|
|---|
| 326 |
mlsconstrain shm lock |
|---|
| 327 |
(( l1 eq l2 ) or |
|---|
| 328 |
(( t1 == mlsipcwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 329 |
( t1 == mlsipcwrite )); |
|---|
| 330 |
|
|---|
| 331 |
mlsconstrain msg send |
|---|
| 332 |
(( l1 eq l2 ) or |
|---|
| 333 |
(( t1 == mlsipcwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 334 |
( t1 == mlsipcwrite )); |
|---|
| 335 |
|
|---|
| 336 |
# these access vectors have no MLS restrictions |
|---|
| 337 |
# { ipc sem msgq shm } associate |
|---|
| 338 |
|
|---|
| 339 |
|
|---|
| 340 |
|
|---|
| 341 |
|
|---|
| 342 |
# |
|---|
| 343 |
# MLS policy for the fd class |
|---|
| 344 |
# |
|---|
| 345 |
|
|---|
| 346 |
# these access vectors have no MLS restrictions |
|---|
| 347 |
# fd use |
|---|
| 348 |
|
|---|
| 349 |
|
|---|
| 350 |
|
|---|
| 351 |
|
|---|
| 352 |
# |
|---|
| 353 |
# MLS policy for the network object classes |
|---|
| 354 |
# |
|---|
| 355 |
|
|---|
| 356 |
# the netif/node "read" ops (implicit single level socket doing the read) |
|---|
| 357 |
# (note the check is dominance of the low level) |
|---|
| 358 |
mlsconstrain { node netif } { tcp_recv udp_recv rawip_recv } |
|---|
| 359 |
(( l1 dom l2 ) or ( t1 == mlsnetrecvall )); |
|---|
| 360 |
|
|---|
| 361 |
# the netif/node "write" ops (implicit single level socket doing the write) |
|---|
| 362 |
mlsconstrain { netif node } { tcp_send udp_send rawip_send } |
|---|
| 363 |
(( l1 dom l2 ) and ( l1 domby h2 )); |
|---|
| 364 |
|
|---|
| 365 |
# these access vectors have no MLS restrictions |
|---|
| 366 |
# { netif node } { enforce_dest } |
|---|
| 367 |
|
|---|
| 368 |
|
|---|
| 369 |
|
|---|
| 370 |
|
|---|
| 371 |
# |
|---|
| 372 |
# MLS policy for the process class |
|---|
| 373 |
# |
|---|
| 374 |
|
|---|
| 375 |
# new process labels must be dominated by the relabeling subject's clearance |
|---|
| 376 |
# and sensitivity level changes require privilege |
|---|
| 377 |
mlsconstrain process transition |
|---|
| 378 |
(( h1 dom h2 ) and |
|---|
| 379 |
(( l1 eq l2 ) or ( t1 == mlsprocsetsl ) or |
|---|
| 380 |
(( t1 == privrangetrans ) and ( t2 == mlsrangetrans )))); |
|---|
| 381 |
mlsconstrain process dyntransition |
|---|
| 382 |
(( h1 dom h2 ) and |
|---|
| 383 |
(( l1 eq l2 ) or ( t1 == mlsprocsetsl ))); |
|---|
| 384 |
|
|---|
| 385 |
# all the process "read" ops |
|---|
| 386 |
mlsconstrain process { getsched getsession getpgid getcap getattr ptrace share } |
|---|
| 387 |
(( l1 dom l2 ) or |
|---|
| 388 |
(( t1 == mlsprocreadtoclr ) and ( h1 dom l2 )) or |
|---|
| 389 |
( t1 == mlsprocread )); |
|---|
| 390 |
|
|---|
| 391 |
# all the process "write" ops (note the check is equality on the low level) |
|---|
| 392 |
mlsconstrain process { sigkill sigstop signal setsched setpgid setcap setexec setfscreate setcurrent ptrace share } |
|---|
| 393 |
(( l1 eq l2 ) or |
|---|
| 394 |
(( t1 == mlsprocwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 395 |
( t1 == mlsprocwrite )); |
|---|
| 396 |
|
|---|
| 397 |
# these access vectors have no MLS restrictions |
|---|
| 398 |
# process { fork sigchld signull noatsecure siginh setrlimit rlimitinh execmem } |
|---|
| 399 |
|
|---|
| 400 |
|
|---|
| 401 |
|
|---|
| 402 |
|
|---|
| 403 |
# |
|---|
| 404 |
# MLS policy for the security class |
|---|
| 405 |
# |
|---|
| 406 |
|
|---|
| 407 |
# these access vectors have no MLS restrictions |
|---|
| 408 |
# security * |
|---|
| 409 |
|
|---|
| 410 |
|
|---|
| 411 |
|
|---|
| 412 |
|
|---|
| 413 |
# |
|---|
| 414 |
# MLS policy for the system class |
|---|
| 415 |
# |
|---|
| 416 |
|
|---|
| 417 |
# these access vectors have no MLS restrictions |
|---|
| 418 |
# system * |
|---|
| 419 |
|
|---|
| 420 |
|
|---|
| 421 |
|
|---|
| 422 |
|
|---|
| 423 |
# |
|---|
| 424 |
# MLS policy for the capability class |
|---|
| 425 |
# |
|---|
| 426 |
|
|---|
| 427 |
# these access vectors have no MLS restrictions |
|---|
| 428 |
# capability * |
|---|
| 429 |
|
|---|
| 430 |
|
|---|
| 431 |
|
|---|
| 432 |
|
|---|
| 433 |
# |
|---|
| 434 |
# MLS policy for the passwd class |
|---|
| 435 |
# |
|---|
| 436 |
|
|---|
| 437 |
# these access vectors have no MLS restrictions |
|---|
| 438 |
# passwd * |
|---|
| 439 |
|
|---|
| 440 |
|
|---|
| 441 |
|
|---|
| 442 |
|
|---|
| 443 |
# |
|---|
| 444 |
# MLS policy for the drawable class |
|---|
| 445 |
# |
|---|
| 446 |
|
|---|
| 447 |
# the drawable "read" ops (implicit single level) |
|---|
| 448 |
mlsconstrain drawable { getattr copy } |
|---|
| 449 |
(( l1 dom l2 ) or |
|---|
| 450 |
(( t1 == mlsxwinreadtoclr ) and ( h1 dom l2 )) or |
|---|
| 451 |
( t1 == mlsxwinread )); |
|---|
| 452 |
|
|---|
| 453 |
# the drawable "write" ops (implicit single level) |
|---|
| 454 |
mlsconstrain drawable { create destroy draw copy } |
|---|
| 455 |
(( l1 eq l2 ) or |
|---|
| 456 |
(( t1 == mlsxwinwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 457 |
( t1 == mlsxwinwrite )); |
|---|
| 458 |
|
|---|
| 459 |
|
|---|
| 460 |
|
|---|
| 461 |
|
|---|
| 462 |
# |
|---|
| 463 |
# MLS policy for the gc class |
|---|
| 464 |
# |
|---|
| 465 |
|
|---|
| 466 |
# the gc "read" ops (implicit single level) |
|---|
| 467 |
mlsconstrain gc getattr |
|---|
| 468 |
(( l1 dom l2 ) or |
|---|
| 469 |
(( t1 == mlsxwinreadtoclr ) and ( h1 dom l2 )) or |
|---|
| 470 |
( t1 == mlsxwinread )); |
|---|
| 471 |
|
|---|
| 472 |
# the gc "write" ops (implicit single level) |
|---|
| 473 |
mlsconstrain gc { create free setattr } |
|---|
| 474 |
(( l1 eq l2 ) or |
|---|
| 475 |
(( t1 == mlsxwinwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 476 |
( t1 == mlsxwinwrite )); |
|---|
| 477 |
|
|---|
| 478 |
|
|---|
| 479 |
|
|---|
| 480 |
|
|---|
| 481 |
# |
|---|
| 482 |
# MLS policy for the window class |
|---|
| 483 |
# |
|---|
| 484 |
|
|---|
| 485 |
# the window "read" ops (implicit single level) |
|---|
| 486 |
mlsconstrain window { listprop getattr enumerate mousemotion inputevent drawevent windowchangeevent windowchangerequest serverchangeevent extensionevent } |
|---|
| 487 |
(( l1 dom l2 ) or |
|---|
| 488 |
(( t1 == mlsxwinreadtoclr ) and ( h1 dom l2 )) or |
|---|
| 489 |
( t1 == mlsxwinread )); |
|---|
| 490 |
|
|---|
| 491 |
# the window "write" ops (implicit single level) |
|---|
| 492 |
mlsconstrain window { addchild create destroy chstack chproplist chprop setattr setfocus move chselection chparent ctrllife transparent clientcomevent } |
|---|
| 493 |
(( l1 eq l2 ) or |
|---|
| 494 |
(( t1 == mlsxwinwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 495 |
( t1 == mlsxwinwrite ) or |
|---|
| 496 |
( t2 == mlstrustedobject )); |
|---|
| 497 |
|
|---|
| 498 |
# these access vectors have no MLS restrictions |
|---|
| 499 |
# window { map unmap } |
|---|
| 500 |
|
|---|
| 501 |
|
|---|
| 502 |
|
|---|
| 503 |
|
|---|
| 504 |
# |
|---|
| 505 |
# MLS policy for the font class |
|---|
| 506 |
# |
|---|
| 507 |
|
|---|
| 508 |
# the font "read" ops (implicit single level) |
|---|
| 509 |
mlsconstrain font { load getattr } |
|---|
| 510 |
(( l1 dom l2 ) or |
|---|
| 511 |
(( t1 == mlsxwinreadtoclr ) and ( h1 dom l2 )) or |
|---|
| 512 |
( t1 == mlsxwinread )); |
|---|
| 513 |
|
|---|
| 514 |
# the font "write" ops (implicit single level) |
|---|
| 515 |
mlsconstrain font free |
|---|
| 516 |
(( l1 eq l2 ) or |
|---|
| 517 |
(( t1 == mlsxwinwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 518 |
( t1 == mlsxwinwrite )); |
|---|
| 519 |
|
|---|
| 520 |
# these access vectors have no MLS restrictions |
|---|
| 521 |
# font use |
|---|
| 522 |
|
|---|
| 523 |
|
|---|
| 524 |
|
|---|
| 525 |
|
|---|
| 526 |
# |
|---|
| 527 |
# MLS policy for the colormap class |
|---|
| 528 |
# |
|---|
| 529 |
|
|---|
| 530 |
# the colormap "read" ops (implicit single level) |
|---|
| 531 |
mlsconstrain colormap { list read getattr } |
|---|
| 532 |
(( l1 dom l2 ) or |
|---|
| 533 |
(( t1 == mlsxwinreadtoclr ) and ( h1 dom l2 )) or |
|---|
| 534 |
( t1 == mlsxwinreadcolormap ) or |
|---|
| 535 |
( t1 == mlsxwinread )); |
|---|
| 536 |
|
|---|
| 537 |
# the colormap "write" ops (implicit single level) |
|---|
| 538 |
mlsconstrain colormap { create free install uninstall store setattr } |
|---|
| 539 |
(( l1 eq l2 ) or |
|---|
| 540 |
(( t1 == mlsxwinwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 541 |
( t1 == mlsxwinwritecolormap ) or |
|---|
| 542 |
( t1 == mlsxwinwrite )); |
|---|
| 543 |
|
|---|
| 544 |
|
|---|
| 545 |
|
|---|
| 546 |
|
|---|
| 547 |
# |
|---|
| 548 |
# MLS policy for the property class |
|---|
| 549 |
# |
|---|
| 550 |
|
|---|
| 551 |
# the property "read" ops (implicit single level) |
|---|
| 552 |
mlsconstrain property { read } |
|---|
| 553 |
(( l1 dom l2 ) or |
|---|
| 554 |
(( t1 == mlsxwinreadtoclr ) and ( h1 dom l2 )) or |
|---|
| 555 |
( t1 == mlsxwinreadproperty ) or |
|---|
| 556 |
( t1 == mlsxwinread )); |
|---|
| 557 |
|
|---|
| 558 |
# the property "write" ops (implicit single level) |
|---|
| 559 |
mlsconstrain property { create free write } |
|---|
| 560 |
(( l1 eq l2 ) or |
|---|
| 561 |
(( t1 == mlsxwinwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 562 |
( t1 == mlsxwinwriteproperty ) or |
|---|
| 563 |
( t1 == mlsxwinwrite )); |
|---|
| 564 |
|
|---|
| 565 |
|
|---|
| 566 |
|
|---|
| 567 |
|
|---|
| 568 |
# |
|---|
| 569 |
# MLS policy for the cursor class |
|---|
| 570 |
# |
|---|
| 571 |
|
|---|
| 572 |
# the cursor "write" ops (implicit single level) |
|---|
| 573 |
mlsconstrain cursor { create createglyph free assign setattr } |
|---|
| 574 |
(( l1 eq l2 ) or |
|---|
| 575 |
(( t1 == mlsxwinwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 576 |
( t1 == mlsxwinwrite )); |
|---|
| 577 |
|
|---|
| 578 |
|
|---|
| 579 |
|
|---|
| 580 |
|
|---|
| 581 |
# |
|---|
| 582 |
# MLS policy for the xclient class |
|---|
| 583 |
# |
|---|
| 584 |
|
|---|
| 585 |
# the xclient "write" ops (implicit single level) |
|---|
| 586 |
mlsconstrain xclient kill |
|---|
| 587 |
(( l1 eq l2 ) or |
|---|
| 588 |
(( t1 == mlsxwinwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 589 |
( t1 == mlsxwinwrite )); |
|---|
| 590 |
|
|---|
| 591 |
|
|---|
| 592 |
|
|---|
| 593 |
|
|---|
| 594 |
# |
|---|
| 595 |
# MLS policy for the xinput class |
|---|
| 596 |
# |
|---|
| 597 |
|
|---|
| 598 |
# these access vectors have no MLS restrictions |
|---|
| 599 |
# xinput ~{ relabelinput setattr } |
|---|
| 600 |
|
|---|
| 601 |
# the xinput "write" ops (implicit single level) |
|---|
| 602 |
mlsconstrain xinput { setattr relabelinput } |
|---|
| 603 |
(( l1 eq l2 ) or |
|---|
| 604 |
(( t1 == mlsxwinwritetoclr ) and ( h1 dom l2 ) and ( l1 domby l2 )) or |
|---|
| 605 |
( t1 == mlsxwinwritexinput ) or |
|---|
| 606 |
( t1 == mlsxwinwrite )); |
|---|
| 607 |
|
|---|
| 608 |
|
|---|
| 609 |
|
|---|
| 610 |
|
|---|
| 611 |
# |
|---|
| 612 |
# MLS policy for the xserver class |
|---|
| 613 |
# |
|---|
| 614 |
|
|---|
| 615 |
# these access vectors have no MLS restrictions |
|---|
| 616 |
# xserver * |
|---|
| 617 |
|
|---|
| 618 |
|
|---|
| 619 |
|
|---|
| 620 |
|
|---|
| 621 |
# |
|---|
| 622 |
# MLS policy for the xextension class |
|---|
| 623 |
# |
|---|
| 624 |
|
|---|
| 625 |
# these access vectors have no MLS restrictions |
|---|
| 626 |
# xextension { query use } |
|---|
| 627 |
|
|---|
| 628 |
|
|---|
| 629 |
# |
|---|
| 630 |
# MLS policy for the pax class |
|---|
| 631 |
# |
|---|
| 632 |
|
|---|
| 633 |
# these access vectors have no MLS restrictions |
|---|
| 634 |
# pax { pageexec emutramp mprotect randmmap randexec segmexec } |
|---|
| 635 |
|
|---|
| 636 |
|
|---|
| 637 |
|
|---|
| 638 |
|
|---|
| 639 |
# |
|---|
| 640 |
# MLS policy for the dbus class |
|---|
| 641 |
# |
|---|
| 642 |
|
|---|
| 643 |
# these access vectors have no MLS restrictions |
|---|
| 644 |
# dbus { acquire_svc send_msg } |
|---|
| 645 |
|
|---|
| 646 |
|
|---|
| 647 |
|
|---|
| 648 |
|
|---|
| 649 |
# |
|---|
| 650 |
# MLS policy for the nscd class |
|---|
| 651 |
# |
|---|
| 652 |
|
|---|
| 653 |
# these access vectors have no MLS restrictions |
|---|
| 654 |
# nscd { getpwd getgrp gethost getstat admin shmempwd shmemgrp shmemhost } |
|---|
| 655 |
|
|---|
| 656 |
|
|---|
| 657 |
|
|---|
| 658 |
|
|---|
| 659 |
# |
|---|
| 660 |
# MLS policy for the association class |
|---|
| 661 |
# |
|---|
| 662 |
|
|---|
| 663 |
# these access vectors have no MLS restrictions |
|---|
| 664 |
# association { sendto recvfrom } |
|---|
| 665 |
|
|---|