Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out-of-bounds read in elf parsing. #1

Closed
liyansong2018 opened this issue Jan 23, 2022 · 0 comments
Closed

Out-of-bounds read in elf parsing. #1

liyansong2018 opened this issue Jan 23, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@liyansong2018
Copy link
Owner

poc

$ ./elfspirit parse id_000000

log

[+] ELF Header
     e_type:                       3 -> A shared object                                               
     e_machine:                   62 -> Intel 80386
     e_version:                    1 -> Current version
     e_entry:                   4176
     e_phoff:                     64
     e_shoff:                  13608
     e_flags:                      0
     e_ehsize:                    64
     e_phentsize:                 56
     e_phnum:                      9
     e_shentsize:                 64
     e_shentsize:                 64
     e_shstrndx:                  27
 [+] Section Header Table
     [Nr] Name            Type                Addr    Off   Size Es  Flg  Lk Inf  Al
AddressSanitizer:DEADLYSIGNAL
=================================================================
==193419==ERROR: AddressSanitizer: SEGV on unknown address 0x7f08638c5000 (pc 0x7f0842727231 bp 0x7ffcbf981330 sp 0x7ffcbf980ad8 T0)                                                                        
==193419==The signal is caused by a READ memory access.                                               
    #0 0x7f0842727231  (/lib/x86_64-linux-gnu/libc.so.6+0x15f231)
    #1 0x7f08427c9a8c in __interceptor_strlen ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:368
    #2 0x55862b528026 in parse /home/lys/Tools/elfspirit/parse.c:975
    #3 0x55862b4c5167 in readcmdline /home/lys/Tools/elfspirit/main.c:251
    #4 0x55862b4c5167 in main /home/lys/Tools/elfspirit/main.c:263
    #5 0x7f08425efe49 in __libc_start_main ../csu/libc-start.c:314
    #6 0x55862b4c5d09 in _start (/home/lys/Tools/elfspirit/elfspirit+0x9d09)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x15f231) 
==193419==ABORTING

poc.zip

@liyansong2018 liyansong2018 added the bug Something isn't working label Jan 23, 2022
@liyansong2018 liyansong2018 self-assigned this Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant