{"action":"created","issue":{"url":"https://api.github.com/repos/freedomofpress/ansible-role-grsecurity/issues/60","repository_url":"https://api.github.com/repos/freedomofpress/ansible-role-grsecurity","labels_url":"https://api.github.com/repos/freedomofpress/ansible-role-grsecurity/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/freedomofpress/ansible-role-grsecurity/issues/60/comments","events_url":"https://api.github.com/repos/freedomofpress/ansible-role-grsecurity/issues/60/events","html_url":"https://github.com/freedomofpress/ansible-role-grsecurity/issues/60","id":145295824,"number":60,"title":"Possible attack checking kernel hash with unsigned checksum","user":{"login":"fowlslegs","id":3538418,"avatar_url":"https://avatars.githubusercontent.com/u/3538418?v=3","gravatar_id":"","url":"https://api.github.com/users/fowlslegs","html_url":"https://github.com/fowlslegs","followers_url":"https://api.github.com/users/fowlslegs/followers","following_url":"https://api.github.com/users/fowlslegs/following{/other_user}","gists_url":"https://api.github.com/users/fowlslegs/gists{/gist_id}","starred_url":"https://api.github.com/users/fowlslegs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fowlslegs/subscriptions","organizations_url":"https://api.github.com/users/fowlslegs/orgs","repos_url":"https://api.github.com/users/fowlslegs/repos","events_url":"https://api.github.com/users/fowlslegs/events{/privacy}","received_events_url":"https://api.github.com/users/fowlslegs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-04-01T22:01:09Z","updated_at":"2016-10-26T16:29:28Z","closed_at":null,"body":"Relevant to `fetch_linux_kernel_source.yml`:\r\n\r\nAssume an adversary has the capacity to MitM HTTPS. Then they can add a line in the format of a linux kernel checksum before the signature block within the clearsigned sha256sums.asc file and the signature will still verify as good. They could also serve us their position as a MitM to serve a backdoored kernel. Then, when we grep for the linux kernel checksum line, we use this unsigned, maliciously-inserted signature, which matches the backdoor kernel's checksum (an actual attack would have to be a little more nuanced, taking into account how we pipe to cut the options we use, but certainly seems possible). Bad news.\r\n\r\nSo, after reading through the GPG man page for the bajillionth time and searching the web extensively, I've found no way to resolve this problem with GPG parameters alone. I propose that we make some assertions about the file before verifying:\r\n\r\n* The 1st line of the file is:\r\n\r\n`-----BEGIN PGP SIGNED MESSAGE-----`\r\n\r\n* The last line of the file is:\r\n\r\n`-----END PGP SIGNATURE-----`\r\n\r\n* Somewhere between the 2nd and last line of the file is the line:\r\n\r\n`-----BEGIN PGP SIGNATURE-----`\r\n\r\n* No lines other than the three lines above start with:\r\n\r\n`-----`"},"comment":{"url":"https://api.github.com/repos/freedomofpress/ansible-role-grsecurity/issues/comments/256403850","html_url":"https://github.com/freedomofpress/ansible-role-grsecurity/issues/60#issuecomment-256403850","issue_url":"https://api.github.com/repos/freedomofpress/ansible-role-grsecurity/issues/60","id":256403850,"user":{"login":"conorsch","id":657862,"avatar_url":"https://avatars.githubusercontent.com/u/657862?v=3","gravatar_id":"","url":"https://api.github.com/users/conorsch","html_url":"https://github.com/conorsch","followers_url":"https://api.github.com/users/conorsch/followers","following_url":"https://api.github.com/users/conorsch/following{/other_user}","gists_url":"https://api.github.com/users/conorsch/gists{/gist_id}","starred_url":"https://api.github.com/users/conorsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conorsch/subscriptions","organizations_url":"https://api.github.com/users/conorsch/orgs","repos_url":"https://api.github.com/users/conorsch/repos","events_url":"https://api.github.com/users/conorsch/events{/privacy}","received_events_url":"https://api.github.com/users/conorsch/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T16:29:28Z","updated_at":"2016-10-26T16:29:28Z","body":"There is a WIP module in feature branch `parse-cleartext-sigs`; leaving issue open."}}
{"actor":{"display_login":"conorsch"}}