Commit Graph

19 Commits

Author SHA1 Message Date
299638e996 Merge pull request #21176 from cyphar/fix-apparmor-profile-execpath
profiles: apparmor: remove unused fields
Upstream-commit: 1f40cc15c7776d40e743cc62bf9b1c1dd23ce86e
Component: engine
2016-03-23 10:02:34 -07:00
2820ef0516 profiles: apparmor: actually calculate version
In order to check that we can have the `ptrace` rule, we need to
actually calculate the version of apparmor_parser.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: d274456f3eb9f2a3dc518985ec22d236d3bc3f6c
Component: engine
2016-03-20 19:03:19 +11:00
94f0b7548f profiles: apparmor: remove unused fields
ExecPath isn't used by anything, and the signal apparmor rule isn't used
because it refers to a peer that we don't ship.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 64fb664908f7d3368d1bbfd1efb56cd45e5ed7a3
Component: engine
2016-03-20 19:01:49 +11:00
179304ecf4 Reuse profiles/seccomp package
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 99b16b3523461551b03362305c36811372344af2
Component: engine
2016-03-19 14:15:39 -07:00
d8866a7bcc Add new syscalls in libseccomp 2.3.0 to seccomp default profile
This adds the following new syscalls that are supported in libseccomp 2.3.0,
including calls added up to kernel 4.5-rc4:
mlock2 - same as mlock but with a flag
copy_file_range - copy file contents, like splice but with reflink support.

The following are not added, and mentioned in docs:
userfaultfd - userspace page fault handling, mainly designed for process migration

The following are not added, only apply to less common architectures:
switch_endian
membarrier
breakpoint
set_tls
I plan to review the other architectures, some of which can now have seccomp
enabled in the build as they are now supported.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 96896f2d0bc16269778dd4f60a4920b49953ffed
Component: engine
2016-03-16 21:17:32 +00:00
8df9af807b Allow restart_syscall in default seccomp profile
Fixes #20818

This syscall was blocked as there was some concern that it could be
used to bypass filtering of other syscall arguments. However none of the
potential syscalls where this could be an issue (poll, nanosleep,
clock_nanosleep, futex) are blocked in the default profile anyway.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 5abd881883883a132f96f8adb1b07b5545af452b
Component: engine
2016-03-11 16:44:11 +00:00
536ff97acf Merge pull request #20958 from calavera/basic_function_templates
Provide basic string manipulation functions for template executions.
Upstream-commit: 943ae26bc01913fefe415defc575ea10e24f6a2b
Component: engine
2016-03-10 08:08:32 -08:00
16d6520e91 fix some typos.
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 34b82a69b94ef9c7913e2809ae918e6f4331201e
Component: engine
2016-03-10 10:09:27 +08:00
a66058a138 Provide basic string manupilation functions for template executions.
This change centralizes the template manipulation in a single package
and adds basic string functions to their execution.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 8514880997bd1bc944769dcc41e52307bb01f7ff
Component: engine
2016-03-09 19:37:12 -05:00
288ebd11a3 Add ipc syscall to default seccomp profile
On 32 bit x86 this is a multiplexing syscall for the system V
ipc syscalls such as shmget, and so needs to be allowed for
shared memory access for 32 bit binaries.

Fixes #20733

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 31410a6d79fc4ea6fa496636015bf9f53c1c8b14
Component: engine
2016-03-05 22:12:23 +00:00
3edfa94729 Add some uses of personality syscall to default seccomp filter
We generally want to filter the personality(2) syscall, as it
allows disabling ASLR, and turning on some poorly supported
emulations that have been the target of CVEs. However the use
cases for reading the current value, setting the default
PER_LINUX personality, and setting PER_LINUX32 for 32 bit
emulation are fine.

See issue #20634

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 39b799ac53e2ba397edc3063432d01478416dbc8
Component: engine
2016-02-26 18:43:08 +01:00
4b3e3eb7e6 add seccomp default profile fix tests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 11435b674b8ed580f8cf401c7cee7d24f59d7a43
Component: engine
2016-02-19 13:32:54 -08:00
bea41e64ba generate seccomp profile convert type
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: ad600239bca1ac89d9684a98d6f7f260959e81d2
Component: engine
2016-02-19 13:32:54 -08:00
d9e3cdab8a apparmor: use correct version for ptrace denial suppression
Ubuntu ships apparmor_parser 2.9 erroniously as "2.8.95". Fix the
incorrect version check for >=2.8, when in fact 2.8 deosn't support the
required feature.

Signed-off-by: Aleksa Sarai <asarai@suse.com>
Upstream-commit: 284d9d451e93baff311b501018cae2097f76b134
Component: engine
2016-02-15 20:36:29 +11:00
08e0c58b53 apparmor: fix version checks to work properly
Using {{if major}}{{if minor}} doesn't work as expected when the major
version changes. In addition, this didn't support patch levels (which is
necessary in some cases when distributions ship apparmor weirdly).

Signed-off-by: Aleksa Sarai <asarai@suse.com>
Upstream-commit: 4bf7a84c969b9309b0534a61af55b8bb824acc0a
Component: engine
2016-02-15 20:36:07 +11:00
cb9f693ca8 add validation for generating default secccomp profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 9bc771af9d09026111916191394eb2896608eb59
Component: engine
2016-02-08 13:04:52 -08:00
a45e7dc118 add default seccomp profile as json
profile is created by go generate

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: d57816de0293e18ecfa68ac6e8c288a888912e33
Component: engine
2016-02-08 08:19:21 -08:00
7187db20a2 move default seccomp profile into package
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: bed0bb7d017bb4a8400ac2c031dc74cd74240bfb
Component: engine
2016-01-21 16:55:29 -08:00
190d8fab36 move default apparmor policy into package
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 35e50119fc2a2a6d9bcdc95c000df8b66d6cb9d3
Component: engine
2016-01-21 16:55:27 -08:00