Commit Graph

474 Commits

Author SHA1 Message Date
6541731269 add send, recv, and x32 so we can install i386 pkgs on amd64
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 308eff99e8468be4e92951de0ac69b27042a833b
Component: engine
2016-01-18 19:24:01 -08:00
fb652937c3 read seccomp profile locally then pass to daemon
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 062d0b3921316bc348c7930ce6599e1f8f297090
Component: engine
2016-01-12 13:12:29 -08:00
622bd04e41 Merge pull request #19217 from justincormack/arm_syscalls
Add arm specific syscalls to default seccomp profile
Upstream-commit: a96a0b37818e26bea173aa718df92f50b21093c3
Component: engine
2016-01-11 15:26:09 -08:00
8e7c65a2dd Merge pull request #19069 from jfrazelle/apparmor-regex-proc
fix proc regex
Upstream-commit: 9c9a1d1b4bc2122548a38b233a2f26ab5304de4c
Component: engine
2016-01-11 13:50:25 -08:00
ddd50b3705 Merge pull request #18512 from euank/18510-fixOomKilled
Set OOMKilled state on any OOM event
Upstream-commit: 967acd56c175b7c0f3ad4236c664730338a94bb8
Component: engine
2016-01-11 00:09:26 +01:00
1567cd421d Add arm specific syscalls to default seccomp profile
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 37d35f3c280dc27a00f2baa16431d807b24f8b92
Component: engine
2016-01-10 19:55:24 +00:00
fd32c5b230 Add i386 specific modify_ldt syscall to default seccomp filter
This syscall is used by Go on i386 binaries, although not by libc.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 13a9d4e8993997b2bf9be7e96a8d7978a73d0b9b
Component: engine
2016-01-10 12:00:11 +00:00
6a1af5c70c Merge pull request #19144 from LK4D4/fix_parent_systemd
Choose default-cgroup parent by cgroup driver
Upstream-commit: 938d28e772ec32ed3b09bfb8907852e497990076
Component: engine
2016-01-07 10:24:51 -08:00
d9a92e1dc3 Choose default-cgroup parent by cgroup driver
It's "/docker" for cgroupfs and "system.slice" for systemd.

Fix #19140

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: c1cd45d547ef26cf988dc72d456430361dafcf08
Component: engine
2016-01-07 08:56:26 -08:00
4ec2693c9e Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 907407d0b2e5863f0e1b40b93a356bbf03c7b9fb
Component: engine
2016-01-06 19:48:59 -05:00
f720f8755b Merge pull request #19110 from brahmaroutu/update_openc
update runc to the latest code base to fix gccgo builds
Upstream-commit: 4ee3048fa8382f9e9af2418029b8e53885bb906a
Component: engine
2016-01-06 15:09:11 -08:00
4d9fdc3032 fix proc regex
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 2b4f64e59018c21aacbf311d5c774dd5521b5352
Component: engine
2016-01-06 10:08:35 -08:00
4da63ae80d update runc to the latest code base to fix gccgo build
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 998263170750ee5504bc4fe23f9a3d1f797e2a41
Component: engine
2016-01-06 00:02:56 +00:00
f1e6f39a8c Allow the waitpid syscall
This version is sometimes used eg by glibc on x86

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 822c4f79ab5c84d48bbdd5534cdfd98990cdcee7
Component: engine
2016-01-05 09:29:16 -08:00
92f421f9e7 Support compatible architectures with default seccomp rules
In the default seccomp rule, allow use of 32 bit syscalls on
64 bit architectures, so you can run x86 Linux images on x86_64
without disabling seccomp or using a custom rule.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: ca3ae72e43a0e6ad2f4f548586110c2e296ae1e9
Component: engine
2016-01-05 09:28:42 -08:00
cd434f010f Allow sigreturn syscall
This is used on some 32 bit architectures, eg x86

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: d8e06d54cf3f6478ba85f60cca4a9b03bbc68f10
Component: engine
2016-01-04 16:11:59 -08:00
31f24aba30 Add _llseek syscall
This is the newer verion of lseek on many 32 bit platforms

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 923609179b18fb5fc9d4ad7820646af7e09786a2
Component: engine
2016-01-04 11:55:28 -08:00
2c12c040cd Do not allow obsolete syscalls
sysfs and ustat syscalls are marked obsolete.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: d6a9c5abed7370d9ef20b488e315b9730f22ed44
Component: engine
2016-01-04 11:55:28 -08:00
c09b757a5f Do not allow name_to_handle_at, as we have already blocked open_by_handle_at
Being able to obtain a file handle is no use as we cannot perform
any operation in it, and it may leak kernel state.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: c1b57fc1c9e230b95c2c76d1eaca0e3622fc72d5
Component: engine
2016-01-04 11:55:27 -08:00
93a585808e add 32bit syscalls to whitelist
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: a1747b3cc861c00803a67e5a61dce73db6ac8eee
Component: engine
2016-01-04 11:55:26 -08:00
f435c7102a change seccomp blacklist to whitelist
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 17735c3c98056006b40834d7426d8d90afae5a2c
Component: engine
2016-01-04 11:55:21 -08:00
da10444c78 Fix declarations of of execdriver/native.NewDriver to have the same signature.
This change is done so that driver_unsupported.go and driver_unsupported_nocgo.go
declare the same signature for NewDriver as driver.go.

Fixes #19032

Signed-off-by: Lukas Waslowski <cr7pt0gr4ph7@gmail.com>
Upstream-commit: 9a03967f0abae4cc1dca00f339c58c31579c45b5
Component: engine
2016-01-02 19:55:37 +01:00
80207e0951 Merge pull request #18974 from jfrazelle/remove-seccomp-from-seccomp-profile
remove seccomp from seccomp profile
Upstream-commit: abc695d9d540610546e860ed5a9e432685b924b3
Component: engine
2015-12-29 13:15:14 -08:00
1149d92821 Merge pull request #18969 from justincormack/vm86
Block vm86 syscalls in default seccomp profile
Upstream-commit: a81e438544500a121298c82f340db490efda8a86
Component: engine
2015-12-29 11:57:35 -08:00
44a3b715ef Merge pull request #18972 from justincormack/bpf
Block bpf syscall from default seccomp profile
Upstream-commit: 2307f47fdd2b3079cb623a69b0fa0a0ef502c624
Component: engine
2015-12-29 11:57:07 -08:00
ed8f5303d0 Merge pull request #18971 from justincormack/ptrace
Block additional ptrace related syscalls in default seccomp profile
Upstream-commit: e01cab1cc5c7f92747a479b5480ca78f7fc37101
Component: engine
2015-12-29 11:56:51 -08:00
ba9125a4e7 remove seccomp from seccomp profile
This can be allowed because it should only restrict more per the seccomp docs, and multiple apps use it today.

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: b610fc226afdf663b0ad46ad982c27fdee61f671
Component: engine
2015-12-29 11:21:33 -08:00
9e1ed3e829 Merge pull request #18947 from jfrazelle/fix-seccomp-unsupported
fix default profile where unsupported
Upstream-commit: 94e076086820aa34e6fc4fadb18714cd8b9263df
Component: engine
2015-12-29 10:21:07 -08:00
0adeca917f Merge pull request #18953 from justincormack/robust_list
Allow use of robust list syscalls in default seccomp policy
Upstream-commit: afdc4747dc16d4302ffd4f5dcb0fc537108862b7
Component: engine
2015-12-29 10:19:41 -08:00
f88929edd0 Merge pull request #18956 from justincormack/umount
Block original umount syscall in default seccomp filter
Upstream-commit: a32b06b067f847ee2cefe104430499c425c8fc2c
Component: engine
2015-12-29 10:19:04 -08:00
c726c9026e Block additional ptrace related syscalls in default seccomp profile
Block kcmp, procees_vm_readv, process_vm_writev.
All these require CAP_PTRACE, and are only used for ptrace related
actions, so are not useful as we block ptrace.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: a0a8ca0ae0bc9dc7faa0b8bacf4ca376c7257348
Component: engine
2015-12-29 18:17:28 +00:00
42db75c945 Merge pull request #18959 from justincormack/finit_module
Deny finit_module in default seccomp profile
Upstream-commit: ad8bce2ce4e27f7484fc65a3e6b9bf111793a263
Component: engine
2015-12-29 10:12:50 -08:00
00259400b7 Merge pull request #18961 from justincormack/clock_adjtime
Block clock_adjtime in default seccomp config
Upstream-commit: 8ac3d083a856729bc78adad3924e85d73d07173f
Component: engine
2015-12-29 10:08:45 -08:00
cb797e315a Block bpf syscall from default seccomp profile
The bpf syscall can load code into the kernel which may
persist beyond container lifecycle. Requires CAP_SYS_ADMIN
already.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 33568405f34f363de49b1146119cc53bcb9e5f16
Component: engine
2015-12-29 17:28:30 +00:00
e76b5dd895 Block vm86 syscalls in default seccomp profile
These provide an in kernel virtual machine for x86 real mode on x86
used by one very early DOS emulator. Not required for any normal use.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 6c3ea7a511ca641cdf4fa4da1d775d5b6f4bef3e
Component: engine
2015-12-29 15:47:23 +00:00
d33f2d3ddd Block stime in default seccomp profile
The stime syscall is a legacy syscall on some architectures
to set the clock, should be blocked as time is not namespaced.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 6300a08be905969b16197f6a82a3d0d99a3f99cd
Component: engine
2015-12-29 15:28:05 +00:00
55ebb7bfa4 Block clock_adjtime in default seccomp config
clock_adjtime is the new posix style version of adjtime allowing
a specific clock to be specified. Time is not namespaced, so do
not allow.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 0e5c43cddad304301ca8a82f652e15f75ee68cfe
Component: engine
2015-12-29 12:48:16 +00:00
40aa142ae9 Deny finit_module in default seccomp profile
This is a new version of init_module that takes a file descriptor
rather than a file name.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 0d5306a0b69c912a981f3a4bd41b80beb1207851
Component: engine
2015-12-29 12:31:33 +00:00
e02645b0cd Block original umount syscall in default seccomp filter
The original umount syscall without flags argument needs to
be blocked too.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 9be0d93cf74d1bb31c401f1154abc773af31cbd6
Component: engine
2015-12-29 11:57:16 +00:00
b5183e0bab Allow use of robust list syscalls
The set_robust_list syscall sets the list of futexes which are
cleaned up on thread exit, and are needed to avoid mutexes
being held forever on thread exit.

See for example in Musl libc mutex handling:
http://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_mutex_trylock.c#n22

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 7b133e7235593f8d46832045da339395e71e8148
Component: engine
2015-12-29 10:22:05 +00:00
bc484831ec fix code comment
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: b4c14a0bb846343c6d6d5dde6d9259c2c62a0b1e
Component: engine
2015-12-28 22:36:54 -08:00
8002590c16 fix default profile where unsupported
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 94b45310f400310af908a71f63ffcdaa504266de
Component: engine
2015-12-28 20:42:15 -08:00
3f03a2c89c add docs and unconfined to run a container without the default seccomp profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 15674c5fb74df00d7560fb35619a5372ea2ee74e
Component: engine
2015-12-28 10:26:51 -08:00
b5ffb5a2c4 set default seccomp profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 947293a28084cb5ee2e10e4d128c6e2b9d9da89d
Component: engine
2015-12-28 10:18:47 -08:00
c4af30652d Implemet docker update command
It's used for updating properties of one or more containers, we only
support resource configs for now. It can be extended in the future.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8799c4fc0feadede6ae60e77bd7d9dfd7cc72a79
Component: engine
2015-12-28 19:19:26 +08:00
1cfbdcfe91 Remove package pkg/ulimit, use go-units instead.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 83237aab2b9430a88790467867505cc9a5147f3e
Component: engine
2015-12-23 13:27:58 -05:00
027f002cb3 Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone.
- Move windows partition isolation detection to the client, so the
  driver doesn't use external types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 7ac4232e70fe7cf7318333cd0890db7f95663079
Component: engine
2015-12-22 13:34:30 -05:00
b006691148 Replace usage of pkg/nat with go-connections/nat.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 056e7449039af522fa0a1567ef67916eaa0de93e
Component: engine
2015-12-22 13:31:46 -05:00
a04e1f9592 Add support for blkio read/write iops device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 843084b08b521a70baf9284ec4e23e941ab38367
Component: engine
2015-12-21 09:14:49 +08:00
5eac08b5e9 Merge pull request #18395 from LK4D4/default_cgroup_is_not_daemon
Use /docker as cgroup parent instead of docker
Upstream-commit: ff69b23dc09e544fb8ae9dccbd1f7992d2005b70
Component: engine
2015-12-17 13:59:00 -08:00