{"id":4532,"date":"2023-04-11T22:54:55","date_gmt":"2023-04-12T03:54:55","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=4532"},"modified":"2023-04-11T22:53:56","modified_gmt":"2023-04-12T03:53:56","slug":"unable-to-launch-flatpaks-on-fedora-using-hardened-kernel","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/unable-to-launch-flatpaks-on-fedora-using-hardened-kernel\/","title":{"rendered":"Unable to launch Flatpaks on Fedora using Hardened Kernel"},"content":{"rendered":"\n<p>If you have installed the hardened Linux Kernel on Fedora, you may have encountered the following error when trying to launch Flatpak applications.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">bwrap: No permissions to creating new namespace, likely because the kernel does not allow non-privileged user namespaces. On e.g. debian this can be enabled with 'sysctl kernel.unprivileged_userns_clone=1'.\nerror: Failed to sync with dbus proxy<\/pre>\n\n\n\n<p><a href=\"https:\/\/security.stackexchange.com\/questions\/209529\/what-does-enabling-kernel-unprivileged-userns-clone-do\">https:\/\/security.stackexchange.com\/questions\/209529\/what-does-enabling-kernel-unprivileged-userns-clone-do<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/containers\/bubblewrap\/issues\/324\">https:\/\/github.com\/containers\/bubblewrap\/issues\/324<\/a><\/p>\n\n\n\n<p>The issue looks to arise from the fact that the hardened Linux Kernel disables unprivileged name space and Fedora does not have setuid on by default on the bubblewrap executable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Enabling setuid on bubblewrap<\/h2>\n\n\n\n<p>You can set the setuid permission on the bubblewrap executable with<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo chmod u+s \/usr\/bin\/bwrap<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Allow Unprivileged Name Space (Alternative work around)<\/h2>\n\n\n\n<p>You could also allow unprivileged name space by running <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sysctl kernel.unprivileged_userns_clone=1<\/pre>\n\n\n\n<p>Note that setting the setuid seems the safer\/recommended option.<\/p>\n\n\n\n<p>It looks like using the setuid binary for bubblewrap would be better to use then enabling unprivileged user space.<\/p>\n\n\n\n<p><a href=\"https:\/\/madaidans-insecurities.github.io\/guides\/linux-hardening.html#sysctl-kernel\">https:\/\/madaidans-insecurities.github.io\/guides\/linux-hardening.html#sysctl-kernel<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Remove setuid on bubblewrap<\/h2>\n\n\n\n<p>If you would like to remove the setuid permission for any reason, you can with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo chmod u-s \/usr\/bin\/bwrap<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you have installed the hardened Linux Kernel on Fedora, you may have encountered the following error when trying to launch Flatpak applications. bwrap: No permissions to creating new namespace, likely because the kernel does not allow non-privileged user namespaces. &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/unable-to-launch-flatpaks-on-fedora-using-hardened-kernel\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[573],"tags":[1332,761,7,503],"class_list":["post-4532","post","type-post","status-publish","format-standard","hentry","category-security","tag-flatpak","tag-kernel","tag-linux-2","tag-security"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=4532"}],"version-history":[{"count":4,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4532\/revisions"}],"predecessor-version":[{"id":4977,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4532\/revisions\/4977"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=4532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=4532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=4532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}