#776239 unshield: out-of-bounds read

Package:
unshield
Source:
unshield
Description:
extracts CAB files from InstallShield installers
Submitter:
Jakub Wilk
Date:
2015-01-25 20:51:06 UTC
Severity:
normal
#776239#3
Date:
2015-01-25 20:46:36 UTC
From:
To:
Unshield crashes on this (slightly corrupted) archive:

$ unshield t data1.cab
Segmentation fault


GDB says it's an out-of-bounds read:

#0  0xf7fb565a in get_unaligned_le32 (p=0x5f40e4e8 <error: Cannot access memory at address 0x5f40e4e8>) at internal.h:138
#1  0xf7fb5732 in unshield_component_new (header=0x804dfd0, offset=1463549952) at component.c:30
#2  0xf7fb8eff in unshield_header_get_components (header=0x804dfd0) at libunshield.c:155
#3  0xf7fb942d in unshield_read_headers (unshield=0x804dfb0, version=-1) at libunshield.c:309
#4  0xf7fb95db in unshield_open_force_version (filename=0xffffda22 "data1.cab", version=-1) at libunshield.c:361
#5  0x08049db1 in main (argc=3, argv=0xffffd864) at unshield.c:574


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 a few seconds). It's likely that extensive
fuzzing would uncover more interesting crashers. I'd encourage Unshield
maintainers to perform fuzzing with AFL on their own. :-)