[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#774439: arc: buffer over-read



Package: arc
Version: 5.21q-1
Usertags: afl

ARC crashes when trying to test archive integrity of the attached file:

$ arc t crash.arc
Testing file: moo           Segmentation fault


gdb suggests it's a buffer over-read:

Program received signal SIGSEGV, Segmentation fault.
0x0804f89f in putb_ncr (buf=0x805f088 "", len=4294967295, t=0x0) at arcunp.c:220
220                             if (buf[i] != DLE)
(gdb) bt
#0  0x0804f89f in putb_ncr (buf=0x805f088 "", len=4294967295, t=0x0) at arcunp.c:220
#1  0x0804f59d in unpack (f=0x8077090, t=0x0, hdr=0xffffd72c) at arcunp.c:86
#2  0x0804f40f in tstarc () at arctst.c:41
#3  0x0804987a in main (num=3, arg=0xffffd8a4) at arc.c:395
(gdb) print i
$3 = 102264
(gdb) print buf[i]
Cannot access memory at address 0x8078000
(gdb) print buf[i-1]
$4 = 0 '\000'


This bug was found using American fuzzy lop:
https://packages.debian.org/experimental/afl

Disclaimer: I don't have spare CPU cycles, so I fuzzed only till the first crash (which took about a minute). It's likely that extensive fuzzing would uncover more interesting crashers. I'd encourage ARC maintainers to perform fuzzing with AFL on their own. :-)


-- 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 arc depends on:
ii  libc6  2.19-13

--
Jakub Wilk

Attachment: crash.arc
Description: Binary data


Reply to: