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

memory allocation of 18446744073709551610 bytes failed[1] #30

Closed
p870613 opened this issue Aug 9, 2021 · 4 comments
Closed

memory allocation of 18446744073709551610 bytes failed[1] #30

p870613 opened this issue Aug 9, 2021 · 4 comments

Comments

@p870613
Copy link

p870613 commented Aug 9, 2021

HI !
I found a memory allocation of 18446744073709551610 bytes failed in the current master e232665
POC : poc.zip

$ ./bingrep out/default/crashes/poc 
ELF EXEC EM_UNKNOWN-little-endian @ 0x8049080:

e_phoff: 0x80 e_shoff: 0xc e_flags: 0x10000 e_ehsize: 0 e_phentsize: 3 e_phnum: 0 e_shentsize: 36992 e_shnum: 2 e_shstrndx: 0

ProgramHeaders(0):
  

SectionHeaders(2):
memory allocation of 18446744073709551610 bytes failed[1]    552937 abort      ./bingrep out/default/crashes/poc
@p870613
Copy link
Author

p870613 commented Jan 24, 2022

Assigned CVE-2021-39480.

@m4b
Copy link
Owner

m4b commented Jan 24, 2022

Hello there! thanks for filing, let me see if this is fixed in later goblins, there was some checks done semi recently for sizes being required to be less than size of the binary being analyzed (which I believe is only practical solution to a section claiming it requires X amount of bytes)

@m4b
Copy link
Owner

m4b commented Jan 24, 2022

Ok looks like 0.9.0 doesn't have a bad memory allocation for your POC (it does unfortunately, have an absolutely atrocious error message 😅):

target/release/bingrep poc
bad input invalid utf8 (5)

for reference here is previous output of 0.8.5:

bingrep poc
ELF EXEC EM_UNKNOWN-little-endian @ 0x8049080:

e_phoff: 0x80 e_shoff: 0xc e_flags: 0x10000 e_ehsize: 0 e_phentsize: 3 e_phnum: 0 e_shentsize: 36992 e_shnum: 2 e_shstrndx: 0

ProgramHeaders(0):
  

SectionHeaders(2):
memory allocation of 18446744073709551610 bytes failedAborted (core dumped)

the output is nice(r), the core dump however is not :)

@p870613
Copy link
Author

p870613 commented Feb 8, 2022

That's good.

Thanks !!!

@p870613 p870613 closed this as completed Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants