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

allocator is out of memory #200

Closed
yangfar opened this issue Aug 3, 2023 · 1 comment
Closed

allocator is out of memory #200

yangfar opened this issue Aug 3, 2023 · 1 comment
Labels

Comments

@yangfar
Copy link

yangfar commented Aug 3, 2023

Describe the issue
When i test the test_tinyexr with afl++, some crashes arose in tinyexr.h:5779.

To Reproduce
Steps to reproduce the behavior:
$ git clone https://github.com/syoyo/tinyexr.git
$ cd tinyext
$ export CFLAGS="-fsanitize=address"
$ export CXXFLAGS="-fsanitize=address"
$ export CC=afl-clang-fast
$ export CXX=afl-clang-fast++
$ export AFL_USE_ASAN=1
$ mkdir build
$ cd build
$ make -j8
Compile TinyEXR with Address Sanitizer

run
./test_tinyexr ./poc

Environment
OS: Ubuntu 20.04.2 LTS
gcc: 9.4.0

Error

`==3255101==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x7989cbf5f0 bytes
#0 0x495e8d in malloc (/home/yzy/fuzzsoftware/tinyexr-release/test_tinyexr+0x495e8d)
#1 0x528c93 in tinyexr::AllocateImage(int, TEXRChannelInfo const*, int const*, int, int, bool*) /home/yzy/fuzzsoftware/tinyexr-release/./tinyexr.h

==3255101==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: AddressSanitizer: out-of-memory (/home/yzy/fuzzsoftware/tinyexr-release/test_tinyexr+0x495e8d) in malloc
==3255101==ABORTING`

Poc

Poc.zip

@syoyo syoyo added the wontfix label Aug 3, 2023
@syoyo
Copy link
Owner

syoyo commented Aug 3, 2023

#198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants