<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9539</bug_id>
          
          <creation_ts>2016-04-28 10:34:17 +0000</creation_ts>
          <short_desc>Resolve string formatting issues in busybox</short_desc>
          <delta_ts>2018-02-09 23:20:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Lock">joshuagloe</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>elena.reshetova</cc>
    
    <cc>garbados</cc>
    
    <cc>libertad.gonzalez.de.la.cruz</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>61771</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-04-28 10:34:17 +0000</bug_when>
    <thetext>Busybox fails to compile with compiler flags which elevate common string formatting issues into an error (-Wformat -Wformat-security -Werror=format-security).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70473</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-02-07 13:20:21 +0000</bug_when>
    <thetext>Setting assignee to recipe maintainer. Chen Qi, please feel free to update estimate, target, etc. to suit your workload.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70483</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-02-07 13:24:45 +0000</bug_when>
    <thetext>Note: to observe the failures comment out the recipe&apos;s SECURITY_STRINGFORMAT entry in security_cflags.inc and build the recipe with a configuration that utilises security_cflags (i.e. the poky-lsb distro).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74014</commentid>
    <comment_count>3</comment_count>
    <who name="Diana Thayer">garbados</who>
    <bug_when>2017-06-12 18:52:20 +0000</bug_when>
    <thetext>Unassigned myself after struggling with it for a while :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79364</commentid>
    <comment_count>4</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2018-02-06 13:38:09 +0000</bug_when>
    <thetext>From this commit (ca81a937225714f75157eb596d90255243ae2e29),  it seems the mainline is not super interested in fixing these kind of format related bugs in busybox (mainly due to size)

---
disable format security warnings

We pass strings to printf directly a lot.  Some distros enable some flags
in their gcc by default like -Wformat-security.  With these two things, we
end up with a lot of build warnings like so:
	loginutils/chpasswd.c:42:3: warning: format not a string literal and
		no format arguments [-Wformat-security]

But we don&apos;t care.  Our focus is first and foremost on size, so adding a
lot of dummy calls like:
-	printf(some_constant_string);
+	printf(&quot;%s&quot;, some_constant_string);
is pointless bloat.

Disable this warning flag if the compiler supports it.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;

https://git.busybox.net/busybox/commit/?id=ca81a937225714f75157eb596d90255243ae2e29</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79365</commentid>
    <comment_count>5</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2018-02-06 13:42:59 +0000</bug_when>
    <thetext>Even if we prepare patches for format-security warnings, busybox mainline would treat it as &quot;pointless bloat&quot;. Should we still fix those and carry the burden with us ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79411</commentid>
    <comment_count>6</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-02-09 23:20:39 +0000</bug_when>
    <thetext>Wow that&apos;s impressive logic.

If printf(string) is fine but printf(&quot;%s&quot;, string) is bloat, surely printf(string) is bloat as puts(string) is more efficient?

Yes, if upstream refuse to fix these, then I think we just have to sigh.  At least their forcing the flag off...</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>