{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/66614619","id":66614619,"diff_hunk":"@@ -1017,12 +1017,8 @@ func (dm *DockerManager) getSecurityOpt(pod *api.Pod, ctrName string) ([]string,\n \t\treturn nil, fmt.Errorf(\"unknown seccomp profile option: %s\", profile)\n \t}\n \n-\tname := strings.TrimPrefix(profile, \"localhost/\")\n-\tcleanName := strings.TrimPrefix(path.Clean(\"/\"+name), \"/\")\n-\tif name != cleanName {\n-\t\treturn nil, fmt.Errorf(\"invalid seccomp profile name: %s\", name)\n-\t}\n-\tfname := filepath.Join(dm.seccompProfileRoot, filepath.FromSlash(cleanName))\n+\tname := strings.TrimPrefix(profile, \"localhost/\") // by pod annation validation, name is a valid subpath","path":"pkg/kubelet/dockertools/manager.go","position":null,"original_position":23,"commit_id":"054d3200ff01c352b155bbb338131193344f5c2a","original_commit_id":"054d3200ff01c352b155bbb338131193344f5c2a","user":{"login":"ncdc","id":354,"avatar_url":"https://avatars.githubusercontent.com/u/354?v=3","gravatar_id":"","url":"https://api.github.com/users/ncdc","html_url":"https://github.com/ncdc","followers_url":"https://api.github.com/users/ncdc/followers","following_url":"https://api.github.com/users/ncdc/following{/other_user}","gists_url":"https://api.github.com/users/ncdc/gists{/gist_id}","starred_url":"https://api.github.com/users/ncdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncdc/subscriptions","organizations_url":"https://api.github.com/users/ncdc/orgs","repos_url":"https://api.github.com/users/ncdc/repos","events_url":"https://api.github.com/users/ncdc/events{/privacy}","received_events_url":"https://api.github.com/users/ncdc/received_events","type":"User","site_admin":false},"body":"annotation","created_at":"2016-06-10T13:43:22Z","updated_at":"2016-06-10T13:43:22Z","html_url":"https://github.com/kubernetes/kubernetes/pull/27036#discussion_r66614619","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27036","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/66614619"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/27036#discussion_r66614619"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27036"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27036","id":73028008,"html_url":"https://github.com/kubernetes/kubernetes/pull/27036","diff_url":"https://github.com/kubernetes/kubernetes/pull/27036.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/27036.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27036","number":27036,"state":"open","locked":false,"title":"Filter seccomp profile path from malicious .. and /","user":{"login":"sttts","id":730123,"avatar_url":"https://avatars.githubusercontent.com/u/730123?v=3","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"body":"Without this patch with `localhost/<some-releative-path>` as seccomp profile one can load any file on the host, e.g. `localhost/../../../../dev/mem` which is not healthy for the kubelet.\r\n\r\n/cc @jfrazelle \r\n\r\nUnit tests depend on https://github.com/kubernetes/kubernetes/pull/26710.","created_at":"2016-06-08T11:12:44Z","updated_at":"2016-06-10T13:43:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01636ec175de239d93bce0641118ec894f724808","assignee":{"login":"ncdc","id":354,"avatar_url":"https://avatars.githubusercontent.com/u/354?v=3","gravatar_id":"","url":"https://api.github.com/users/ncdc","html_url":"https://github.com/ncdc","followers_url":"https://api.github.com/users/ncdc/followers","following_url":"https://api.github.com/users/ncdc/following{/other_user}","gists_url":"https://api.github.com/users/ncdc/gists{/gist_id}","starred_url":"https://api.github.com/users/ncdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncdc/subscriptions","organizations_url":"https://api.github.com/users/ncdc/orgs","repos_url":"https://api.github.com/users/ncdc/repos","events_url":"https://api.github.com/users/ncdc/events{/privacy}","received_events_url":"https://api.github.com/users/ncdc/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/18","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.3","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/18/labels","id":1638460,"number":18,"title":"v1.3","description":"https://github.com/kubernetes/kubernetes/wiki/Release-1.3","creator":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"open_issues":185,"closed_issues":598,"state":"open","created_at":"2016-03-11T07:40:20Z","updated_at":"2016-06-10T13:02:39Z","due_on":"2016-06-24T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27036/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27036/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27036/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/054d3200ff01c352b155bbb338131193344f5c2a","head":{"label":"sttts:sttts-secure-seccomp-path","ref":"sttts-secure-seccomp-path","sha":"054d3200ff01c352b155bbb338131193344f5c2a","user":{"login":"sttts","id":730123,"avatar_url":"https://avatars.githubusercontent.com/u/730123?v=3","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"repo":{"id":36099048,"name":"kubernetes","full_name":"sttts/kubernetes","owner":{"login":"sttts","id":730123,"avatar_url":"https://avatars.githubusercontent.com/u/730123?v=3","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sttts/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/sttts/kubernetes","forks_url":"https://api.github.com/repos/sttts/kubernetes/forks","keys_url":"https://api.github.com/repos/sttts/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sttts/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sttts/kubernetes/teams","hooks_url":"https://api.github.com/repos/sttts/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/sttts/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/sttts/kubernetes/events","assignees_url":"https://api.github.com/repos/sttts/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/sttts/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/sttts/kubernetes/tags","blobs_url":"https://api.github.com/repos/sttts/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sttts/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sttts/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/sttts/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sttts/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/sttts/kubernetes/languages","stargazers_url":"https://api.github.com/repos/sttts/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/sttts/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/sttts/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/sttts/kubernetes/subscription","commits_url":"https://api.github.com/repos/sttts/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/sttts/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/sttts/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/sttts/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/sttts/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/sttts/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sttts/kubernetes/merges","archive_url":"https://api.github.com/repos/sttts/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sttts/kubernetes/downloads","issues_url":"https://api.github.com/repos/sttts/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/sttts/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/sttts/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/sttts/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sttts/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/sttts/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/sttts/kubernetes/deployments","created_at":"2015-05-22T23:09:55Z","updated_at":"2015-05-22T23:10:00Z","pushed_at":"2016-06-10T12:31:19Z","git_url":"git://github.com/sttts/kubernetes.git","ssh_url":"git@github.com:sttts/kubernetes.git","clone_url":"https://github.com/sttts/kubernetes.git","svn_url":"https://github.com/sttts/kubernetes","homepage":null,"size":258898,"stargazers_count":0,"watchers_count":0,"language":"Go","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":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"5a5c490a439cf1547c294cf61f9b1a557e566444","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-06-10T11:22:35Z","pushed_at":"2016-06-10T13:25:12Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":470867,"stargazers_count":14847,"watchers_count":14847,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4549,"mirror_url":null,"open_issues_count":3722,"forks":4549,"open_issues":3722,"watchers":14847,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27036"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/27036"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/27036"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/27036/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27036/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27036/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/054d3200ff01c352b155bbb338131193344f5c2a"}}}}
{"actor":{"display_login":"ncdc"}}