{"action":"opened","number":114,"pull_request":{"url":"https://api.github.com/repos/projectatomic/bubblewrap/pulls/114","id":92582120,"html_url":"https://github.com/projectatomic/bubblewrap/pull/114","diff_url":"https://github.com/projectatomic/bubblewrap/pull/114.diff","patch_url":"https://github.com/projectatomic/bubblewrap/pull/114.patch","issue_url":"https://api.github.com/repos/projectatomic/bubblewrap/issues/114","number":114,"state":"open","locked":false,"title":"Fix ptraceability","user":{"login":"alexlarsson","id":990736,"avatar_url":"https://avatars.githubusercontent.com/u/990736?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlarsson","html_url":"https://github.com/alexlarsson","followers_url":"https://api.github.com/users/alexlarsson/followers","following_url":"https://api.github.com/users/alexlarsson/following{/other_user}","gists_url":"https://api.github.com/users/alexlarsson/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlarsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlarsson/subscriptions","organizations_url":"https://api.github.com/users/alexlarsson/orgs","repos_url":"https://api.github.com/users/alexlarsson/repos","events_url":"https://api.github.com/users/alexlarsson/events{/privacy}","received_events_url":"https://api.github.com/users/alexlarsson/received_events","type":"User","site_admin":false},"body":"This series fixes the issue that with --unshare-user, any process in the parent user namespace can ptrace the child and thus hijack the setup code and gain full access to the child namespace, doing user-namespace things that we don't otherwise allow, which is contrary to what the README says:\r\n\r\n> Bubblewrap could be viewed as setuid implementation of a *subset* of user namespaces.  Emphasis on subset - specifically relevant to the above CVE, bubblewrap does not allow control over iptables. \r\n\r\nWe do this by running the entire setup as setuid root (euid != uid), which disallows ptrace anywhere (even in user namespaces). \r\n\r\nThere are some complexities:\r\n * In order to not let the user overridere DACs we set fsuid to the user\r\n * We drop the support for set-caps and only support setuid (since we need uid 0)\r\n * Being setuid means dumpable is set to FALSE, so we have to set dumpable to TRUE at the end to allow the sandbox to use e.g. a debugger.\r\n * The euid is 0 when we create the user namespace, which is recorded as the owner of the namespace. The manpage says about user namespace capabilieites:\r\n    > A process that resides in the parent of the user namespace and whose effective user ID matches the owner of the namespace has all capabilities in the namespace\r\n   So, since the euid doesn't match we don't have any capabilities in the child namespace. This is generally\r\n   right, as we want to limit this, but it does mean that the user can't ptrace processes in the sandbox from outside the sandbox.\r\n\r\nfsuid\r\nno caps\r\ndumpable\r\nno ptrace","created_at":"2016-11-07T13:23:10Z","updated_at":"2016-11-07T13:23:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/projectatomic/bubblewrap/pulls/114/commits","review_comments_url":"https://api.github.com/repos/projectatomic/bubblewrap/pulls/114/comments","review_comment_url":"https://api.github.com/repos/projectatomic/bubblewrap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectatomic/bubblewrap/issues/114/comments","statuses_url":"https://api.github.com/repos/projectatomic/bubblewrap/statuses/4db3ec55c91049d3e3cca6414d62b00614c5b784","head":{"label":"alexlarsson:fix-ptraceability","ref":"fix-ptraceability","sha":"4db3ec55c91049d3e3cca6414d62b00614c5b784","user":{"login":"alexlarsson","id":990736,"avatar_url":"https://avatars.githubusercontent.com/u/990736?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlarsson","html_url":"https://github.com/alexlarsson","followers_url":"https://api.github.com/users/alexlarsson/followers","following_url":"https://api.github.com/users/alexlarsson/following{/other_user}","gists_url":"https://api.github.com/users/alexlarsson/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlarsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlarsson/subscriptions","organizations_url":"https://api.github.com/users/alexlarsson/orgs","repos_url":"https://api.github.com/users/alexlarsson/repos","events_url":"https://api.github.com/users/alexlarsson/events{/privacy}","received_events_url":"https://api.github.com/users/alexlarsson/received_events","type":"User","site_admin":false},"repo":{"id":54121133,"name":"bubblewrap","full_name":"alexlarsson/bubblewrap","owner":{"login":"alexlarsson","id":990736,"avatar_url":"https://avatars.githubusercontent.com/u/990736?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlarsson","html_url":"https://github.com/alexlarsson","followers_url":"https://api.github.com/users/alexlarsson/followers","following_url":"https://api.github.com/users/alexlarsson/following{/other_user}","gists_url":"https://api.github.com/users/alexlarsson/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlarsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlarsson/subscriptions","organizations_url":"https://api.github.com/users/alexlarsson/orgs","repos_url":"https://api.github.com/users/alexlarsson/repos","events_url":"https://api.github.com/users/alexlarsson/events{/privacy}","received_events_url":"https://api.github.com/users/alexlarsson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexlarsson/bubblewrap","description":null,"fork":true,"url":"https://api.github.com/repos/alexlarsson/bubblewrap","forks_url":"https://api.github.com/repos/alexlarsson/bubblewrap/forks","keys_url":"https://api.github.com/repos/alexlarsson/bubblewrap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexlarsson/bubblewrap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexlarsson/bubblewrap/teams","hooks_url":"https://api.github.com/repos/alexlarsson/bubblewrap/hooks","issue_events_url":"https://api.github.com/repos/alexlarsson/bubblewrap/issues/events{/number}","events_url":"https://api.github.com/repos/alexlarsson/bubblewrap/events","assignees_url":"https://api.github.com/repos/alexlarsson/bubblewrap/assignees{/user}","branches_url":"https://api.github.com/repos/alexlarsson/bubblewrap/branches{/branch}","tags_url":"https://api.github.com/repos/alexlarsson/bubblewrap/tags","blobs_url":"https://api.github.com/repos/alexlarsson/bubblewrap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexlarsson/bubblewrap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexlarsson/bubblewrap/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexlarsson/bubblewrap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexlarsson/bubblewrap/statuses/{sha}","languages_url":"https://api.github.com/repos/alexlarsson/bubblewrap/languages","stargazers_url":"https://api.github.com/repos/alexlarsson/bubblewrap/stargazers","contributors_url":"https://api.github.com/repos/alexlarsson/bubblewrap/contributors","subscribers_url":"https://api.github.com/repos/alexlarsson/bubblewrap/subscribers","subscription_url":"https://api.github.com/repos/alexlarsson/bubblewrap/subscription","commits_url":"https://api.github.com/repos/alexlarsson/bubblewrap/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexlarsson/bubblewrap/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexlarsson/bubblewrap/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexlarsson/bubblewrap/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexlarsson/bubblewrap/contents/{+path}","compare_url":"https://api.github.com/repos/alexlarsson/bubblewrap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexlarsson/bubblewrap/merges","archive_url":"https://api.github.com/repos/alexlarsson/bubblewrap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexlarsson/bubblewrap/downloads","issues_url":"https://api.github.com/repos/alexlarsson/bubblewrap/issues{/number}","pulls_url":"https://api.github.com/repos/alexlarsson/bubblewrap/pulls{/number}","milestones_url":"https://api.github.com/repos/alexlarsson/bubblewrap/milestones{/number}","notifications_url":"https://api.github.com/repos/alexlarsson/bubblewrap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexlarsson/bubblewrap/labels{/name}","releases_url":"https://api.github.com/repos/alexlarsson/bubblewrap/releases{/id}","deployments_url":"https://api.github.com/repos/alexlarsson/bubblewrap/deployments","created_at":"2016-03-17T13:44:52Z","updated_at":"2016-03-19T12:16:14Z","pushed_at":"2016-11-07T13:05:30Z","git_url":"git://github.com/alexlarsson/bubblewrap.git","ssh_url":"git@github.com:alexlarsson/bubblewrap.git","clone_url":"https://github.com/alexlarsson/bubblewrap.git","svn_url":"https://github.com/alexlarsson/bubblewrap","homepage":null,"size":306,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"projectatomic:master","ref":"master","sha":"c8a8a7cd254f1a41424fda40b341c239aeb9c87e","user":{"login":"projectatomic","id":6852258,"avatar_url":"https://avatars.githubusercontent.com/u/6852258?v=3","gravatar_id":"","url":"https://api.github.com/users/projectatomic","html_url":"https://github.com/projectatomic","followers_url":"https://api.github.com/users/projectatomic/followers","following_url":"https://api.github.com/users/projectatomic/following{/other_user}","gists_url":"https://api.github.com/users/projectatomic/gists{/gist_id}","starred_url":"https://api.github.com/users/projectatomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectatomic/subscriptions","organizations_url":"https://api.github.com/users/projectatomic/orgs","repos_url":"https://api.github.com/users/projectatomic/repos","events_url":"https://api.github.com/users/projectatomic/events{/privacy}","received_events_url":"https://api.github.com/users/projectatomic/received_events","type":"Organization","site_admin":false},"repo":{"id":51868010,"name":"bubblewrap","full_name":"projectatomic/bubblewrap","owner":{"login":"projectatomic","id":6852258,"avatar_url":"https://avatars.githubusercontent.com/u/6852258?v=3","gravatar_id":"","url":"https://api.github.com/users/projectatomic","html_url":"https://github.com/projectatomic","followers_url":"https://api.github.com/users/projectatomic/followers","following_url":"https://api.github.com/users/projectatomic/following{/other_user}","gists_url":"https://api.github.com/users/projectatomic/gists{/gist_id}","starred_url":"https://api.github.com/users/projectatomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectatomic/subscriptions","organizations_url":"https://api.github.com/users/projectatomic/orgs","repos_url":"https://api.github.com/users/projectatomic/repos","events_url":"https://api.github.com/users/projectatomic/events{/privacy}","received_events_url":"https://api.github.com/users/projectatomic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectatomic/bubblewrap","description":"Unprivileged sandboxing tool","fork":false,"url":"https://api.github.com/repos/projectatomic/bubblewrap","forks_url":"https://api.github.com/repos/projectatomic/bubblewrap/forks","keys_url":"https://api.github.com/repos/projectatomic/bubblewrap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectatomic/bubblewrap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectatomic/bubblewrap/teams","hooks_url":"https://api.github.com/repos/projectatomic/bubblewrap/hooks","issue_events_url":"https://api.github.com/repos/projectatomic/bubblewrap/issues/events{/number}","events_url":"https://api.github.com/repos/projectatomic/bubblewrap/events","assignees_url":"https://api.github.com/repos/projectatomic/bubblewrap/assignees{/user}","branches_url":"https://api.github.com/repos/projectatomic/bubblewrap/branches{/branch}","tags_url":"https://api.github.com/repos/projectatomic/bubblewrap/tags","blobs_url":"https://api.github.com/repos/projectatomic/bubblewrap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectatomic/bubblewrap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectatomic/bubblewrap/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectatomic/bubblewrap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectatomic/bubblewrap/statuses/{sha}","languages_url":"https://api.github.com/repos/projectatomic/bubblewrap/languages","stargazers_url":"https://api.github.com/repos/projectatomic/bubblewrap/stargazers","contributors_url":"https://api.github.com/repos/projectatomic/bubblewrap/contributors","subscribers_url":"https://api.github.com/repos/projectatomic/bubblewrap/subscribers","subscription_url":"https://api.github.com/repos/projectatomic/bubblewrap/subscription","commits_url":"https://api.github.com/repos/projectatomic/bubblewrap/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectatomic/bubblewrap/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectatomic/bubblewrap/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectatomic/bubblewrap/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectatomic/bubblewrap/contents/{+path}","compare_url":"https://api.github.com/repos/projectatomic/bubblewrap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectatomic/bubblewrap/merges","archive_url":"https://api.github.com/repos/projectatomic/bubblewrap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectatomic/bubblewrap/downloads","issues_url":"https://api.github.com/repos/projectatomic/bubblewrap/issues{/number}","pulls_url":"https://api.github.com/repos/projectatomic/bubblewrap/pulls{/number}","milestones_url":"https://api.github.com/repos/projectatomic/bubblewrap/milestones{/number}","notifications_url":"https://api.github.com/repos/projectatomic/bubblewrap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectatomic/bubblewrap/labels{/name}","releases_url":"https://api.github.com/repos/projectatomic/bubblewrap/releases{/id}","deployments_url":"https://api.github.com/repos/projectatomic/bubblewrap/deployments","created_at":"2016-02-16T20:36:10Z","updated_at":"2016-11-05T14:10:59Z","pushed_at":"2016-11-07T13:23:10Z","git_url":"git://github.com/projectatomic/bubblewrap.git","ssh_url":"git@github.com:projectatomic/bubblewrap.git","clone_url":"https://github.com/projectatomic/bubblewrap.git","svn_url":"https://github.com/projectatomic/bubblewrap","homepage":"","size":352,"stargazers_count":292,"watchers_count":292,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":23,"forks":35,"open_issues":23,"watchers":292,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectatomic/bubblewrap/pulls/114"},"html":{"href":"https://github.com/projectatomic/bubblewrap/pull/114"},"issue":{"href":"https://api.github.com/repos/projectatomic/bubblewrap/issues/114"},"comments":{"href":"https://api.github.com/repos/projectatomic/bubblewrap/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/projectatomic/bubblewrap/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/projectatomic/bubblewrap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectatomic/bubblewrap/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/projectatomic/bubblewrap/statuses/4db3ec55c91049d3e3cca6414d62b00614c5b784"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":123,"deletions":116,"changed_files":4}}
{"actor":{"display_login":"alexlarsson"}}