hcxtools: infinite loop in hcxpcaptool
I’ve been playing around with honggfuzz and found a testcase causing hcxpcaptool to be stuck in an infinite loop.
Steps to reproduce:
$ cat loop.b64
Cg0NCmAAAABNPCsaAQAAAP//////////AgAGAHg4Nl82NAAAAwAYAExpbnV4IDUuMS41LWFyY2gx
LTItQVJDSAQAEQBoY3hkdW1wdG9vbCA1LjEuNQAAAAAAAABgAAAABQAAAAAAAAAAYAAAAAUAAAAA
AAAAAGAAAAAFAAAAKAAAAH8AAAD//wAAAgAJAHdscDBzMjB1MQAAAAAAAA==
$ base64 -d loop.b64 > loop.bin
$ ./hcxpcaptool -o /dev/null loop.bin
reading from loop.bin
This uses up 100% CPU and never ends.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 39 (28 by maintainers)
I managed to add a libfuzzer test. After I clean up my fuzzing code a bit I’ll push it somewhere to look at and maybe integrate it into oss-fuzz hongfuzz was able to test ~30k cases per second on a i7-5600U notebook CPU. This found another infinite loop and a crash due to a stack buffer overflow.