mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 10:33:52 +01:00
Problem: no dictionaries and seed corpora for fuzzers
Solution: add them and install them where oss-fuzz expects them
This commit is contained in:
parent
60ccf54fa6
commit
c8e62cb2e0
27
Makefile.am
27
Makefile.am
@ -1176,6 +1176,33 @@ endif
|
||||
|
||||
FUZZINGdir = ${prefix}/${FUZZING_INSTALLDIR}
|
||||
FUZZING_PROGRAMS = ${fuzzer_apps}
|
||||
FUZZING_DATA = tests/fuzzer_corpora/endpoint.dict tests/fuzzer_corpora/zmtp.dict \
|
||||
tests/fuzzer_corpora/test_bind_curve_fuzzer.txt tests/fuzzer_corpora/test_bind_null_fuzzer.txt \
|
||||
tests/fuzzer_corpora/test_connect_curve_fuzzer.txt tests/fuzzer_corpora/test_connect_null_fuzzer.txt
|
||||
install-data-hook:
|
||||
$(LN_S) -r -f $(DESTDIR)/$(FUZZINGdir)/endpoint.dict $(DESTDIR)/$(FUZZINGdir)/test_bind_fuzzer.dict
|
||||
$(LN_S) -r -f $(DESTDIR)/$(FUZZINGdir)/endpoint.dict $(DESTDIR)/$(FUZZINGdir)/test_connect_fuzzer.dict
|
||||
$(LN_S) -r -f $(DESTDIR)/$(FUZZINGdir)/zmtp.dict $(DESTDIR)/$(FUZZINGdir)/test_bind_curve_fuzzer.dict
|
||||
$(LN_S) -r -f $(DESTDIR)/$(FUZZINGdir)/zmtp.dict $(DESTDIR)/$(FUZZINGdir)/test_bind_null_fuzzer.dict
|
||||
$(LN_S) -r -f $(DESTDIR)/$(FUZZINGdir)/zmtp.dict $(DESTDIR)/$(FUZZINGdir)/test_connect_curve_fuzzer.dict
|
||||
$(LN_S) -r -f $(DESTDIR)/$(FUZZINGdir)/zmtp.dict $(DESTDIR)/$(FUZZINGdir)/test_connect_null_fuzzer.dict
|
||||
$(shell cat $(DESTDIR)/$(FUZZINGdir)/test_bind_curve_fuzzer.txt | perl -e 'print pack "H*", <STDIN>' > $(DESTDIR)/$(FUZZINGdir)/test_bind_curve_fuzzer.seed; \
|
||||
export fn=$$(cat $(DESTDIR)/$(FUZZINGdir)/test_bind_curve_fuzzer.seed | sha1sum | awk '{print $$1}'); \
|
||||
mv $(DESTDIR)/$(FUZZINGdir)/test_bind_curve_fuzzer.seed $(DESTDIR)/$(FUZZINGdir)/$$fn; \
|
||||
zip -j -m --quiet $(DESTDIR)/$(FUZZINGdir)/test_bind_curve_fuzzer_seed_corpus.zip $(DESTDIR)/$(FUZZINGdir)/$$fn)
|
||||
$(shell cat $(DESTDIR)/$(FUZZINGdir)/test_bind_null_fuzzer.txt | perl -e 'print pack "H*", <STDIN>' > $(DESTDIR)/$(FUZZINGdir)/test_bind_null_fuzzer.seed; \
|
||||
export fn=$$(cat $(DESTDIR)/$(FUZZINGdir)/test_bind_null_fuzzer.seed | sha1sum | awk '{print $$1}'); \
|
||||
mv $(DESTDIR)/$(FUZZINGdir)/test_bind_null_fuzzer.seed $(DESTDIR)/$(FUZZINGdir)/$$fn; \
|
||||
zip -j -m --quiet $(DESTDIR)/$(FUZZINGdir)/test_bind_null_fuzzer_seed_corpus.zip $(DESTDIR)/$(FUZZINGdir)/$$fn)
|
||||
$(shell cat $(DESTDIR)/$(FUZZINGdir)/test_connect_curve_fuzzer.txt | perl -e 'print pack "H*", <STDIN>' > $(DESTDIR)/$(FUZZINGdir)/test_connect_curve_fuzzer.seed; \
|
||||
export fn=$$(cat $(DESTDIR)/$(FUZZINGdir)/test_connect_curve_fuzzer.seed | sha1sum | awk '{print $$1}'); \
|
||||
mv $(DESTDIR)/$(FUZZINGdir)/test_connect_curve_fuzzer.seed $(DESTDIR)/$(FUZZINGdir)/$$fn; \
|
||||
zip -j -m --quiet $(DESTDIR)/$(FUZZINGdir)/test_connect_curve_fuzzer_seed_corpus.zip $(DESTDIR)/$(FUZZINGdir)/$$fn)
|
||||
$(shell cat $(DESTDIR)/$(FUZZINGdir)/test_connect_null_fuzzer.txt | perl -e 'print pack "H*", <STDIN>' > $(DESTDIR)/$(FUZZINGdir)/test_connect_null_fuzzer.seed; \
|
||||
export fn=$$(cat $(DESTDIR)/$(FUZZINGdir)/test_connect_null_fuzzer.seed | sha1sum | awk '{print $$1}'); \
|
||||
mv $(DESTDIR)/$(FUZZINGdir)/test_connect_null_fuzzer.seed $(DESTDIR)/$(FUZZINGdir)/$$fn; \
|
||||
zip -j -m --quiet $(DESTDIR)/$(FUZZINGdir)/test_connect_null_fuzzer_seed_corpus.zip $(DESTDIR)/$(FUZZINGdir)/$$fn)
|
||||
rm -f $(DESTDIR)/$(FUZZINGdir)/*.txt
|
||||
else
|
||||
test_apps += tests/test_bind_null_fuzzer \
|
||||
tests/test_connect_null_fuzzer \
|
||||
|
4
tests/fuzzer_corpora/endpoint.dict
Normal file
4
tests/fuzzer_corpora/endpoint.dict
Normal file
@ -0,0 +1,4 @@
|
||||
ipc="ipc://"
|
||||
inproc="inproc://"
|
||||
tcp="tcp://"
|
||||
udp="udp://"
|
1
tests/fuzzer_corpora/test_bind_curve_fuzzer.txt
Normal file
1
tests/fuzzer_corpora/test_bind_curve_fuzzer.txt
Normal file
@ -0,0 +1 @@
|
||||
ff00000000000000017f03014355525645000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c80548454c4c4f0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a5af606a040b3eb749b38aad3c43ea22f18b1659de5c3db1996b6f880d48e30e000000000000000108706d93931262db2e66acd402ecbe67b85aba0e696fe5d5ada13b14d2ab50917301acbb09f29f85b24c470915951d1ce2973288aca89cda8c484389bba97271a0ded05860f152a5c757b7bdd5849fa206000000000000011408494e495449415445e3d3dd23298ecbdc31d3b471a56f9235701b35296117c8f798a4013f1d3a11d4c4c254b1785ad9cc6f3e01b9387f95468fabe11bd45d73704a9653165e045c2a2baa48130e8d9d9745975fc7600c23679cc044b396a4a7f91c946acf744d072a00000000000000020e56c8aebfb1f9f33f989e76c2cebbe45e0fef500717436e64b53da90ac7d2af3ca8ebd5edbdfb896ed18126d2a4c2836861a935e089503cc5efbfc166b94e504a0cfff64c0410689fd669aa4c1b041cadb21910fe7af4323258461960d969d8c481b47959430732bdb6126d62ddf801b3db7d32c146e5b10bc83cd503fd75badad67e6370c7adb2996a3242b0210e82ef1947ab563a5333a60aaeae9fc7c968c6264a002b074d4553534147450000000000000003cc90b40b5bc78bcb00f8ad69dc162c4b387cf8b9ab2d334455b3a9
|
1
tests/fuzzer_corpora/test_bind_null_fuzzer.txt
Normal file
1
tests/fuzzer_corpora/test_bind_null_fuzzer.txt
Normal file
@ -0,0 +1 @@
|
||||
ff00000000000000017f03014e554c4c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004190552454144590b536f636b65742d5479706500000003535542040a09535542534352494245
|
1
tests/fuzzer_corpora/test_connect_curve_fuzzer.txt
Normal file
1
tests/fuzzer_corpora/test_connect_curve_fuzzer.txt
Normal file
@ -0,0 +1 @@
|
||||
ff00000000000000017f03014355525645000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004a80757454c434f4d45b82e58be6c89e876fd91e236488b8d4bb37846d2cd38e739264ea8ff66ca06f5930d70920b8429505844f064be5d8c977078b8dd135e340cd8c7f276293ebf9c45bd6b240c0d9c15b8fde2defb11f4f49c864695f07c3456e855dd7eef6ee371dbda86b05f3db853781ce741ecacffcc50a7a8176ec8ebd3c2692beb79977b143f90c77a13eee6ed5282ee27ad45f36fd08a31ecd205dfa9e7b6887fe2ea1ccc0432055245414459000000000000000171f53d3270589095cd304baeedfe0a326ed8488d0173dded2dca5b996d0d31e6469d5f4e0026074d4553534147450000000000000002fbb1f34c99e8d2f5a2cb37dfb01b0a74f2d1c0439f5c0026074d455353414745000000000000000388166e23cf25cda98b8b3f635039b468bb222cbfec30
|
1
tests/fuzzer_corpora/test_connect_null_fuzzer.txt
Normal file
1
tests/fuzzer_corpora/test_connect_null_fuzzer.txt
Normal file
@ -0,0 +1 @@
|
||||
ff00000000000000017f03014e554c4c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041a0552454144590b536f636b65742d547970650000000458505542000568656c6c6f0005776f726c64
|
45
tests/fuzzer_corpora/zmtp.dict
Normal file
45
tests/fuzzer_corpora/zmtp.dict
Normal file
@ -0,0 +1,45 @@
|
||||
# ZMTP magic binary streams
|
||||
# 1.0 https://rfc.zeromq.org/spec/13/
|
||||
# 2.0 https://rfc.zeromq.org/spec/15/
|
||||
# 3.1 https://rfc.zeromq.org/spec/37/
|
||||
# curve https://rfc.zeromq.org/spec/26/
|
||||
signature="\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x7F"
|
||||
signature_v1="\x01\x00"
|
||||
version_v2="\x01"
|
||||
version_v3="\x03\x00"
|
||||
version_v3_1="\x03\x01"
|
||||
mechanism_null="\x4E\x55\x4C\x4C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
mechanism_curve="\x43\x55\x52\x56\x45\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
short_command="\x04"
|
||||
long_command="\x06"
|
||||
ready="\x05\x52\x45\x41\x44\x59"
|
||||
error="\x05\x45\x52\x52\x4F\x52"
|
||||
identity="\x08\x49\x64\x65\x6E\x74\x69\x74\x79"
|
||||
socket_type="\x0B\x53\x6F\x63\x6B\x65\x74\x2D\x54\x79\x70\x65"
|
||||
dealer="\x06\x44\x45\x41\x4C\x45\x52"
|
||||
router="\x06\x52\x4F\x55\x54\x45\x52"
|
||||
pub="\x03\x50\x55\x42"
|
||||
sub="\x03\x53\x55\x42"
|
||||
xpub="\x04\x58\x50\x55\x42"
|
||||
xsub="\x04\x58\x53\x55\x42"
|
||||
req="\x03\x52\x45\x51"
|
||||
rep="\x03\x52\x45\x50"
|
||||
push="\x04\x50\x55\x53\x48"
|
||||
pull="\x04\x50\x55\x4C\x4C"
|
||||
pair="\x04\x50\x41\x49\x52"
|
||||
client="\x05\x43\x4C\x49\x45\x4E\x54"
|
||||
server="\x05\x53\x45\x52\x56\x45\x52"
|
||||
radio="\x05\x52\x41\x44\x49\x4F"
|
||||
dish="\x04\x44\x49\x53\x48"
|
||||
scatter="\x06\x53\x43\x41\x54\x54\x45\x52"
|
||||
gather="\x06\x47\x41\x54\x48\x45\x52"
|
||||
subscribe="\x09\x53\x55\x42\x53\x43\x52\x49\x42\x45"
|
||||
cancel="\x06\x43\x41\x4E\x43\x45\x4C"
|
||||
join="\x04\x4A\x4F\x49\x4E"
|
||||
leave="\x05\x43\x41\x4E\x43\x45\x4C"
|
||||
ping="\x04\x50\x49\x4E\x47"
|
||||
pong="\x04\x50\x4F\x4E\x47"
|
||||
hello="\x05\x48\x45\x4C\x4C\x4F\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
welcome="\x07\x57\x45\x4C\x43\x4F\x4D\x45"
|
||||
initiate="\x08\x49\x4E\x49\x54\x49\x41\x54\x45"
|
||||
message="\x07\x4D\x45\x53\x53\x41\x47\x45"
|
Loading…
Reference in New Issue
Block a user