oss-fuzz
oss-fuzz copied to clipboard
OpenVPN:fix leak in fuzzer
By looking at the stacktrace:
#0 0x52312d in malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
#1 0x559593 in gc_malloc /src/openvpn/src/openvpn/buffer.c:395:33
#2 0x5fbfef in init_route_ipv6_list /src/openvpn/src/openvpn/route.c:839:13
#3 0x556372 in LLVMFuzzerTestOneInput /src/fuzz_route.c:141:9
In case 6 of fuzz_route.c, I noticed that the function init_route_ipv6_list(&rl6, opt6, remote_endpoint, 0, &remote_host, c.es, &c) initializes memory space for rl6. gc, but fails to release the allocated memory after the test ends.
Is that a bug in fuzz target or it was intended there?