<div dir="ltr">*Nobody* wants /bin/sh to be suid root, and its been a recurring theme of previous upgrades that a misconfiguration would result in just that.<div><br></div><div>Ross</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 10 November 2017 at 12:07, Andrej Valek <span dir="ltr">&lt;<a href="mailto:andrej.valek@siemens.com" target="_blank">andrej.valek@siemens.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Of course, I don&#39;t think so, that /bin/sh &gt; /bin/busybox.suid is a good<br>
think. I am just thinking, why is necessary to cast a fatal message and<br>
stop build for some, who wants this.<br>
<br>
Andrej<br>
<span class=""><br>
On 11/10/2017 12:57 PM, Burton, Ross wrote:<br>
&gt; How is /bin/sh being busybox.suid a good thing?<br>
&gt;<br>
&gt; Ross<br>
&gt;<br>
&gt; On 10 November 2017 at 07:17, Andrej Valek &lt;<a href="mailto:andrej.valek@siemens.com">andrej.valek@siemens.com</a><br>
</span><span class="">&gt; &lt;mailto:<a href="mailto:andrej.valek@siemens.com">andrej.valek@siemens.<wbr>com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     I don&#39;t think so, that adding bbfatal into this recipe is a good<br>
&gt;     solution. Someone could build the busybox with /bin/sh linking into<br>
&gt;     .suid eg. for more secure. We can leave live with this one as before.<br>
&gt;<br>
&gt;     Andrej<br>
&gt;<br>
&gt;     On 11/09/2017 02:25 PM, Nathan Rossi wrote:<br>
&gt;      &gt; Add a sanity check during the do_compile task to fail if the suid<br>
&gt;      &gt; busybox provides /bin/sh. This is considered as a hard fail since not<br>
&gt;      &gt; only is providing sh as suid problematic for security reasons but also<br>
&gt;      &gt; because the sh configured for suid is less functional than the nosuid<br>
&gt;      &gt; configured sh and breaks a number of required features (e.g. 64-bit<br>
&gt;      &gt; test).<br>
&gt;      &gt;<br>
&gt;      &gt; Signed-off-by: Nathan Rossi &lt;<a href="mailto:nathan@nathanrossi.com">nathan@nathanrossi.com</a><br>
</span>&gt;     &lt;mailto:<a href="mailto:nathan@nathanrossi.com">nathan@nathanrossi.com</a><wbr>&gt;&gt;<br>
&gt;      &gt; Cc: Ross Burton &lt;<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a> &lt;mailto:<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>&gt;<wbr>&gt;<br>
<div><div class="h5">&gt;      &gt; ---<br>
&gt;      &gt;  meta/recipes-core/busybox/<wbr>busybox.inc | 6 ++++++<br>
&gt;      &gt;  1 file changed, 6 insertions(+)<br>
&gt;      &gt;<br>
&gt;      &gt; diff --git a/meta/recipes-core/busybox/<wbr>busybox.inc<br>
&gt;     b/meta/recipes-core/busybox/<wbr>busybox.inc<br>
&gt;      &gt; index 4012f921c6..157aea3968 100644<br>
&gt;      &gt; --- a/meta/recipes-core/busybox/<wbr>busybox.inc<br>
&gt;      &gt; +++ b/meta/recipes-core/busybox/<wbr>busybox.inc<br>
&gt;      &gt; @@ -183,6 +183,12 @@ do_compile() {<br>
&gt;      &gt;                       oe_runmake busybox.links<br>
&gt;      &gt;                       mv busybox.links busybox.links.$s<br>
&gt;      &gt;               done<br>
&gt;      &gt; +<br>
&gt;      &gt; +             # hard fail if sh is being linked to the suid busybox<br>
&gt;     (detects bug 10346)<br>
&gt;      &gt; +             if grep -q -x &quot;/bin/sh&quot; busybox.links.suid; then<br>
&gt;      &gt; +                     bbfatal &quot;busybox suid binary incorrectly provides<br>
&gt;     /bin/sh&quot;<br>
&gt;      &gt; +             fi<br>
&gt;      &gt; +<br>
&gt;      &gt;               # copy .config.orig back to .config, because the install<br>
&gt;     process may check this file<br>
&gt;      &gt;               cp .config.orig .config<br>
&gt;      &gt;               # cleanup<br>
&gt;      &gt;<br>
&gt;     --<br>
&gt;     ______________________________<wbr>_________________<br>
&gt;     Openembedded-core mailing list<br>
&gt;     <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
</div></div>&gt;     &lt;mailto:<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@<wbr>lists.openembedded.org</a>&gt;<br>
&gt;     <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
&gt;     &lt;<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.<wbr>org/mailman/listinfo/<wbr>openembedded-core</a>&gt;<br>
&gt;<br>
&gt;<br>
</blockquote></div><br></div>