Hi,
I'm playing fuzzing and I found a stack-overflow issue when parsing a bad json file
Environment: Ubuntu 18.04 + gcc 7.5.0
Poc stack_overflow.zip
Driver program:
// test.cc
#include "tao/json.hpp"
#include "tao/json/contrib/traits.hpp"
int main(int argc, char** argv){
if ( argc != 2 ) return -1;
const tao::json::value v = tao::json::from_file( argv[1] );
return 0;
}
To reproduce:
- Compile the driver program with ASAN:
g++ -fsanitize=address -o harness -std=c++17 -lstdc++fs
- Run poc:
./test ./stack_overflow.json
ASAN says:
There is too much stack information need to attach, so I save the information into a file.
asan_report.txt