Commit Graph

33775 Commits

Author SHA1 Message Date
241a2913ec Delete stale containerd object on start failure
containerd has two objects with regard to containers.
There is a "container" object which is metadata and a "task" which is
manging the actual runtime state.

When docker starts a container, it creartes both the container metadata
and the task at the same time. So when a container exits, docker deletes
both of these objects as well.

This ensures that if, on start, when we go to create the container metadata object
in containerd, if there is an error due to a name conflict that we go
ahead and clean that up and try again.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 5ba30cd1dc6000ee53b34f628cbff91d7f6d7231)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1d0353548a21b0b60595ad44859a7072f90ea6c6
Component: engine
2019-02-15 01:01:52 +01:00
a6fcb60427 Merge pull request #147 from thaJeztah/18.09_bump_golang_1.10.8
[18.09] Bump Golang 1.10.8 (CVE-2019-6486)
Upstream-commit: 02b07d4ede1af6b9186d7e2f7b712dfe6fbea994
Component: engine
2019-02-13 08:20:56 -08:00
58654c0a23 pkg/archive: fix TestTarUntarWithXattr failure on recent kernel
Recent kernel has strict check for security.capability value.
Fix #38289

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 9ddd6e47a90ac056d242969ff72bf75a43cc0004)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d158b9e74fffe377b6acc7794246c89f9fb26d2f
Component: engine
2019-02-12 00:13:23 +01:00
a6dbf1f21f [18.09] Bump Golang 1.10.8 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.10.8+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 325f6ee47a8edaf093ea9f829c26962310c83759
Component: engine
2019-02-09 11:05:52 +01:00
e4931e664f Apply git bundles for CVE-2019-5736
A git bundle allows us keep the same SHA, giving us the ability to
validate our patch against a known entity and allowing us to push
directly from our private forks to public forks without having to
re-apply any patches.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 03dfb0ba53cc5f64b746a25aa5ed8a48763ea223
Component: engine
2019-02-06 00:25:54 +00:00
006734c577 If url includes scheme, urlPath will drop hostname, which would not match the auth check
Signed-off-by: Jameson Hyde <jameson.hyde@docker.com>
(cherry picked from commit 754fb8d9d03895ae3ab60d2ad778152b0d835206)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: a79fabbfe84117696a19671f4aa88b82d0f64fc1
Component: engine
2019-01-09 17:31:53 +00:00
0b021f6648 Authz plugin security fixes for 0-length content and path validation Signed-off-by: Jameson Hyde <jameson.hyde@docker.com>
fix comments

(cherry picked from commit 9659c3a52bac57e615b5fb49b0652baca448643e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: fc274cd2ff4cf3b48c91697fb327dd1fb95588fb
Component: engine
2019-01-09 17:31:53 +00:00
2a881442fb Bump containerd to v1.2.2
- Fix a bug that a container can't be stopped or inspected when its corresponding image is deleted
- Fix a bug that the cri plugin handles containerd events outside of k8s.io namespace

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 27cc170d2891f25ab066620e8fe94d62f81b9aa3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f80c6d7ae15443f15c014ddbd17e30cfac47b906
Component: engine
2019-01-08 02:45:06 +01:00
8c0e7ea89c Revert "[18.09 backport] API: fix status code on conflicting service names"
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 24f71e39980e8a4c6eabcea16e0a9efce1660bbe
Component: engine
2018-12-28 09:40:26 -08:00
dba1b4aeda libcontainerd: prevent exec delete locking
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 332f134890246cfc73703b2911c9fdc20e063096)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 6646d0878247b1e0875da33da606283f5d16ea07
Component: engine
2018-12-17 12:07:32 +00:00
b00fb7cf05 Revert "Propagate context to exec delete"
This reverts commit b6430ba41388f0300ceea95c10738cbe1a9a7b10.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: a9ae6c7547466f754da01a53c6be455c555e6102
Component: engine
2018-12-17 12:06:35 +00:00
9f8d1a9995 Merge pull request #139 from andrewhsu/ctxt
[18.09] Propagate context to exec delete
Upstream-commit: cc7773c787f400e7b11472878c3a1e55823e9c46
Component: engine
2018-12-16 11:14:58 +00:00
4f1cf45af7 Merge pull request #138 from andrewhsu/cont
[18.09] Update containerd to aa5e000c963756778ab3ebd1a12c6
Upstream-commit: b2185081d90d6e192880a33dd0cc581a6bf81539
Component: engine
2018-12-16 11:14:33 +00:00
95c87c410e Merge pull request #137 from thaJeztah/18.09_bump_golang_1.10.6
[18.09] Bump Golang 1.10.6 (CVE-2018-16875)
Upstream-commit: a6d4103450982521dbda0229d2f534e5717bfe63
Component: engine
2018-12-14 23:23:09 +00:00
f72ff31415 Propagate context to exec delete
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit 96e0ba1afb228b48aa6e08a90cfc665083d24ccc)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: b6430ba41388f0300ceea95c10738cbe1a9a7b10
Component: engine
2018-12-14 22:54:46 +00:00
e775f2a03d Update containerd to aa5e000c963756778ab3ebd1a12c6
This includes a patch on top of containerd 1.2.1 to handle fifo
timeouts.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit e5d9d721626958a37dccfa0b234d9fc96d8c2bfb)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: d161dfe1a36929a03ee3dfa916d296abfd4ccef1
Component: engine
2018-12-14 22:47:44 +00:00
3e105499c9 Bump Golang 1.10.6 (CVE-2018-16875)
go1.10.6 (released 2018/12/14)

- crypto/x509: CPU denial of service in chain validation golang/go#29233
- cmd/go: directory traversal in "go get" via curly braces in import paths golang/go#29231
- cmd/go: remote command execution during "go get -u" golang/go#29230

See the Go 1.10.6 milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.10.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8afe9f422dc0183ce48e1db09189ccbde634080a
Component: engine
2018-12-14 00:44:49 +01:00
35ae1fc05c Merge pull request #130 from thaJeztah/18.09_backport_fix_api_return_code
[18.09 backport] API: fix status code on conflicting service names
Upstream-commit: 42b58273f68c8240e25f1642e6add6435b894e87
Component: engine
2018-12-13 10:54:52 +00:00
fbe190c787 Merge pull request #132 from thaJeztah/18.09_backport_idprefix
[18.09 backport] fixes display text in Multiple IDs found with provided prefix
Upstream-commit: a8572d3e8e1e3f738d6e9bc3bf0f137d64bab616
Component: engine
2018-12-13 10:53:54 +00:00
ed161fafa9 Merge pull request #136 from thaJeztah/18.09_backport_fix_panic
[18.09 engine] registry: use len(via)!=0 instead of via!=nil
Upstream-commit: 01c732d40a3f67bed801f8fd4b62f3dbc035b788
Component: engine
2018-12-13 10:43:38 +00:00
79cbff3cd3 registry: use len(via)!=0 instead of via!=nil
This avoids the corner case where `via` is not nil, but has a length of 0,
so the updated code does not panic in that situation.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
(cherry picked from commit a5c185b99404ea3fbab47ff9d7ba143392566bc1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3482a3b14a6414977bd9860c513abf06dedd6bf7
Component: engine
2018-12-12 18:12:01 +01:00
36f2444328 Swagger: fix definition of IPAM driver options
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a5dd68186cc54ab43b0b73cd7ee3bdf923f70d3b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 55a4be8cf5787f88c1ce6bc3e2ec73402c964e5d
Component: engine
2018-12-12 01:59:01 +01:00
50be23f5a1 fixes display text in Multiple IDs found with provided prefix
Signed-off-by: Lifubang <lifubang@acmcoder.com>
(cherry picked from commit 00eb3480dc4ceb6034f8f7463ff41d2e87fb5dcc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1043f40fb561ffbf23fbdde9989abcebd8e48279
Component: engine
2018-12-11 15:15:20 +01:00
b412443ed2 Merge pull request #131 from tonistiigi/1809-update-buildkit
[18.09 backport] vendor: update buildkit to d9f75920
Upstream-commit: d21754a3fb453451c521ddc51df6cf109102d74c
Component: engine
2018-12-10 16:29:04 +00:00
aafd3c7cec Merge pull request #129 from thaJeztah/18.09_backport_bump_containerd_vendoring
[18.09 backport] update containerd vendoring to v1.2.1
Upstream-commit: b54b6d145ccfd5a47b774cd4205b48b3ff090afa
Component: engine
2018-12-10 13:54:05 +00:00
e27956be04 vendor: update buildkit to d9f75920
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 32f48058158cce7a6a1f8f0d1526d8224b369cbc)
Upstream-commit: 43dedf397503532f8bc1313af82a9356ed8c3550
Component: engine
2018-12-10 13:03:13 +00:00
6155a653aa Add test for status code on conflicting service names
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b0de11cf3018b482dfcf8c873261dc11c8fce0b0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a69626afb12eb9ec3e374aa563b561c0ba28f27f
Component: engine
2018-12-10 12:21:26 +01:00
c99df606e6 Update swarmkit to return correct error-codes on conflicting names
This updates the swarmkit vendoring to the latest version in the bump_v18.09
branch

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ad7105260f3c2ff32a375ff78dce9a96e01d87cb
Component: engine
2018-12-10 12:18:32 +01:00
c9df8f4688 use empty string as cgroup path to grab first find
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 78045a5419718ba8884ed5afc0b41a3a80afc3b4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b66c7ad62ebff12112318db0d1ed48b14f817efa
Component: engine
2018-12-07 18:58:03 +01:00
42b5bd7c0f vndr libnetwork to adjust for updated runc
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 75c4b741550a3c5cb061269cc92a5d563d153626)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5cd4797c89383159219716de92775138c2dd17c5
Component: engine
2018-12-07 18:57:54 +01:00
9f0f7c271c update containerd to v1.2.1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 615eecf8ac2a49385e346631e97850830360b8cf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7dfd23acf1d604cde70d46e36bfe2e51df2dcf46
Component: engine
2018-12-07 18:45:14 +01:00
c19e3d0b29 Merge pull request #128 from thaJeztah/18.09_backport_containerd_v1.2.1-GA
[18.09 backport] update just installer of containerd to 1.2.1
Upstream-commit: 6c633fbe18e0a69db3db1aed28b3fa23bc795dfe
Component: engine
2018-12-07 06:18:48 -08:00
37a56d2599 update just installer of containerd to 1.2.1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 1014b2bb66050a11bba833349346b35e6472688b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c64d7c858b5fd16d0d14d692a3765cf8d5a5d7e
Component: engine
2018-12-07 11:20:22 +01:00
679c1150b8 Merge pull request #126 from thaJeztah/18.09_backport_mask_asound
[18.09 backport] Masked /proc/asound
Upstream-commit: 82a4418f57d5aa0d58c8bba630d701a918094c3b
Component: engine
2018-12-03 14:06:43 -08:00
3948a779cf Merge pull request #123 from tonistiigi/1809-builder-net
[18.09] builder: set externalkey option for faster hook processing
Upstream-commit: e7a4385e240a1cfb1d795ed8d622c97f6c217585
Component: engine
2018-11-30 14:02:12 -08:00
67db4a25e1 Bump Go to 1.10.5
go1.10.5 (released 2018/11/02) includes fixes to the go command, linker,
runtime and the database/sql package. See the milestone on the issue
tracker for details:

List of changes; https://github.com/golang/go/issues?q=milestone%3AGo1.10.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 00ad8e7c5730f3c50ae2e548b47d1340202f72b2
Component: engine
2018-11-30 20:43:05 +01:00
b15b31936b Masked /proc/asound
@sw-pschmied originally post this in #38285

While looking through the Moby source code was found /proc/asound to be
shared with containers as read-only (as defined in
https://github.com/moby/moby/blob/master/oci/defaults.go#L128).

This can lead to two information leaks.

---

**Leak of media playback status of the host**

Steps to reproduce the issue:

 - Listen to music/Play a YouTube video/Do anything else that involves
sound output
 - Execute docker run --rm ubuntu:latest bash -c "sleep 7; cat
/proc/asound/card*/pcm*p/sub*/status | grep state | cut -d ' ' -f2 |
grep RUNNING || echo 'not running'"
 - See that the containerized process is able to check whether someone
on the host is playing music as it prints RUNNING
 - Stop the music output
 - Execute the command again (The sleep is delaying the output because
information regarding playback status isn't propagated instantly)
 - See that it outputs not running

**Describe the results you received:**

A containerized process is able to gather information on the playback
status of an audio device governed by the host. Therefore a process of a
container is able to check whether and what kind of user activity is
present on the host system. Also, this may indicate whether a container
runs on a desktop system or a server as media playback rarely happens on
server systems.

The description above is in regard to media playback - when examining
`/proc/asound/card*/pcm*c/sub*/status` (`pcm*c` instead of `pcm*p`) this
can also leak information regarding capturing sound, as in recording
audio or making calls on the host system.

Signed-off-by: Jonathan A. Schweder <jonathanschweder@gmail.com>

(cherry picked from commit 64e52ff3dbdb31adc0a9930b3ea74b04b0df8d86)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5fffdb32261145b1178f571e25fbd71572769d58
Component: engine
2018-11-30 14:57:51 +01:00
613f303049 Windows:Tie busybox to version
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 14c8b67e51a8340284dfd8919843ce9edd1e5c71)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9c93de59da8eaa0e0e0377578a33b465b9465bb2
Component: engine
2018-11-30 01:38:11 +01:00
6709623942 builder: delete sandbox in a goroutine for performance
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit bcf1967dd0893b36c56c8c9b87c84246916484a1)
Upstream-commit: 73911117b30ba74c42177b0f002bb4e98f2473f9
Component: engine
2018-11-29 09:15:15 -08:00
71605fc317 builder: set externalkey option for faster hook processing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 1ad272c7e409476fd50fc701d45329b1e05bdec9)
Upstream-commit: 8fe3b4d2ec06720fedfce2c2ef1b4fd7940961a6
Component: engine
2018-11-29 09:15:00 -08:00
7e016c5a84 Merge pull request #81 from thaJeztah/18.09_backport_processandiot
[18.09 backport] Windows:Allow process isolation
Upstream-commit: a1f6b04a8d373dbed6262f076d9aac834031d24a
Component: engine
2018-11-27 09:58:22 -08:00
06d25f9c17 Merge pull request #85 from thaJeztah/18.09_backport_deprecated_storagedrivers
[18.09 backport] deprecate legacy "overlay", and "devicemapper" storage drivers 
Upstream-commit: 7a566c0e4a98ec9960b5312e806ab546203dff15
Component: engine
2018-11-27 09:57:46 -08:00
2eb0feaf2d Merge pull request #107 from thaJeztah/18.09_backport_bump_libnetwork
[18.09 backport] update libnetwork to fix iptables compatibility on debian
Upstream-commit: 61a250fd23db8cee48403e3d9de5de100470bd03
Component: engine
2018-11-27 09:55:12 -08:00
ed2630b559 Merge pull request #110 from thaJeztah/18.09_backport_handle_invalid_json
[18.09 backport] API: properly handle invalid JSON to return a 400 status
Upstream-commit: 8f18feabeb9ef7fe670ff6f1ecbba2a6460e0267
Component: engine
2018-11-27 09:51:54 -08:00
1e216e2ec4 Merge pull request #112 from thaJeztah/18.09_backport_moby_37747
[18.09 backport] awslogs: account for UTF-8 normalization in limits
Upstream-commit: 08a77f11a63b2d25c00ca0e35012194bdcfbe917
Component: engine
2018-11-27 09:48:39 -08:00
bf3a1002a3 Merge pull request #113 from thaJeztah/18.09_backport_detach
[18.09 backport] Windows: DetachVhd attempt in cleanup
Upstream-commit: 4fd103ae26fc7784e79ed40f4e500e96477e14d2
Component: engine
2018-11-27 09:47:07 -08:00
4d5ef4f441 Merge pull request #114 from thaJeztah/18.09_backport_limit_client_readall
[18.09 backport] client: use io.LimitedReader for reading HTTP error
Upstream-commit: 52a6fc02b1caa947aac807cdca807444d96c2e27
Component: engine
2018-11-27 09:44:42 -08:00
62511b1be7 Merge pull request #116 from thaJeztah/18.09_backport_apparmor_external_templates
[18.09 backport] apparmor: allow receiving of signals from 'docker kill'
Upstream-commit: 12b8ec42b6ac60188ac48137677ee69ce98a3822
Component: engine
2018-11-27 09:41:37 -08:00
4dfe418aab Merge pull request #118 from thaJeztah/18.09_backport_fence_default_addr_pools
[18.09 backport] Ignore default address-pools on API < 1.39
Upstream-commit: 23122e4d52258b72fde031284a1d53f941e6426c
Component: engine
2018-11-27 09:38:39 -08:00
34a9d0e6de Merge pull request #119 from thaJeztah/18.09_backport_fix_default_addr_pools_swagger
[18.09 backport] Add missing default address pool fields to swagger
Upstream-commit: 04a6b49a896470420dd460b6ce027cac41791c04
Component: engine
2018-11-27 09:36:52 -08:00