{"action":"created","comment":{"url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/comments/68649941","id":68649941,"diff_hunk":"@@ -0,0 +1,54 @@\n+From ea3c839d676d12be9f8d234bc14e14036fe33247 Mon Sep 17 00:00:00 2001\n+From: Rusty Bird <rustybird@openmailbox.org>\n+Date: Mon, 27 Jun 2016 18:25:14 +0000\n+Subject: [PATCH] xen-blkfront: add partition_scan module parameter\n+\n+It is sometimes very useful to attach block devices from lesser to more\n+trusted domains, but great care has to be taken not to expose parsers\n+to unauthenticated, potentially harmful input.","path":"patches.xen/0001-xen-blkfront-add-partition_scan-module-parameter.patch","position":8,"original_position":8,"commit_id":"c2c40cc236e3b481244ae18c24b169381a615e49","original_commit_id":"c2c40cc236e3b481244ae18c24b169381a615e49","user":{"login":"rustybird","id":6682340,"avatar_url":"https://avatars.githubusercontent.com/u/6682340?v=3","gravatar_id":"","url":"https://api.github.com/users/rustybird","html_url":"https://github.com/rustybird","followers_url":"https://api.github.com/users/rustybird/followers","following_url":"https://api.github.com/users/rustybird/following{/other_user}","gists_url":"https://api.github.com/users/rustybird/gists{/gist_id}","starred_url":"https://api.github.com/users/rustybird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rustybird/subscriptions","organizations_url":"https://api.github.com/users/rustybird/orgs","repos_url":"https://api.github.com/users/rustybird/repos","events_url":"https://api.github.com/users/rustybird/events{/privacy}","received_events_url":"https://api.github.com/users/rustybird/received_events","type":"User","site_admin":false},"body":"@marmarek: Why, yes. ;)\r\n\r\n1. Split dm-crypt. Attach an encrypted disk from sys-usb to a dispVM, let the user enter the decryption password there, and attach the decrypted block device to an AppVM where all content is handled. Even if the AppVM *and* sys-usb are compromised, neither of them will be able to exfiltrate the key or much[*] interesting data to an attacker who seizes the USB disk. (Given that the user has overwritten the disk with random data before creating the encrypted filesystem; otherwise the AppVM could just encode it as empty block / nonempty block.) So ideally, the dispVM would just be a dead simple dm-crypt translation layer between two block devices, with no partition scanning or filesystem probing, to prevent attacks from sys-usb.\r\n\r\n2. Probably more controversially, I'm thinking about a \"reasonably secure\" incremental deduplicated btrfs backup scheme. It would go something like this: Disable partition scanning [and fs probing](https://github.com/QubesOS/qubes-core-admin-linux/pull/8/commits/ae7656e348e643d9595820f35771c69e348becd9#diff-c40969e0567576ab523170fac006659aR5) for xvd* in dom0. Attach a block device from e.g. sys-usb to dom0, create a LUKS device on it in dom0 (and keep the detached header in dom0 for authentication, to prevent QSB#19-like attacks), then create a btrfs filesystem on /dev/mapper/xvdN in dom0. Now you can finally do a proper `btrfs send ... | btrfs receive` to or from the USB disk -- hallelujah! -- with exploits only possible against xen-blkfront itself.[**]\r\n\r\n[*] Okay, the AppVM might be able to establish a covert channel with sys-usb, e.g. via block access patterns, to tunnel out some amount of data.\r\n\r\n[**] Considering QSB#23 / XSA 155, do you think (2) is hopelessly insane? My backup discipline has gone down the drain so much since I switched to Qubes that I'm entertaining all kinds of safety (against data loss) vs. security trade-offs.","created_at":"2016-06-27T20:30:13Z","updated_at":"2016-06-27T20:30:13Z","html_url":"https://github.com/QubesOS/qubes-linux-kernel/pull/4#discussion_r68649941","pull_request_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/comments/68649941"},"html":{"href":"https://github.com/QubesOS/qubes-linux-kernel/pull/4#discussion_r68649941"},"pull_request":{"href":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/4","id":75358703,"html_url":"https://github.com/QubesOS/qubes-linux-kernel/pull/4","diff_url":"https://github.com/QubesOS/qubes-linux-kernel/pull/4.diff","patch_url":"https://github.com/QubesOS/qubes-linux-kernel/pull/4.patch","issue_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/issues/4","number":4,"state":"open","locked":false,"title":"Add xen-blkfront patch to allow disabling of partition scanning","user":{"login":"rustybird","id":6682340,"avatar_url":"https://avatars.githubusercontent.com/u/6682340?v=3","gravatar_id":"","url":"https://api.github.com/users/rustybird","html_url":"https://github.com/rustybird","followers_url":"https://api.github.com/users/rustybird/followers","following_url":"https://api.github.com/users/rustybird/following{/other_user}","gists_url":"https://api.github.com/users/rustybird/gists{/gist_id}","starred_url":"https://api.github.com/users/rustybird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rustybird/subscriptions","organizations_url":"https://api.github.com/users/rustybird/orgs","repos_url":"https://api.github.com/users/rustybird/repos","events_url":"https://api.github.com/users/rustybird/events{/privacy}","received_events_url":"https://api.github.com/users/rustybird/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-27T18:37:02Z","updated_at":"2016-06-27T20:30:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b2306f4c784eb87c2d664bdb6454d92039640c0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/4/commits","review_comments_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/4/comments","review_comment_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/issues/4/comments","statuses_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/statuses/c2c40cc236e3b481244ae18c24b169381a615e49","head":{"label":"rustybird:partition_scan","ref":"partition_scan","sha":"c2c40cc236e3b481244ae18c24b169381a615e49","user":{"login":"rustybird","id":6682340,"avatar_url":"https://avatars.githubusercontent.com/u/6682340?v=3","gravatar_id":"","url":"https://api.github.com/users/rustybird","html_url":"https://github.com/rustybird","followers_url":"https://api.github.com/users/rustybird/followers","following_url":"https://api.github.com/users/rustybird/following{/other_user}","gists_url":"https://api.github.com/users/rustybird/gists{/gist_id}","starred_url":"https://api.github.com/users/rustybird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rustybird/subscriptions","organizations_url":"https://api.github.com/users/rustybird/orgs","repos_url":"https://api.github.com/users/rustybird/repos","events_url":"https://api.github.com/users/rustybird/events{/privacy}","received_events_url":"https://api.github.com/users/rustybird/received_events","type":"User","site_admin":false},"repo":{"id":62076008,"name":"qubes-linux-kernel","full_name":"rustybird/qubes-linux-kernel","owner":{"login":"rustybird","id":6682340,"avatar_url":"https://avatars.githubusercontent.com/u/6682340?v=3","gravatar_id":"","url":"https://api.github.com/users/rustybird","html_url":"https://github.com/rustybird","followers_url":"https://api.github.com/users/rustybird/followers","following_url":"https://api.github.com/users/rustybird/following{/other_user}","gists_url":"https://api.github.com/users/rustybird/gists{/gist_id}","starred_url":"https://api.github.com/users/rustybird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rustybird/subscriptions","organizations_url":"https://api.github.com/users/rustybird/orgs","repos_url":"https://api.github.com/users/rustybird/repos","events_url":"https://api.github.com/users/rustybird/events{/privacy}","received_events_url":"https://api.github.com/users/rustybird/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rustybird/qubes-linux-kernel","description":"Qubes component: linux-kernel","fork":true,"url":"https://api.github.com/repos/rustybird/qubes-linux-kernel","forks_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/forks","keys_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/teams","hooks_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/hooks","issue_events_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/events","assignees_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/tags","blobs_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/languages","stargazers_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/stargazers","contributors_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/contributors","subscribers_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/subscribers","subscription_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/subscription","commits_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/merges","archive_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/downloads","issues_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/labels{/name}","releases_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/releases{/id}","deployments_url":"https://api.github.com/repos/rustybird/qubes-linux-kernel/deployments","created_at":"2016-06-27T17:51:02Z","updated_at":"2016-06-27T17:51:04Z","pushed_at":"2016-06-27T18:27:14Z","git_url":"git://github.com/rustybird/qubes-linux-kernel.git","ssh_url":"git@github.com:rustybird/qubes-linux-kernel.git","clone_url":"https://github.com/rustybird/qubes-linux-kernel.git","svn_url":"https://github.com/rustybird/qubes-linux-kernel","homepage":null,"size":89994,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":false,"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":"stable-3.18"}},"base":{"label":"QubesOS:stable-4.4","ref":"stable-4.4","sha":"9af39fa59ec985ee87d36869960c310443123b83","user":{"login":"QubesOS","id":10213205,"avatar_url":"https://avatars.githubusercontent.com/u/10213205?v=3","gravatar_id":"","url":"https://api.github.com/users/QubesOS","html_url":"https://github.com/QubesOS","followers_url":"https://api.github.com/users/QubesOS/followers","following_url":"https://api.github.com/users/QubesOS/following{/other_user}","gists_url":"https://api.github.com/users/QubesOS/gists{/gist_id}","starred_url":"https://api.github.com/users/QubesOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QubesOS/subscriptions","organizations_url":"https://api.github.com/users/QubesOS/orgs","repos_url":"https://api.github.com/users/QubesOS/repos","events_url":"https://api.github.com/users/QubesOS/events{/privacy}","received_events_url":"https://api.github.com/users/QubesOS/received_events","type":"Organization","site_admin":false},"repo":{"id":30624165,"name":"qubes-linux-kernel","full_name":"QubesOS/qubes-linux-kernel","owner":{"login":"QubesOS","id":10213205,"avatar_url":"https://avatars.githubusercontent.com/u/10213205?v=3","gravatar_id":"","url":"https://api.github.com/users/QubesOS","html_url":"https://github.com/QubesOS","followers_url":"https://api.github.com/users/QubesOS/followers","following_url":"https://api.github.com/users/QubesOS/following{/other_user}","gists_url":"https://api.github.com/users/QubesOS/gists{/gist_id}","starred_url":"https://api.github.com/users/QubesOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QubesOS/subscriptions","organizations_url":"https://api.github.com/users/QubesOS/orgs","repos_url":"https://api.github.com/users/QubesOS/repos","events_url":"https://api.github.com/users/QubesOS/events{/privacy}","received_events_url":"https://api.github.com/users/QubesOS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QubesOS/qubes-linux-kernel","description":"Qubes component: linux-kernel","fork":false,"url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel","forks_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/forks","keys_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/teams","hooks_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/hooks","issue_events_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/events","assignees_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/tags","blobs_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/languages","stargazers_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/stargazers","contributors_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/contributors","subscribers_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/subscribers","subscription_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/subscription","commits_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/merges","archive_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/downloads","issues_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/labels{/name}","releases_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/releases{/id}","deployments_url":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/deployments","created_at":"2015-02-11T01:27:39Z","updated_at":"2016-05-18T13:58:45Z","pushed_at":"2016-06-27T18:37:02Z","git_url":"git://github.com/QubesOS/qubes-linux-kernel.git","ssh_url":"git@github.com:QubesOS/qubes-linux-kernel.git","clone_url":"https://github.com/QubesOS/qubes-linux-kernel.git","svn_url":"https://github.com/QubesOS/qubes-linux-kernel","homepage":null,"size":89991,"stargazers_count":11,"watchers_count":11,"language":"Perl","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":1,"forks":11,"open_issues":1,"watchers":11,"default_branch":"stable-3.18"}},"_links":{"self":{"href":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/4"},"html":{"href":"https://github.com/QubesOS/qubes-linux-kernel/pull/4"},"issue":{"href":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/issues/4"},"comments":{"href":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/QubesOS/qubes-linux-kernel/statuses/c2c40cc236e3b481244ae18c24b169381a615e49"}}}}
{"actor":{"display_login":"rustybird"}}