Package: rpm2cpio
Version: 4.11.3-1.1
Usertags: afl

rpm2cpio crashes on the attached file:

$ rpm2cpio crash.rpm
Segmentation fault


Valgrind says it's a null pointer dereference:

==8618== Invalid read of size 1
==8618==    at 0x402C3B8: strlen (in 
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==8618==    by 0x40D35CB: rstrdup (rpmmalloc.c:73)
==8618==    by 0x4071650: stringFormat (formats.c:48)
==8618==    by 0x406B947: rpmtdFormat (rpmtd.c:256)
==8618==    by 0x405E7B4: headerGetAsString (headerutil.c:116)
==8618==    by 0x409695A: providePackageNVR (legacy.c:143)
==8618==    by 0x409695A: legacyRetrofit (legacy.c:206)
==8618==    by 0x409695A: headerConvert (legacy.c:225)
==8618==    by 0x4079235: rpmpkgRead (package.c:693)
==8618==    by 0x407998E: rpmReadPackageFile (package.c:717)
==8618==    by 0x8048963: main (rpm2cpio.c:52)
==8618==  Address 0x0 is not stack'd, malloc'd or (recently) free'd


This bug was found using American fuzzy lop:
http://lcamtuf.coredump.cx/afl/
(available in Debian experimental)


-- System Information:
Debian Release: 8.0
 APT prefers unstable
 APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages rpm2cpio depends on:
ii  libc6       2.19-15
ii  librpm3     4.11.3-1.1
ii  librpmio3   4.11.3-1.1
ii  rpm-common  4.11.3-1.1

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to