You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Note**: seccomp profiles require seccomp 2.2.1 and are only
21
+
> **Note**: `seccomp` profiles require seccomp 2.2.1 and are only
22
22
> available starting with Debian 9 "Stretch", Ubuntu 16.04 "Xenial",
23
-
> Fedora 22, CentOS 7 and Oracle Linux 7. To use this feature on Ubuntu 14.04, Debian Wheezy, or
24
-
> Debian Jessie, you must download the [latest static Docker Linux binary](../installation/binaries.md).
23
+
> Fedora 22, CentOS 7 and Oracle Linux 7. To use this feature on Ubuntu 14.04,
24
+
> Debian Wheezy, or Debian Jessie, you must download the
25
+
> [latest static Docker Linux binary](../installation/binaries.md).
25
26
> This feature is currently *not* available on other distributions.
26
27
27
28
## Passing a profile for a container
28
29
29
-
The default seccomp profile provides a sane default for running containers with
30
-
seccomp and disables around 44 system calls out of 300+. It is moderately protective while providing wide application
31
-
compatibility. The default Docker profile (found [here](https://github.com/docker/docker/blob/master/profiles/seccomp/default.json)) has a JSON layout in the following form:
32
-
33
-
```json
34
-
{
35
-
"defaultAction": "SCMP_ACT_ERRNO",
36
-
"archMap": [
37
-
{
38
-
"architecture": "SCMP_ARCH_X86_64",
39
-
"subArchitectures": [
40
-
"SCMP_ARCH_X86",
41
-
"SCMP_ARCH_X32"
42
-
]
43
-
},
44
-
...
45
-
],
46
-
"syscalls": [
47
-
{
48
-
"names": [
49
-
"accept",
50
-
"accept4",
51
-
"access",
52
-
"alarm",
53
-
"alarm",
54
-
"bind",
55
-
"brk",
56
-
...
57
-
"waitid",
58
-
"waitpid",
59
-
"write",
60
-
"writev"
61
-
],
62
-
"action": "SCMP_ACT_ALLOW",
63
-
"args": [],
64
-
"comment": "",
65
-
"includes": {},
66
-
"excludes": {}
67
-
},
68
-
{
69
-
"names": [
70
-
"clone"
71
-
],
72
-
"action": "SCMP_ACT_ALLOW",
73
-
"args": [
74
-
{
75
-
"index": 1,
76
-
"value": 2080505856,
77
-
"valueTwo": 0,
78
-
"op": "SCMP_CMP_MASKED_EQ"
79
-
}
80
-
],
81
-
"comment": "s390 parameter ordering for clone is different",
82
-
"includes": {
83
-
"arches": [
84
-
"s390",
85
-
"s390x"
86
-
]
87
-
},
88
-
"excludes": {
89
-
"caps": [
90
-
"CAP_SYS_ADMIN"
91
-
]
92
-
}
93
-
},
94
-
...
95
-
}
96
-
```
30
+
The default `seccomp` profile provides a sane default for running containers with
31
+
seccomp and disables around 44 system calls out of 300+. It is moderately
32
+
protective while providing wide application compatibility. The default Docker
### Significant syscalls blocked by the default profile
@@ -150,7 +104,8 @@ the reason each syscall is blocked rather than white-listed.
150
104
|`request_key`| Prevent containers from using the kernel keyring, which is not namespaced. |
151
105
|`set_mempolicy`| Syscall that modifies kernel memory and NUMA settings. Already gated by `CAP_SYS_NICE`. |
152
106
|`setns`| Deny associating a thread with a namespace. Also gated by `CAP_SYS_ADMIN`. |
153
-
| `settimeofday` | Time/date is not namespaced. Also gated by `CAP_SYS_TIME`. |
107
+
| `settimeofday` | Time/date is not namespaced. Also gated by `CAP_SYS_TIME`.
108
+
|`socket`, `socketcall`| Used to send or receive packets and for other socket operations. All `socket` and `socketcall` calls are blocked except communication domains `AF_UNIX`, `AF_INET`, `AF_INET6`, `AF_NETLINK`, and `AF_PACKET`. |
154
109
|`stime`| Time/date is not namespaced. Also gated by `CAP_SYS_TIME`. |
155
110
|`swapon`| Deny start/stop swapping to file/device. Also gated by `CAP_SYS_ADMIN`. |
156
111
|`swapoff`| Deny start/stop swapping to file/device. Also gated by `CAP_SYS_ADMIN`. |
0 commit comments