BR903 / ELFkickers

A collection of programs that access and manipulate ELF files.

Home Page:http://www.muppetlabs.com/~breadbox/software/elfkickers.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

There is a vulnerability in `elftoc/phdrtab.c:23`, which can cause SEGV unknown address 0x000000000000.

law4D opened this issue · comments

commented

The 'elftoc' of the version run as "./elftoc <poc_file>", which can cause SEGV unknown address 0x000000000000. A PoC can be found at PoC.zip.

==10675==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000412dc0 bp 0x000000000038 sp 0x7ffd98578890 T0)
#0 0x412dbf in dividesegment ./ELFkickers-master/elftoc/phdrtab.c:23
#1 0x41373b in dividesegments ./ELFkickers-master/elftoc/phdrtab.c:108
#2 0x40e1bc in readelf ./ELFkickers-master/elftoc/readelf.c:185
#3 0x4028b5 in readinputfile ./ELFkickers-master/elftoc/elftoc.c:170
#4 0x4028b5 in main ./ELFkickers-master/elftoc/elftoc.c:210
#5 0x7f2e4572a82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
#6 0x403578 in _start (./ELFkickers-master/bin/elftoc+0x403578)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ./ELFkickers-master/elftoc/phdrtab.c:23 dividesegment
==10675==ABORTING

Modified code to reject negative file sizes/offsets.