iovisor / ubpf

Userspace eBPF VM
Apache License 2.0
814 stars 132 forks source link

Potential dereference of `nullptr` in libfuzzer harness? #489

Open hawkinsw opened 4 months ago

hawkinsw commented 4 months ago

https://github.com/iovisor/ubpf/blob/2868ce441b37a816a066bb0d7890107492571ca4/libfuzzer/libfuzz_harness.cc#L118

According to CPPReference:

If size() is ​0​, data() may or may not return a null pointer.

That could cause a problem here if there is ever a case where the fuzzer generates an empty input. Is this something that we want to protect?