<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>201646</bug_id>
          
          <creation_ts>2007-12-08 02:50 0000</creation_ts>
          <short_desc>glibc-2.7 crashes on sscanf(&quot;&quot;, &quot;%as&quot;, &amp;foo)</short_desc>
          <delta_ts>2007-12-11 04:39:05 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Core system</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://sources.redhat.com/bugzilla/show_bug.cgi?id=5441</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>vapier@gentoo.org</reporter>
          <assigned_to>toolchain@gentoo.org</assigned_to>
          <cc>nbensa@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-12-08 02:50:32 0000</bug_when>
            <thetext>looks like glibc-2.7 crashes when using the allocation flag to scanf() and reading of strings, and the input string is an empty string

got verification from various sources/arches ... here&apos;s the output on ppc

*** glibc detected *** ./a.out: munmap_chunk(): invalid pointer: 0xff9360a0 ***
======= Backtrace: =========
/lib/libc.so.6[0xfec0318]
/lib/libc.so.6(_IO_vfscanf+0x15bc)[0xfe9d16c]
/lib/libc.so.6(vsscanf+0x94)[0xfeae0b4]
/lib/libc.so.6(_IO_sscanf+0x84)[0xfea6c04]
./a.out[0x100004d0]
/lib/libc.so.6[0xfe5eb00]
/lib/libc.so.6[0xfe5ecc0]
======= Memory map: ========
00100000-00103000 r-xp 00100000 00:00 0                                  [vdso]
0fe40000-0ff9c000 r-xp 00000000 08:04 20889953                           /lib/libc-2.7.so
0ff9c000-0ffac000 ---p 0015c000 08:04 20889953                           /lib/libc-2.7.so
0ffac000-0ffb0000 r--p 0015c000 08:04 20889953                           /lib/libc-2.7.so
0ffb0000-0ffb1000 rw-p 00160000 08:04 20889953                           /lib/libc-2.7.so
0ffb1000-0ffb4000 rw-p 0ffb1000 00:00 0
0ffc0000-0ffdf000 r-xp 00000000 08:04 20889952                           /lib/ld-2.7.so
0ffef000-0fff0000 r--p 0001f000 08:04 20889952                           /lib/ld-2.7.so
0fff0000-0fff1000 rw-p 00020000 08:04 20889952                           /lib/ld-2.7.so
10000000-10001000 r-xp 00000000 08:04 8921485                            /usr/local/src/blackfin/svn/toolchain/branches/toolchain_07r1_branch/genext2fs/build/a.out
10010000-10011000 r--p 00000000 08:04 8921485                            /usr/local/src/blackfin/svn/toolchain/branches/toolchain_07r1_branch/genext2fs/build/a.out
10011000-10012000 rw-p 00001000 08:04 8921485                            /usr/local/src/blackfin/svn/toolchain/branches/toolchain_07r1_branch/genext2fs/build/a.out
10012000-10033000 rwxp 10012000 00:00 0                                  [heap]
f7fd5000-f7fd7000 rw-p f7fd5000 00:00 0
ff922000-ff938000 rw-p ffffffea000 00:00 0                               [stack]
Aborted</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-12-08 02:50:54 0000</bug_when>
            <thetext>test code:
int main() { char *path; return sscanf (&quot;&quot;, &quot;%as&quot;, &amp;path); }</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-12-10 01:13:32 0000</bug_when>
            <thetext>fixed in glibc-2.7-r1</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-12-10 01:15:04 0000</bug_when>
            <thetext>http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.7/0050_all_glibc-2.7-sscanf-as-BZ5441.patch?rev=1.1</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nbensa@gmail.com</who>
            <bug_when>2007-12-11 04:24:19 0000</bug_when>
            <thetext>Is this fix the cause of samba, cups, and kopete (so far) crashing?

I&apos;m currently re-emerging 2.7-r0, but I can make some tests if you guide me.

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nbensa@gmail.com</who>
            <bug_when>2007-12-11 04:39:05 0000</bug_when>
            <thetext>Ignore my last message. Cups and Samba are crashing because of libgcrypt-1.4.0.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>