<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"><<a href="mailto:andrej.valek@siemens.com" target="_blank">andrej.valek@siemens.com</a>></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't think so, that /bin/sh > /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>
> How is /bin/sh being busybox.suid a good thing?<br>
><br>
> Ross<br>
><br>
> On 10 November 2017 at 07:17, Andrej Valek <<a href="mailto:andrej.valek@siemens.com">andrej.valek@siemens.com</a><br>
</span><span class="">> <mailto:<a href="mailto:andrej.valek@siemens.com">andrej.valek@siemens.<wbr>com</a>>> wrote:<br>
><br>
> I don't think so, that adding bbfatal into this recipe is a good<br>
> solution. Someone could build the busybox with /bin/sh linking into<br>
> .suid eg. for more secure. We can leave live with this one as before.<br>
><br>
> Andrej<br>
><br>
> On 11/09/2017 02:25 PM, Nathan Rossi wrote:<br>
> > Add a sanity check during the do_compile task to fail if the suid<br>
> > busybox provides /bin/sh. This is considered as a hard fail since not<br>
> > only is providing sh as suid problematic for security reasons but also<br>
> > because the sh configured for suid is less functional than the nosuid<br>
> > configured sh and breaks a number of required features (e.g. 64-bit<br>
> > test).<br>
> ><br>
> > Signed-off-by: Nathan Rossi <<a href="mailto:nathan@nathanrossi.com">nathan@nathanrossi.com</a><br>
</span>> <mailto:<a href="mailto:nathan@nathanrossi.com">nathan@nathanrossi.com</a><wbr>>><br>
> > Cc: Ross Burton <<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a> <mailto:<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>><wbr>><br>
<div><div class="h5">> > ---<br>
> > meta/recipes-core/busybox/<wbr>busybox.inc | 6 ++++++<br>
> > 1 file changed, 6 insertions(+)<br>
> ><br>
> > diff --git a/meta/recipes-core/busybox/<wbr>busybox.inc<br>
> b/meta/recipes-core/busybox/<wbr>busybox.inc<br>
> > index 4012f921c6..157aea3968 100644<br>
> > --- a/meta/recipes-core/busybox/<wbr>busybox.inc<br>
> > +++ b/meta/recipes-core/busybox/<wbr>busybox.inc<br>
> > @@ -183,6 +183,12 @@ do_compile() {<br>
> > oe_runmake busybox.links<br>
> > mv busybox.links busybox.links.$s<br>
> > done<br>
> > +<br>
> > + # hard fail if sh is being linked to the suid busybox<br>
> (detects bug 10346)<br>
> > + if grep -q -x "/bin/sh" busybox.links.suid; then<br>
> > + bbfatal "busybox suid binary incorrectly provides<br>
> /bin/sh"<br>
> > + fi<br>
> > +<br>
> > # copy .config.orig back to .config, because the install<br>
> process may check this file<br>
> > cp .config.orig .config<br>
> > # cleanup<br>
> ><br>
> --<br>
> ______________________________<wbr>_________________<br>
> Openembedded-core mailing list<br>
> <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
</div></div>> <mailto:<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@<wbr>lists.openembedded.org</a>><br>
> <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>
> <<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>><br>
><br>
><br>
</blockquote></div><br></div>