Commit 234dc93
committed
rpm: Ship SELinux policy denying AF_ALG sockets
Ship a CIL policy module that denies AF_ALG socket creation for all
container domains (container_t, spc_t). Like AppArmor, SELinux hooks
into the kernel's security_socket_create() LSM callback, which fires
regardless of whether the socket was created via socket(2) or the
legacy socketcall(2) multiplexer. This blocks AF_ALG selectively
without disrupting other socketcall usage by 32-bit binaries.
This complements the seccomp profile change in moby, which blocks
socket(AF_ALG) but cannot filter socketcall arguments.
On SELinux-only systems (Fedora, RHEL, CentOS) where AppArmor is not
available, this CIL module provides equivalent protection.
Load the module from %post when SELinux is enabled, warning but keeping
installation non-fatal if semodule cannot load it. Remove the module on
uninstall.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>1 parent 7af33f2 commit 234dc93
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| |||
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| 120 | + | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
124 | 136 | | |
125 | 137 | | |
126 | 138 | | |
127 | 139 | | |
128 | 140 | | |
129 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
130 | 147 | | |
131 | 148 | | |
0 commit comments