You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
./test_tinyexr poc2
=================================================================
==4164418==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x2005020050 bytes
#0 0x7f511fd0f808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144#1 0x55b4b4b0d48e in AllocateImage /home/lucas/Desktop/oss/tinyexr/tinyexr.h:4304
==4164418==HINT: if you don't care about these errors you may set allocator_may_return_null=1SUMMARY: AddressSanitizer: out-of-memory ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144 in __interceptor_malloc==4164418==ABORTING
./test_tinyexr poc3
=================================================================
==4164446==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x2014008050 bytes
#0 0x7f65de63d808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144#1 0x55e6ebba13e8 in AllocateImage /home/lucas/Desktop/oss/tinyexr/tinyexr.h:4319
==4164446==HINT: if you don't care about these errors you may set allocator_may_return_null=1SUMMARY: AddressSanitizer: out-of-memory ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144 in __interceptor_malloc==4164446==ABORTING
For poc2 and poc3, this is the program is trying to allocate large memory ASAN cannot track(256 GB or more?). #104
Some people want to allocate/create quite large EXR image so there is no easy way to fix it.
Best solution is provide user option to set the upper limit of memory consumption, but it requires API changes. Possible workaround may be use define macro to set the upper limit of memory consumption.
There are three bugs in the tinyexr.h file that I would like to report.
Reproduction
Environment
OS: Ubuntu
20.04.5 LTS
Compiler:
gcc version 9.4.0
version: commit
d5afe84cd1bd029fdeb1aae0e8705b6adfaa49fb
Compile TinyEXR with Address Sanitizer
0x01.SEGV caused by a READ memory access in tinyexr.h:6925
Steps to reproduce the behavior:
POC1:https://github.com/GGb0ndQAQ/POC/blob/main/tinyexr/poc1
Desctiption
1.Compile TinyEXR with Address Sanitizer
2.Run
Here is the trace reported by ASAN:
3.Code in function
IMPACT
Potentially causing DoS and Arbitrary Read
0x02.out of memory in tinyexr.h:4304
Steps to reproduce the behavior:
POC2:https://github.com/GGb0ndQAQ/POC/blob/main/tinyexr/poc2
1.Compile TinyEXR with Address Sanitizer
2.Run
Here is the trace reported by ASAN:
3.Code in function tinyexr.h:4304
IMPACT
Potentially causing DoS
0x03.out of memory in tinyexr.h:4304
Steps to reproduce the behavior:
POC3:https://github.com/GGb0ndQAQ/POC/blob/main/tinyexr/poc3
1.Compile TinyEXR with Address Sanitizer
2.Run
Here is the trace reported by ASAN:
3.Code in function tinyexr.h:4319
IMPACT
Potentially causing DoS
The text was updated successfully, but these errors were encountered: