{"action":"opened","number":1302,"pull_request":{"url":"https://api.github.com/repos/freebsd/pkg/pulls/1302","id":41738664,"html_url":"https://github.com/freebsd/pkg/pull/1302","diff_url":"https://github.com/freebsd/pkg/pull/1302.diff","patch_url":"https://github.com/freebsd/pkg/pull/1302.patch","issue_url":"https://api.github.com/repos/freebsd/pkg/issues/1302","number":1302,"state":"open","locked":false,"title":"HBSD: fix format specifier in libpkg's pkg_vets(...)","user":{"login":"opntr","id":2576589,"avatar_url":"https://avatars.githubusercontent.com/u/2576589?v=3","gravatar_id":"","url":"https://api.github.com/users/opntr","html_url":"https://github.com/opntr","followers_url":"https://api.github.com/users/opntr/followers","following_url":"https://api.github.com/users/opntr/following{/other_user}","gists_url":"https://api.github.com/users/opntr/gists{/gist_id}","starred_url":"https://api.github.com/users/opntr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opntr/subscriptions","organizations_url":"https://api.github.com/users/opntr/orgs","repos_url":"https://api.github.com/users/opntr/repos","events_url":"https://api.github.com/users/opntr/events{/privacy}","received_events_url":"https://api.github.com/users/opntr/received_events","type":"User","site_admin":false},"body":"The attr variables type is int, but the format string in pkg_emit_error\r\nis %s. In some case with enabled ASLR this cause a core dump.\r\n\r\n 441     {\r\n 442             int attr;\r\n 443\r\n 444             while ((attr = va_arg(ap, int)) > 0) {\r\n 445                     if (attr >= PKG_NUM_FIELDS || attr <= 0) {\r\n 446                             pkg_emit_error(\"Bad argument on pkg_set %s\", attr);\r\n 447                             return (EPKG_FATAL);\r\n 448                     }\r\n 449\r\n 450                     switch (attr) {\r\n\r\n(gdb) bt\r\n #0  0x00000000007f25ab in strlen ()\r\n #1  0x00000000007e8062 in __vfprintf ()\r\n #2  0x00000000007a5747 in vasprintf_l ()\r\n #3  0x0000000000451e7e in pkg_emit_error (\r\n    fmt=0x84b9f5 \"Bad argument on pkg_set %s\") at pkg_event.c:418\r\n #4  0x00000000004264c9 in pkg_vset (pkg=0x22036461600, ap=0x6529128ac3e0)\r\n    at pkg.c:446\r\n #5  0x0000000000426409 in pkg_set2 (pkg=0x22036461600) at pkg.c:567\r\n #6  0x00000000004024a2 in exec_audit (argc=1, argv=0x6529128acd00)\r\n    at audit.c:207\r\n #7  0x000000000040e22e in main (argc=2, argv=0x6529128accf8) at main.c:847\r\n\r\nSponsored-by: HardenedBSD\r\nFound-by: ASLR - stack randomization\r\nSigned-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>\r\nCC: Pedro Giffuni <pfg@freebsd.org\r\nCC: Baptiste Daroussin <bapt@freebsd.org>","created_at":"2015-08-05T23:42:19Z","updated_at":"2015-08-05T23:42:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/freebsd/pkg/pulls/1302/commits","review_comments_url":"https://api.github.com/repos/freebsd/pkg/pulls/1302/comments","review_comment_url":"https://api.github.com/repos/freebsd/pkg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freebsd/pkg/issues/1302/comments","statuses_url":"https://api.github.com/repos/freebsd/pkg/statuses/f6c84ecd8a30a77eeefd8106496e6692d6348190","head":{"label":"opntr:master","ref":"master","sha":"f6c84ecd8a30a77eeefd8106496e6692d6348190","user":{"login":"opntr","id":2576589,"avatar_url":"https://avatars.githubusercontent.com/u/2576589?v=3","gravatar_id":"","url":"https://api.github.com/users/opntr","html_url":"https://github.com/opntr","followers_url":"https://api.github.com/users/opntr/followers","following_url":"https://api.github.com/users/opntr/following{/other_user}","gists_url":"https://api.github.com/users/opntr/gists{/gist_id}","starred_url":"https://api.github.com/users/opntr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opntr/subscriptions","organizations_url":"https://api.github.com/users/opntr/orgs","repos_url":"https://api.github.com/users/opntr/repos","events_url":"https://api.github.com/users/opntr/events{/privacy}","received_events_url":"https://api.github.com/users/opntr/received_events","type":"User","site_admin":false},"repo":{"id":40273917,"name":"pkg","full_name":"opntr/pkg","owner":{"login":"opntr","id":2576589,"avatar_url":"https://avatars.githubusercontent.com/u/2576589?v=3","gravatar_id":"","url":"https://api.github.com/users/opntr","html_url":"https://github.com/opntr","followers_url":"https://api.github.com/users/opntr/followers","following_url":"https://api.github.com/users/opntr/following{/other_user}","gists_url":"https://api.github.com/users/opntr/gists{/gist_id}","starred_url":"https://api.github.com/users/opntr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opntr/subscriptions","organizations_url":"https://api.github.com/users/opntr/orgs","repos_url":"https://api.github.com/users/opntr/repos","events_url":"https://api.github.com/users/opntr/events{/privacy}","received_events_url":"https://api.github.com/users/opntr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/opntr/pkg","description":"Package management tool for FreeBSD. Help at #pkgng on Freenode or pkg@FreeBSD.org","fork":true,"url":"https://api.github.com/repos/opntr/pkg","forks_url":"https://api.github.com/repos/opntr/pkg/forks","keys_url":"https://api.github.com/repos/opntr/pkg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opntr/pkg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opntr/pkg/teams","hooks_url":"https://api.github.com/repos/opntr/pkg/hooks","issue_events_url":"https://api.github.com/repos/opntr/pkg/issues/events{/number}","events_url":"https://api.github.com/repos/opntr/pkg/events","assignees_url":"https://api.github.com/repos/opntr/pkg/assignees{/user}","branches_url":"https://api.github.com/repos/opntr/pkg/branches{/branch}","tags_url":"https://api.github.com/repos/opntr/pkg/tags","blobs_url":"https://api.github.com/repos/opntr/pkg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opntr/pkg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opntr/pkg/git/refs{/sha}","trees_url":"https://api.github.com/repos/opntr/pkg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opntr/pkg/statuses/{sha}","languages_url":"https://api.github.com/repos/opntr/pkg/languages","stargazers_url":"https://api.github.com/repos/opntr/pkg/stargazers","contributors_url":"https://api.github.com/repos/opntr/pkg/contributors","subscribers_url":"https://api.github.com/repos/opntr/pkg/subscribers","subscription_url":"https://api.github.com/repos/opntr/pkg/subscription","commits_url":"https://api.github.com/repos/opntr/pkg/commits{/sha}","git_commits_url":"https://api.github.com/repos/opntr/pkg/git/commits{/sha}","comments_url":"https://api.github.com/repos/opntr/pkg/comments{/number}","issue_comment_url":"https://api.github.com/repos/opntr/pkg/issues/comments{/number}","contents_url":"https://api.github.com/repos/opntr/pkg/contents/{+path}","compare_url":"https://api.github.com/repos/opntr/pkg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opntr/pkg/merges","archive_url":"https://api.github.com/repos/opntr/pkg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opntr/pkg/downloads","issues_url":"https://api.github.com/repos/opntr/pkg/issues{/number}","pulls_url":"https://api.github.com/repos/opntr/pkg/pulls{/number}","milestones_url":"https://api.github.com/repos/opntr/pkg/milestones{/number}","notifications_url":"https://api.github.com/repos/opntr/pkg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opntr/pkg/labels{/name}","releases_url":"https://api.github.com/repos/opntr/pkg/releases{/id}","created_at":"2015-08-05T23:33:22Z","updated_at":"2015-08-05T23:33:23Z","pushed_at":"2015-08-05T23:39:16Z","git_url":"git://github.com/opntr/pkg.git","ssh_url":"git@github.com:opntr/pkg.git","clone_url":"https://github.com/opntr/pkg.git","svn_url":"https://github.com/opntr/pkg","homepage":"http://wiki.freebsd.org/pkgng","size":36840,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"freebsd:master","ref":"master","sha":"91085101fc20b8f4a37fa919b13058fb22f9c640","user":{"login":"freebsd","id":811839,"avatar_url":"https://avatars.githubusercontent.com/u/811839?v=3","gravatar_id":"","url":"https://api.github.com/users/freebsd","html_url":"https://github.com/freebsd","followers_url":"https://api.github.com/users/freebsd/followers","following_url":"https://api.github.com/users/freebsd/following{/other_user}","gists_url":"https://api.github.com/users/freebsd/gists{/gist_id}","starred_url":"https://api.github.com/users/freebsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freebsd/subscriptions","organizations_url":"https://api.github.com/users/freebsd/orgs","repos_url":"https://api.github.com/users/freebsd/repos","events_url":"https://api.github.com/users/freebsd/events{/privacy}","received_events_url":"https://api.github.com/users/freebsd/received_events","type":"Organization","site_admin":false},"repo":{"id":1530481,"name":"pkg","full_name":"freebsd/pkg","owner":{"login":"freebsd","id":811839,"avatar_url":"https://avatars.githubusercontent.com/u/811839?v=3","gravatar_id":"","url":"https://api.github.com/users/freebsd","html_url":"https://github.com/freebsd","followers_url":"https://api.github.com/users/freebsd/followers","following_url":"https://api.github.com/users/freebsd/following{/other_user}","gists_url":"https://api.github.com/users/freebsd/gists{/gist_id}","starred_url":"https://api.github.com/users/freebsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freebsd/subscriptions","organizations_url":"https://api.github.com/users/freebsd/orgs","repos_url":"https://api.github.com/users/freebsd/repos","events_url":"https://api.github.com/users/freebsd/events{/privacy}","received_events_url":"https://api.github.com/users/freebsd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freebsd/pkg","description":"Package management tool for FreeBSD. Help at #pkgng on Freenode or pkg@FreeBSD.org","fork":false,"url":"https://api.github.com/repos/freebsd/pkg","forks_url":"https://api.github.com/repos/freebsd/pkg/forks","keys_url":"https://api.github.com/repos/freebsd/pkg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freebsd/pkg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freebsd/pkg/teams","hooks_url":"https://api.github.com/repos/freebsd/pkg/hooks","issue_events_url":"https://api.github.com/repos/freebsd/pkg/issues/events{/number}","events_url":"https://api.github.com/repos/freebsd/pkg/events","assignees_url":"https://api.github.com/repos/freebsd/pkg/assignees{/user}","branches_url":"https://api.github.com/repos/freebsd/pkg/branches{/branch}","tags_url":"https://api.github.com/repos/freebsd/pkg/tags","blobs_url":"https://api.github.com/repos/freebsd/pkg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freebsd/pkg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freebsd/pkg/git/refs{/sha}","trees_url":"https://api.github.com/repos/freebsd/pkg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freebsd/pkg/statuses/{sha}","languages_url":"https://api.github.com/repos/freebsd/pkg/languages","stargazers_url":"https://api.github.com/repos/freebsd/pkg/stargazers","contributors_url":"https://api.github.com/repos/freebsd/pkg/contributors","subscribers_url":"https://api.github.com/repos/freebsd/pkg/subscribers","subscription_url":"https://api.github.com/repos/freebsd/pkg/subscription","commits_url":"https://api.github.com/repos/freebsd/pkg/commits{/sha}","git_commits_url":"https://api.github.com/repos/freebsd/pkg/git/commits{/sha}","comments_url":"https://api.github.com/repos/freebsd/pkg/comments{/number}","issue_comment_url":"https://api.github.com/repos/freebsd/pkg/issues/comments{/number}","contents_url":"https://api.github.com/repos/freebsd/pkg/contents/{+path}","compare_url":"https://api.github.com/repos/freebsd/pkg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freebsd/pkg/merges","archive_url":"https://api.github.com/repos/freebsd/pkg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freebsd/pkg/downloads","issues_url":"https://api.github.com/repos/freebsd/pkg/issues{/number}","pulls_url":"https://api.github.com/repos/freebsd/pkg/pulls{/number}","milestones_url":"https://api.github.com/repos/freebsd/pkg/milestones{/number}","notifications_url":"https://api.github.com/repos/freebsd/pkg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freebsd/pkg/labels{/name}","releases_url":"https://api.github.com/repos/freebsd/pkg/releases{/id}","created_at":"2011-03-26T20:35:45Z","updated_at":"2015-08-04T01:47:18Z","pushed_at":"2015-08-05T23:42:19Z","git_url":"git://github.com/freebsd/pkg.git","ssh_url":"git@github.com:freebsd/pkg.git","clone_url":"https://github.com/freebsd/pkg.git","svn_url":"https://github.com/freebsd/pkg","homepage":"http://wiki.freebsd.org/pkgng","size":36840,"stargazers_count":397,"watchers_count":397,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":122,"mirror_url":null,"open_issues_count":190,"forks":122,"open_issues":190,"watchers":397,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/freebsd/pkg/pulls/1302"},"html":{"href":"https://github.com/freebsd/pkg/pull/1302"},"issue":{"href":"https://api.github.com/repos/freebsd/pkg/issues/1302"},"comments":{"href":"https://api.github.com/repos/freebsd/pkg/issues/1302/comments"},"review_comments":{"href":"https://api.github.com/repos/freebsd/pkg/pulls/1302/comments"},"review_comment":{"href":"https://api.github.com/repos/freebsd/pkg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freebsd/pkg/pulls/1302/commits"},"statuses":{"href":"https://api.github.com/repos/freebsd/pkg/statuses/f6c84ecd8a30a77eeefd8106496e6692d6348190"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}