├── .gitignore ├── 3rdparty └── cc-func-parser-0.5-jar-with-dependencies.jar ├── LICENSE ├── README.md ├── apiusage ├── __init__.py ├── libAPIDocManualCollector.py ├── libAPIUsage.py ├── libContainerWrapper.py ├── libProjAnalyzer.py └── libSourceGraph.py ├── cfgs.py ├── doc ├── demo │ ├── demo.cast │ ├── demo.svg │ └── memo.md ├── technical_overview.md └── tested_apis.md ├── examples ├── gpt-3.5-turbo-0301 │ ├── bind9_dns_message_parse.c │ ├── bind9_dns_name_fromtext.c │ ├── bind9_dns_name_fromwire.c │ ├── bind9_isc_lex_gettoken.c │ ├── coturn_stun_check_message_integrity_str.c │ ├── coturn_stun_is_binding_response.c │ ├── coturn_stun_is_command_message.c │ ├── coturn_stun_is_command_message_full_check_str.c │ ├── coturn_stun_is_response.c │ ├── coturn_stun_is_success_response.c │ ├── croaring_roaring_bitmap_portable_deserialize_safe.c │ ├── gdk-pixbuf_gdk_pixbuf_animation_new_from_file.c │ ├── gdk-pixbuf_gdk_pixbuf_new_from_data.c │ ├── gdk-pixbuf_gdk_pixbuf_new_from_file.c │ ├── gdk-pixbuf_gdk_pixbuf_new_from_file_at_scale.c │ ├── gdk-pixbuf_gdk_pixbuf_new_from_stream.c │ ├── hiredis_redisFormatCommand.c │ ├── igraph_igraph_all_minimal_st_separators.c │ ├── igraph_igraph_automorphism_group.c │ ├── igraph_igraph_minimum_size_separators.c │ ├── igraph_igraph_read_graph_dl.c │ ├── igraph_igraph_read_graph_edgelist.c │ ├── igraph_igraph_read_graph_gml.c │ ├── igraph_igraph_read_graph_graphdb.c │ ├── igraph_igraph_read_graph_graphml.c │ ├── igraph_igraph_read_graph_lgl.c │ ├── igraph_igraph_read_graph_ncol.c │ ├── igraph_igraph_read_graph_pajek.c │ ├── inchi_GetINCHIKeyFromINCHI.c │ ├── inchi_GetINCHIfromINCHI.c │ ├── inchi_GetStructFromINCHI.c │ ├── kamailio_get_src_address_socket.c │ ├── kamailio_get_src_uri.c │ ├── kamailio_parse_content_disposition.c │ ├── kamailio_parse_diversion_header.c │ ├── kamailio_parse_from_header.c │ ├── kamailio_parse_identityinfo_header.c │ ├── kamailio_parse_msg.c │ ├── kamailio_parse_pai_header.c │ ├── kamailio_parse_record_route_headers.c │ ├── kamailio_parse_refer_to_header.c │ ├── kamailio_parse_route_headers.c │ ├── kamailio_parse_uri.c │ ├── libbpf_bpf_object__open_mem.c │ ├── libdwarf_dwarf_init_b.c │ ├── libdwarf_dwarf_init_path.c │ ├── libiec61850_MmsValue_decodeMmsData.c │ ├── liblouis_lou_compileString.c │ ├── libpg_query_pg_query_parse.c │ ├── libucl_ucl_parser_add_string.c │ ├── libyang_lyd_parse_data_mem.c │ ├── libyang_lys_parse_mem.c │ ├── libzip_zip_fread.c │ ├── lua_luaL_loadbufferx.c │ ├── md4c_md_html.c │ ├── oniguruma_onig_new.c │ ├── pjsip_pj_json_parse.c │ ├── pjsip_pj_stun_msg_decode.c │ ├── pjsip_pj_xml_parse.c │ ├── pjsip_pjmedia_sdp_parse.c │ ├── pjsip_pjsip_parse_msg.c │ ├── proftpd_pr_json_object_from_text.c │ ├── quickjs_JS_Eval.c │ ├── selinux_cil_compile.c │ ├── selinux_policydb_read.c │ ├── spdk_spdk_json_parse.c │ └── w3m_wc_Str_conv_with_detect.c └── gpt-4-0314 │ ├── bind9_dns_message_checksig.c │ ├── bind9_dns_message_parse.c │ ├── bind9_dns_name_fromtext.c │ ├── bind9_dns_name_fromwire.c │ ├── bind9_dns_rdata_fromtext.c │ ├── bind9_dns_rdata_fromwire.c │ ├── bind9_isc_lex_getmastertoken.c │ ├── bind9_isc_lex_gettoken.c │ ├── coturn_stun_check_message_integrity_str.c │ ├── coturn_stun_is_binding_response.c │ ├── coturn_stun_is_command_message.c │ ├── coturn_stun_is_command_message_full_check_str.c │ ├── coturn_stun_is_response.c │ ├── coturn_stun_is_success_response.c │ ├── croaring_roaring_bitmap_portable_deserialize_safe.c │ ├── gdk-pixbuf_gdk_pixbuf_animation_new_from_file.c │ ├── gdk-pixbuf_gdk_pixbuf_new_from_data.c │ ├── gdk-pixbuf_gdk_pixbuf_new_from_file.c │ ├── gdk-pixbuf_gdk_pixbuf_new_from_file_at_scale.c │ ├── gdk-pixbuf_gdk_pixbuf_new_from_stream.c │ ├── gpac_gf_isom_open_file.c │ ├── hiredis_redisFormatCommand.c │ ├── igraph_igraph_all_minimal_st_separators.c │ ├── igraph_igraph_automorphism_group.c │ ├── igraph_igraph_minimum_size_separators.c │ ├── igraph_igraph_read_graph_dl.c │ ├── igraph_igraph_read_graph_edgelist.c │ ├── igraph_igraph_read_graph_gml.c │ ├── igraph_igraph_read_graph_graphdb.c │ ├── igraph_igraph_read_graph_graphml.c │ ├── igraph_igraph_read_graph_lgl.c │ ├── igraph_igraph_read_graph_ncol.c │ ├── igraph_igraph_read_graph_pajek.c │ ├── inchi_GetINCHIKeyFromINCHI.c │ ├── inchi_GetINCHIfromINCHI.c │ ├── inchi_GetStructFromINCHI.c │ ├── kamailio_get_src_address_socket.c │ ├── kamailio_get_src_uri.c │ ├── kamailio_parse_content_disposition.c │ ├── kamailio_parse_diversion_header.c │ ├── kamailio_parse_from_uri.c │ ├── kamailio_parse_headers.c │ ├── kamailio_parse_identityinfo_header.c │ ├── kamailio_parse_msg.c │ ├── kamailio_parse_pai_header.c │ ├── kamailio_parse_privacy.c │ ├── kamailio_parse_record_route_headers.c │ ├── kamailio_parse_refer_to_header.c │ ├── kamailio_parse_route_headers.c │ ├── kamailio_parse_to_header.c │ ├── kamailio_parse_to_uri.c │ ├── kamailio_parse_uri.c │ ├── libbpf_bpf_object__open_mem.c │ ├── libdwarf_dwarf_init_b.c │ ├── libdwarf_dwarf_init_path.c │ ├── libiec61850_MmsValue_decodeMmsData.c │ ├── liblouis_lou_compileString.c │ ├── libpg_query_pg_query_parse.c │ ├── libucl_ucl_parser_add_string.c │ ├── libyang_lyd_parse_data_mem.c │ ├── libyang_lys_parse_mem.c │ ├── libzip_zip_fread.c │ ├── lua_luaL_loadbufferx.c │ ├── md4c_md_html.c │ ├── oniguruma_onig_new.c │ ├── pjsip_pj_json_parse.c │ ├── pjsip_pj_stun_msg_decode.c │ ├── pjsip_pj_xml_parse.c │ ├── pjsip_pjmedia_sdp_parse.c │ ├── pjsip_pjsip_parse_msg.c │ ├── proftpd_pr_json_object_from_text.c │ ├── quickjs_JS_Eval.c │ ├── quickjs_lre_compile.c │ ├── selinux_cil_compile.c │ ├── selinux_policydb_read.c │ ├── spdk_spdk_json_parse.c │ └── w3m_wc_Str_conv_with_detect.c ├── genQueries.py ├── generation ├── __init__.py ├── libGPTResultPostProcess.py ├── libImprovePrompt.py ├── libIterative.py ├── libPrompt.py └── libQuery.py ├── install-pre.sh ├── jsonOps.py ├── libTarget.py ├── logging.conf ├── main.py ├── meta ├── benchapidata.json └── benchmarkapis.json ├── ossfuzz-targets ├── README.md ├── addTarget.sh ├── apache-httpd │ ├── SKIP │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── avahi │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── bind9 │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── bluez │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── brotli │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── capstone │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── casync │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── civetweb │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── cjson │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── cmark │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── coturn │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── croaring │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── cups │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── cyclonedds │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── dovecot │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── e2fsprogs │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── fribidi │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── gdbm │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── gdk-pixbuf │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── genYml.sh ├── gpac │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── h3 │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── hiredis │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── hoextdown │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── htslib │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── igraph │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── inchi │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── janet │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── jansson │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── janus-gateway │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── kamailio │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── krb5 │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── lcms │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libarchive │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libass │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libavif │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libbpf │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libcbor │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libcoap │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libdwarf │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libevent │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libexif │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libfido2 │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libgd │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libical │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libiec61850 │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libjpeg-turbo │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── liblouis │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libmodbus │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libpcap │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libpg_query │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libplist │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libpng │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── librdkafka │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libredwg │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libressl │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libsndfile │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libsodium │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libspng │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libsrtp │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libssh │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libssh2 │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libtpms │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libucl │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libusb │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libvips │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libvnc │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libwebsockets │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libxls │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libyaml │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libyang │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── libzip │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── lighttpd │ ├── SKIP │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── listFuzzdriver.sh ├── listTarget.sh ├── lldpd │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── llhttp │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── lua │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── lwan │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── lz4 │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── mbedtls │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── md4c │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── mdbtools │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── miniz │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── minizip │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── msquic │ ├── SKIP │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── ndpi │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── netcdf │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── njs │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── oniguruma │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── openexr │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── openjpeg │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── opensips │ ├── SKIP │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── opusfile │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── ostree │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── p11-kit │ ├── SKIP │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── picotls │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── pidgin │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── pjsip │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── postfix │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── proftpd │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── protobuf-c │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── pupnp │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── pycryptodome │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── quickjs │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── readstat │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── ruby │ ├── SKIP │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── samba │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── selinux │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── sleuthkit │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── sound-open-firmware │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── spdk │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── sudoers │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── template │ ├── SKIP │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── tidy-html5 │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── tmux │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── unbound │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── unicorn │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── unit │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── uriparser │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── utf8proc │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── varnish │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── vlc │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── w3m │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── wasm3 │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── wavpack │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── wolfmqtt │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── zlib │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── zstd │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh └── zydis │ ├── cfg.yml │ └── fuzzdrivergpt_build.sh ├── prepareOSSFuzzImage.py ├── requirements.txt ├── utils.py ├── validateQueries.py ├── validation ├── __init__.py ├── libSemanticChecker.py ├── libVR.py └── libValidator.py └── yml └── c.yml /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | openaikey.txt 3 | apikey.txt 4 | venv 5 | meta/crawled_usage.json 6 | 3rdparty/jdk-19.0.2 7 | openjdk-19.0.2_linux-x64_bin.tar.gz 8 | test_round*.json 9 | workdir 10 | input_queries.json 11 | -------------------------------------------------------------------------------- /3rdparty/cc-func-parser-0.5-jar-with-dependencies.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/occia/fuzzdrivergpt/35b0e957a61be8bd506017cda621a50e75f5acdb/3rdparty/cc-func-parser-0.5-jar-with-dependencies.jar -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Cen Zhang 4 | 5 | This software is designed for educational purposes and the author does not 6 | condone any illegal use. 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | -------------------------------------------------------------------------------- /apiusage/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/occia/fuzzdrivergpt/35b0e957a61be8bd506017cda621a50e75f5acdb/apiusage/__init__.py -------------------------------------------------------------------------------- /doc/demo/memo.md: -------------------------------------------------------------------------------- 1 | # Record Demo 2 | ```bash 3 | # start record 4 | asciinema rec doc/demo/demo.cast 5 | 6 | # demo operations 7 | #... 8 | 9 | # end record 10 | exit 11 | ``` 12 | 13 | # Convert to SVG 14 | 15 | ```bash 16 | cat doc/demo/demo.cast | svg-term --window --width 120 --height 30 --out doc/demo/demo.svg 17 | ``` 18 | -------------------------------------------------------------------------------- /examples/gpt-4-0314/igraph_igraph_read_graph_gml.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "igraph/igraph.h" 8 | 9 | // The following is a fuzz driver written in C language, complete the implementation. Output the continued code in reply only. 10 | 11 | #include "igraph/igraph_foreign.h" 12 | 13 | //extern igraph_error_t igraph_read_graph_gml(igraph_t * graph,FILE * instream); 14 | 15 | // the following function fuzzes igraph_read_graph_gml 16 | extern int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { 17 | if (Size == 0) { 18 | return 0; 19 | } 20 | 21 | FILE *InStream = fmemopen((void *)Data, Size, "rb"); 22 | if (!InStream) { 23 | return 0; 24 | } 25 | 26 | igraph_t graph; 27 | igraph_empty(&graph, 0, IGRAPH_UNDIRECTED); 28 | 29 | igraph_error_handler_t *old_handler = igraph_set_error_handler(igraph_error_handler_ignore); 30 | igraph_warning_handler_t *old_warning_handler = igraph_set_warning_handler(igraph_warning_handler_ignore); 31 | 32 | igraph_read_graph_gml(&graph, InStream); 33 | 34 | igraph_destroy(&graph); 35 | fclose(InStream); 36 | 37 | igraph_set_error_handler(old_handler); 38 | igraph_set_warning_handler(old_warning_handler); 39 | 40 | return 0; 41 | } -------------------------------------------------------------------------------- /examples/gpt-4-0314/libbpf_bpf_object__open_mem.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | // The following is a fuzz driver written in C language, complete the implementation. Output the continued code in reply only. 14 | 15 | #include "bpf/libbpf.h" 16 | 17 | // @ examples of API usage from test_package.c-main 18 | // int main(int argc, char** argv) 19 | // { 20 | // const char buffer[1] = { '\0' }; 21 | // struct bpf_object* obj = bpf_object__open_mem(buffer, 1, NULL); 22 | // bpf_object__close(obj); 23 | // return 0; 24 | // } 25 | 26 | //extern void bpf_object__close(struct bpf_object * object); 27 | //extern struct bpf_object * bpf_object__open_mem(const void * obj_buf,size_t obj_buf_sz,const struct bpf_object_open_opts * opts); 28 | 29 | // the following function fuzzes bpf_object__open_mem based on the above API usages 30 | extern int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { 31 | const char buffer[Size]; 32 | memcpy(buffer, Data, Size); 33 | 34 | struct bpf_object* obj = bpf_object__open_mem(buffer, Size, NULL); 35 | bpf_object__close(obj); 36 | 37 | return 0; 38 | } -------------------------------------------------------------------------------- /examples/gpt-4-0314/libpg_query_pg_query_parse.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | // The following is a fuzz driver written in C language, complete the implementation. Output the continued code in reply only. 11 | 12 | #include "pg_query.h" 13 | 14 | // @ examples of API usage from pg_query_helper.c-get_sql 15 | // PgQueryParseResult * get_sql (const char * sql) { 16 | // PgQueryParseResult * result = malloc (sizeof (PgQueryParseResult)); 17 | // *result = pg_query_parse(sql); 18 | // return result; 19 | // } 20 | 21 | //extern PgQueryParseResult pg_query_parse(const char * input); 22 | 23 | // the following function fuzzes pg_query_parse based on the above API usages 24 | extern int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { 25 | if (Size <= 0) { 26 | return 0; 27 | } 28 | 29 | // Make sure the data is a null-terminated string 30 | char *input = (char *)malloc(Size + 1); 31 | memcpy(input, Data, Size); 32 | input[Size] = '\0'; 33 | 34 | // Call the PgQueryParseResult function with the input data 35 | PgQueryParseResult result = pg_query_parse(input); 36 | 37 | // Free the input buffer and call the parse result free function 38 | free(input); 39 | pg_query_free_parse_result(result); 40 | 41 | return 0; 42 | } -------------------------------------------------------------------------------- /generation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/occia/fuzzdrivergpt/35b0e957a61be8bd506017cda621a50e75f5acdb/generation/__init__.py -------------------------------------------------------------------------------- /jsonOps.py: -------------------------------------------------------------------------------- 1 | import json 2 | import sys 3 | 4 | def printDriverCode(jsonfile, qid): 5 | with open(jsonfile, 'r') as f: 6 | data = json.load(f) 7 | info = data[qid] 8 | #print(info['result']['validations'][0]['code']) 9 | print(info['result']['solutions'][0]) 10 | 11 | if __name__ == '__main__': 12 | jsonfile, qid = sys.argv[1], sys.argv[2] 13 | printDriverCode(jsonfile, qid) 14 | -------------------------------------------------------------------------------- /logging.conf: -------------------------------------------------------------------------------- 1 | [loggers] 2 | keys=root 3 | 4 | [handlers] 5 | keys=consoleHandler 6 | 7 | [formatters] 8 | keys=simpleFormatter 9 | 10 | [logger_root] 11 | level=INFO 12 | #level=DEBUG 13 | propagate=1 14 | handlers=consoleHandler 15 | 16 | [handler_consoleHandler] 17 | class=StreamHandler 18 | level=INFO 19 | #level=DEBUG 20 | formatter=simpleFormatter 21 | args=(sys.stdout,) 22 | 23 | [formatter_simpleFormatter] 24 | format=[%(levelname)s] %(message)s 25 | datefmt= 26 | -------------------------------------------------------------------------------- /ossfuzz-targets/README.md: -------------------------------------------------------------------------------- 1 | # make a new C target project of oss-fuzz 2 | 3 | ``` 4 | cd ./ossfuzz-targets 5 | bash add_target.sh xxx 6 | # manually modify the cfg.yml & fuzzdrivergpt_build.sh 7 | ``` -------------------------------------------------------------------------------- /ossfuzz-targets/addTarget.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #set -xe 4 | set -e 5 | 6 | if [ $# -ne 1 ] 7 | then 8 | echo "wrong usage, you should use it as: bash add_target.sh xxx" 9 | exit 1 10 | fi 11 | 12 | target=$1 13 | 14 | if [ -d "$target" ] 15 | then 16 | echo "$target already exists" 17 | exit 1 18 | else 19 | cp -r template $target 20 | sed -i 's/TEMPLATE/'${target}'/g' ${target}/cfg.yml 21 | sed -i 's/template/'${target}'/g' ${target}/fuzzdrivergpt_build.sh 22 | echo "$target has been prepared" 23 | fi -------------------------------------------------------------------------------- /ossfuzz-targets/apache-httpd/SKIP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/occia/fuzzdrivergpt/35b0e957a61be8bd506017cda621a50e75f5acdb/ossfuzz-targets/apache-httpd/SKIP -------------------------------------------------------------------------------- /ossfuzz-targets/apache-httpd/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | # FILL HERE 20 | cat >> /src/build.sh << 'EOF' 21 | make clean 22 | ./configure --with-included-apr --enable-pool-debug --prefix=/src/httpd/fuzzdrivergpt-install 23 | make install 24 | EOF 25 | set +eux 26 | 27 | # 28 | # do what should be done in build_fuzzers command 29 | # 30 | compile 31 | # 32 | # 33 | # 34 | 35 | ########## 36 | ## After compile, you can prepare the include/lib staff here 37 | ########## 38 | 39 | set -eux 40 | 41 | INSTALL=/root/workspace/fuzzdrivergpt/install 42 | mkdir -p ${INSTALL} 43 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 44 | cp -r /src/httpd/fuzzdrivergpt-install/include ${INSTALL}/include 45 | 46 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 47 | cp -r /src/httpd/fuzzdrivergpt-install/lib ${INSTALL}/lib 48 | -------------------------------------------------------------------------------- /ossfuzz-targets/avahi/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | EOF 16 | set +eux 17 | 18 | # 19 | # do what should be done in build_fuzzers command 20 | # 21 | compile 22 | # 23 | # 24 | # 25 | 26 | ########## 27 | ## After compile, you can prepare the include/lib staff here 28 | ########## 29 | 30 | set -eux 31 | 32 | ########## 33 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 34 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 35 | ########## 36 | #while true 37 | #do 38 | # sleep 1h 39 | #done 40 | # 41 | # 42 | #INSTALL=/root/workspace/fuzzdrivergpt/install 43 | #mkdir -p ${INSTALL} 44 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 45 | #cp -r /src/avahi/fuzzdrivergpt-install/include ${INSTALL}/include 46 | # 47 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 48 | #cp -r /src/avahi/fuzzdrivergpt-install/lib ${INSTALL}/lib 49 | -------------------------------------------------------------------------------- /ossfuzz-targets/bind9/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | # FILL HERE 20 | cat >> /src/build.sh << 'EOF' 21 | cd /src/bind9 22 | make clean 23 | ./configure --disable-shared --enable-static --enable-developer --without-cmocka --without-zlib --prefix=/src/bind9/fuzzdrivergpt-install 24 | make install 25 | 26 | EOF 27 | set +eux 28 | 29 | # 30 | # do what should be done in build_fuzzers command 31 | # 32 | compile 33 | # 34 | # 35 | # 36 | 37 | ########## 38 | ## After compile, you can prepare the include/lib staff here 39 | ########## 40 | 41 | set -eux 42 | 43 | INSTALL=/root/workspace/fuzzdrivergpt/install 44 | mkdir -p ${INSTALL} 45 | #while true 46 | #do 47 | # sleep 1h 48 | #done 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/bind9/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/bind9/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/bluez/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | 8 | 9 | ########## 10 | ## Before compile, you can modify build.sh for eaiser preparation here 11 | ########## 12 | # install libclang for our python usage, do this for all oss-fuzz projects 13 | pip3 install libclang 14 | 15 | set -eux 16 | # FILL HERE 17 | cat >> /src/build.sh << 'EOF' 18 | cd /src/bluez 19 | make clean 20 | ./configure --prefix=/src/bluez/fuzzdrivergpt-install --enable-library 21 | make install 22 | EOF 23 | set +eux 24 | 25 | # 26 | # do what should be done in build_fuzzers command 27 | # 28 | compile 29 | # 30 | # 31 | # 32 | 33 | ########## 34 | ## After compile, you can prepare the include/lib staff here 35 | ########## 36 | 37 | set -eux 38 | #while true 39 | #do 40 | # sleep 1h 41 | #done 42 | INSTALL=/root/workspace/fuzzdrivergpt/install 43 | mkdir -p ${INSTALL} 44 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 45 | cp -r /src/bluez/fuzzdrivergpt-install/include ${INSTALL}/include 46 | 47 | 48 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 49 | cp -r /src/bluez/fuzzdrivergpt-install/lib ${INSTALL}/lib 50 | cp /src/bluez/lib/.libs/libbluetooth-internal.a ${INSTALL}/lib/libbluetooth-internal.a -------------------------------------------------------------------------------- /ossfuzz-targets/brotli/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | 18 | cat >> /src/build.sh << 'EOF' 19 | 20 | cd /src/brotli 21 | cmake . -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF --install-prefix=/src/brotli/fuzzdrivergpt-install 22 | make clean 23 | make -j$(nproc) brotlidec 24 | make -j$(nproc) install 25 | 26 | EOF 27 | set +eux 28 | 29 | # 30 | # do what should be done in build_fuzzers command 31 | # 32 | compile 33 | # 34 | # 35 | # 36 | 37 | ########## 38 | ## After compile, you can prepare the include/lib staff here 39 | ########## 40 | 41 | set -eux 42 | 43 | ########## 44 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 45 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 46 | ########## 47 | 48 | 49 | INSTALL=/root/workspace/fuzzdrivergpt/install 50 | mkdir -p ${INSTALL} 51 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 52 | cp -r /src/brotli/fuzzdrivergpt-install/include ${INSTALL}/include 53 | 54 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 55 | cp -r /src/brotli/fuzzdrivergpt-install/lib ${INSTALL}/lib 56 | -------------------------------------------------------------------------------- /ossfuzz-targets/capstone/cfg.yml: -------------------------------------------------------------------------------- 1 | capstone: 2 | language: "c" 3 | image: "fuzzdrivergpt/capstone:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '#include "capstone/capstone.h"\n' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libcapstone.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE /src/capstonenext/libcapstone.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/capstonenext/suite/fuzz/fuzz_decode_platform.c","/src/capstonenext/suite/fuzz/fuzz_diff.c","/src/capstonenext/suite/fuzz/fuzz_disasm.c","/src/capstonenext/suite/fuzz/fuzz_harness.c" ] 12 | 13 | #clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ CMakeFiles/fuzz_disasm.dir/suite/fuzz/fuzz_disasm.c.o CMakeFiles/fuzz_disasm.dir/suite/fuzz/platform.c.o -o /out/fuzz_disasmnext libcapstone.a -fsanitize=fuzzer -------------------------------------------------------------------------------- /ossfuzz-targets/capstone/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/capstonenext 16 | mkdir build1 17 | cd build1 18 | cmake -DCAPSTONE_BUILD_SHARED=0 --install-prefix=/src/capstone/fuzzdrivergpt-install .. 19 | make -j$(nproc) install 20 | 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | ########## 39 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 40 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 41 | ########## 42 | #while true 43 | #do 44 | # sleep 1h 45 | #done 46 | 47 | 48 | INSTALL=/root/workspace/fuzzdrivergpt/install 49 | mkdir -p ${INSTALL} 50 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 51 | cp -r /src/capstone/fuzzdrivergpt-install/include ${INSTALL}/include 52 | 53 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 54 | cp -r /src/capstone/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/casync/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/casync/tools/oss-fuzz.sh << 'EOF' 14 | set -x 15 | #cd /src/casync 16 | #meson $build -D$fuzzflag \ 17 | # -Db_lundef=false \ 18 | # -Dlibzstd=disabled \ 19 | # -Dman=false --prefix=/src/casync/fuzzdrivergpt-install 20 | #ninja --verbose -C $build fuzzers 21 | #ninja -C $build install 22 | 23 | 24 | EOF 25 | set +eux 26 | #while true 27 | #do 28 | # sleep 1h 29 | #done 30 | # 31 | # do what should be done in build_fuzzers command 32 | # 33 | compile 34 | # 35 | # 36 | # 37 | 38 | ########## 39 | ## After compile, you can prepare the include/lib staff here 40 | ########## 41 | 42 | set -eux 43 | 44 | ########## 45 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 46 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 47 | ########## 48 | 49 | 50 | 51 | #INSTALL=/root/workspace/fuzzdrivergpt/install 52 | #mkdir -p ${INSTALL} 53 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 54 | #cp -r /src/casync/fuzzdrivergpt-install/include ${INSTALL}/include 55 | # 56 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 57 | #cp -r /src/casync/fuzzdrivergpt-install/lib ${INSTALL}/lib 58 | -------------------------------------------------------------------------------- /ossfuzz-targets/civetweb/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | # /src/civetweb/fuzztest/build.sh 14 | cat >> /src/build.sh << 'EOF' 15 | make clean 16 | make install-headers install-lib install PREFIX=/src/civetweb/fuzzdrivergpt-install 17 | EOF 18 | set +eux 19 | 20 | # 21 | # do what should be done in build_fuzzers command 22 | # 23 | compile 24 | # 25 | # 26 | # 27 | 28 | ########## 29 | ## After compile, you can prepare the include/lib staff here 30 | ########## 31 | 32 | set -eux 33 | 34 | ########## 35 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 36 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 37 | ########## 38 | #while true 39 | #do 40 | # sleep 1h 41 | #done 42 | 43 | 44 | INSTALL=/root/workspace/fuzzdrivergpt/install 45 | mkdir -p ${INSTALL} 46 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 47 | cp -r /src/civetweb/fuzzdrivergpt-install/include ${INSTALL}/include 48 | 49 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 50 | cp -r /src/civetweb/fuzzdrivergpt-install/lib ${INSTALL}/lib 51 | -------------------------------------------------------------------------------- /ossfuzz-targets/cjson/cfg.yml: -------------------------------------------------------------------------------- 1 | cjson: 2 | language: "c" 3 | image: "fuzzdrivergpt/cjson:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libcjson.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE /src/cjson/build/libcjson.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/cjson/fuzzing/cjson_read_fuzzer.c" ] 12 | 13 | #++ clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ /src/cjson/fuzzing/cjson_read_fuzzer.c -I. -o /out/cjson_read_fuzzer -fsanitize=fuzzer /src/cjson/build/libcjson.a -------------------------------------------------------------------------------- /ossfuzz-targets/cjson/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/cjson 16 | mkdir build1 17 | cd build1 18 | cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_CJSON_TEST=OFF -DCMAKE_VERBOSE_MAKEFILE=ON --install-prefix=/src/cjson/fuzzdrivergpt-install .. 19 | make -j$(nproc) install 20 | 21 | 22 | EOF 23 | set +eux 24 | 25 | # 26 | # do what should be done in build_fuzzers command 27 | # 28 | compile 29 | # 30 | # 31 | # 32 | 33 | ########## 34 | ## After compile, you can prepare the include/lib staff here 35 | ########## 36 | 37 | set -eux 38 | 39 | ########## 40 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 41 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 42 | ########## 43 | #while true 44 | #do 45 | # sleep 1h 46 | #done 47 | # 48 | 49 | INSTALL=/root/workspace/fuzzdrivergpt/install 50 | mkdir -p ${INSTALL} 51 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 52 | cp -r /src/cjson/fuzzdrivergpt-install/include ${INSTALL}/include 53 | 54 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 55 | cp -r /src/cjson/fuzzdrivergpt-install/lib ${INSTALL}/lib 56 | -------------------------------------------------------------------------------- /ossfuzz-targets/cmark/cfg.yml: -------------------------------------------------------------------------------- 1 | cmark: 2 | language: "c" 3 | image: "fuzzdrivergpt/cmark:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/cmark.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE -lFuzzingEngine /src/cmark/build/src/libcmark.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/cmark/test/cmark-fuzz.c" ] 12 | 13 | # clang -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -Isrc -Ibuild/src -c /src/cmark/test/cmark-fuzz.c -o cmark_fuzzer.o 14 | #+ clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -lFuzzingEngine cmark_fuzzer.o build/src/libcmark.a -o /out/cmark_fuzzer -------------------------------------------------------------------------------- /ossfuzz-targets/cmark/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/cmark 16 | mkdir build1 17 | cd build1 18 | cmake -DCMAKE_INSTALL_PREFIX=/src/cmark/fuzzdrivergpt-install .. 19 | make -j$(nproc) install 20 | 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | ########## 39 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 40 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 41 | ########## 42 | #while true 43 | #do 44 | # sleep 1h 45 | #done 46 | 47 | 48 | INSTALL=/root/workspace/fuzzdrivergpt/install 49 | mkdir -p ${INSTALL} 50 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 51 | cp -r /src/cmark/fuzzdrivergpt-install/include ${INSTALL}/include 52 | 53 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 54 | cp -r /src/cmark/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/coturn/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/coturn/my_build 15 | cmake -DFUZZER=ON -DLIB_FUZZING_ENGINE="$LIB_FUZZING_ENGINE" -DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath,'\$ORIGIN/lib'" -DWITH_MYSQL=OFF -Wno-dev --install-prefix /src/coturn/fuzzdrivergpt-install ../. 16 | make install 17 | EOF 18 | set +eux 19 | 20 | # 21 | # do what should be done in build_fuzzers command 22 | # 23 | compile 24 | # 25 | # 26 | # 27 | 28 | ########## 29 | ## After compile, you can prepare the include/lib staff here 30 | ########## 31 | 32 | set -eux 33 | 34 | ########## 35 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 36 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 37 | ########## 38 | #while true 39 | #do 40 | # sleep 1h 41 | #done 42 | 43 | 44 | INSTALL=/root/workspace/fuzzdrivergpt/install 45 | mkdir -p ${INSTALL} 46 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 47 | cp -r /src/coturn/fuzzdrivergpt-install/include ${INSTALL}/include 48 | 49 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 50 | cp -r /src/coturn/fuzzdrivergpt-install/lib ${INSTALL}/lib 51 | cp -r /out/lib/* ${INSTALL}/lib -------------------------------------------------------------------------------- /ossfuzz-targets/croaring/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | 16 | cmake --install-prefix /src/croaring/fuzzdrivergpt-install .. 17 | make install 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/croaring/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/croaring/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/cups/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/cups 16 | make clean 17 | ./configure --enable-static --disable-shared --with-dnssd=no --prefix=/src/cups/fuzzdrivergpt-install 18 | make install 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/cups/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/cups/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | cp -r /src/cups/fuzzdrivergpt-install/lib64 ${INSTALL}/lib64 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/cyclonedds/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/cyclonedds/build 16 | rm -rf ./* 17 | cmake -DBUILD_IDLC=ON -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_EXAMPLES=NO -DENABLE_SECURITY=NO -DENABLE_SSL=NO -DCMAKE_INSTALL_PREFIX=/src/cyclonedds/fuzzdrivergpt-install .. 18 | cmake --build . 19 | cmake --build . --target install 20 | cd .. 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | ########## 39 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 40 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 41 | ########## 42 | #while true 43 | #do 44 | # sleep 1h 45 | #done 46 | 47 | 48 | INSTALL=/root/workspace/fuzzdrivergpt/install 49 | mkdir -p ${INSTALL} 50 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 51 | cp -r /src/cyclonedds/fuzzdrivergpt-install/include ${INSTALL}/include 52 | 53 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 54 | cp -r /src/cyclonedds/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/dovecot/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | make clean 16 | ./configure PANDOC=false --with-fuzzer=clang --prefix=/src/dovecot/fuzzdrivergpt-install 17 | make install 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | # 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/dovecot/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/dovecot/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/e2fsprogs/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/e2fsprogs 16 | make clean 17 | ./configure --prefix=/src/e2fsprogs/fuzzdrivergpt-install 18 | make -j36 install 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/e2fsprogs/include ${INSTALL}/include 50 | cp -r /src/e2fsprogs/lib ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/e2fsprogs/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | cp -r /src/e2fsprogs/lib ${INSTALL}/lib -------------------------------------------------------------------------------- /ossfuzz-targets/fribidi/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | pip uninstall meson 11 | pip install meson 12 | 13 | set -eux 14 | # FILL HERE 15 | cat >> /src/build.sh << 'EOF' 16 | cd /src/fribidi 17 | apt install -y libtool 18 | ./autogen.sh 19 | ./configure --prefix=/src/fribidi/fuzzdrivergpt-install --enable-static 20 | make install -j$(nproc) 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | ########## 39 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 40 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 41 | ########## 42 | #while true 43 | #do 44 | # sleep 1h 45 | #done 46 | 47 | 48 | INSTALL=/root/workspace/fuzzdrivergpt/install 49 | mkdir -p ${INSTALL} 50 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 51 | cp -r /src/fribidi/fuzzdrivergpt-install/include ${INSTALL}/include 52 | 53 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 54 | cp -r /src/fribidi/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/gdbm/cfg.yml: -------------------------------------------------------------------------------- 1 | gdbm: 2 | language: "c" 3 | image: "fuzzdrivergpt/gdbm:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libgdbm.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link","-I/root/workspace/fuzzdrivergpt/install/include" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libgdbm.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/gdbm/fuzz/gdbm_fuzzer.c" ] 12 | 13 | #clang -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -c -I.. -I../src -I../tools -ogdbm_fuzzer.o gdbm_fuzzer.c 14 | 15 | #+ clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -ogdbm_fuzzer gdbm_fuzzer.o ../tools/libgdbmapp.a ../src/.libs/libgdbm.a -------------------------------------------------------------------------------- /ossfuzz-targets/gdbm/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/gdbm 15 | make clean 16 | ./configure --prefix=/src/gdbm/fuzzdrivergpt-install --disable-shared --enable-debug --disable-nls 17 | make -j$(nproc) install 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/gdbm/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/gdbm/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/gdk-pixbuf/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | 14 | set +eux 15 | 16 | # 17 | # do what should be done in build_fuzzers command 18 | # 19 | compile 20 | # 21 | # 22 | # 23 | 24 | ########## 25 | ## After compile, you can prepare the include/lib staff here 26 | ########## 27 | 28 | set -eux 29 | 30 | ########## 31 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 32 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 33 | ########## 34 | #while true 35 | #do 36 | # sleep 1h 37 | #done 38 | 39 | 40 | INSTALL=/root/workspace/fuzzdrivergpt/install 41 | mkdir -p ${INSTALL} 42 | mkdir -p ${INSTALL}/lib 43 | mkdir -p ${INSTALL}/include 44 | 45 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 46 | cp -r /work/prefix/include/gdk-pixbuf-2.0 ${INSTALL}/include/gdk-pixbuf-2.0 47 | 48 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 49 | cp /work/prefix/lib/libgdk_pixbuf-2.0.a ${INSTALL}/lib/libgdk_pixbuf-2.0.a 50 | -------------------------------------------------------------------------------- /ossfuzz-targets/genYml.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | absdir=$(dirname `realpath $0`) 4 | 5 | echo "targets:" 6 | 7 | bash ${absdir}/listTarget.sh | while read d 8 | do 9 | sed 's/^/ /g' ${absdir}/${d}/cfg.yml 10 | echo 11 | echo 12 | done 13 | -------------------------------------------------------------------------------- /ossfuzz-targets/gpac/cfg.yml: -------------------------------------------------------------------------------- 1 | gpac: 2 | language: "c" 3 | image: "fuzzdrivergpt/gpac:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libgpac_static.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link","-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-DGPAC_HAVE_CONFIG_H", "-I/src/gpac" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libgpac_static.a -lm -lz -lpthread -lssl -lcrypto -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/testsuite/oss-fuzzers/fuzz_parse.c" ] 12 | 13 | #clang -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -fsanitize=fuzzer fuzz_parse.c -o /out/fuzz_parse -I./include -I./ ./bin/gcc/libgpac_static.a -lm -lz -lpthread -lssl -lcrypto -DGPAC_HAVE_CONFIG_H -------------------------------------------------------------------------------- /ossfuzz-targets/gpac/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | #make clean 15 | ./configure --static-build --extra-cflags="${CFLAGS}" --extra-ldflags="${CFLAGS}" --prefix=/src/gpac/fuzzdrivergpt-install 16 | make -j36 install 17 | EOF 18 | set +eux 19 | 20 | # 21 | # do what should be done in build_fuzzers command 22 | # 23 | compile 24 | # 25 | # 26 | # 27 | 28 | ########## 29 | ## After compile, you can prepare the include/lib staff here 30 | ########## 31 | 32 | set -eux 33 | 34 | ########## 35 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 36 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 37 | ########## 38 | #while true 39 | #do 40 | # sleep 1h 41 | #done 42 | 43 | 44 | INSTALL=/root/workspace/fuzzdrivergpt/install 45 | mkdir -p ${INSTALL} 46 | cp /src/gpac/bin/gcc/libgpac_static.a /src/gpac/fuzzdrivergpt-install/lib/libgpac_static.a 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/gpac/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/gpac/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/h3/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/h3/build 16 | make clean 17 | cmake --install-prefix=/src/h3/fuzzdrivergpt-install .. 18 | make -j36 install 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | #while true 42 | #do 43 | # sleep 1h 44 | #done 45 | 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/h3/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/h3/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/hiredis/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/hiredis 15 | make clean 16 | make -j36 PREFIX=/src/hiredis/fuzzdrivergpt-install USE_SSL=0 install 17 | set -eux 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/hiredis/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/hiredis/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/hoextdown/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/hoextdown 16 | make install -j$(nproc) PREFIX=/src/hoextdown/fuzzdrivergpt-install 17 | 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/hoextdown/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/hoextdown/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/igraph/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/igraph/build 16 | make clean 17 | cmake .. -DIGRAPH_WARNINGS_AS_ERRORS=OFF -DCMAKE_BUILD_TYPE=None -DCMAKE_PREFIX_PATH=$DEPS_PATH -DFLEX_KEEP_LINE_NUMBERS=ON --install-prefix=/src/igraph/fuzzdrivergpt-install 18 | make -j36 install 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/igraph/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/igraph/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/inchi/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/INCHI-1-SRC 16 | 17 | EOF 18 | set +eux 19 | 20 | # 21 | # do what should be done in build_fuzzers command 22 | # 23 | compile 24 | # 25 | # 26 | # 27 | 28 | ########## 29 | ## After compile, you can prepare the include/lib staff here 30 | ########## 31 | 32 | set -eux 33 | 34 | ########## 35 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 36 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 37 | ########## 38 | #while true 39 | #do 40 | # sleep 1h 41 | #done 42 | 43 | 44 | INSTALL=/root/workspace/fuzzdrivergpt/install 45 | mkdir -p ${INSTALL} 46 | mkdir -p ${INSTALL}/lib 47 | 48 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 49 | cp /work/libinchi.a /root/workspace/fuzzdrivergpt/install/lib/libinchi.a 50 | 51 | -------------------------------------------------------------------------------- /ossfuzz-targets/janet/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | 14 | cat >> /src/build.sh << 'EOF' 15 | 16 | cd /src/janet 17 | make install PREFIX=/src/janet/fuzzdrivergpt-install 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/janet/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/janet/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/jansson/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | 18 | cat >> /src/build.sh << 'EOF' 19 | 20 | cd /src/jansson 21 | ./configure --prefix=/src/jansson/fuzzdrivergpt-install 22 | make -j$(nproc) install 23 | 24 | 25 | EOF 26 | set +eux 27 | 28 | # 29 | # do what should be done in build_fuzzers command 30 | # 31 | compile 32 | # 33 | # 34 | # 35 | 36 | ########## 37 | ## After compile, you can prepare the include/lib staff here 38 | ########## 39 | 40 | set -eux 41 | 42 | ########## 43 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 44 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 45 | ########## 46 | 47 | 48 | 49 | INSTALL=/root/workspace/fuzzdrivergpt/install 50 | mkdir -p ${INSTALL} 51 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 52 | cp -r /src/jansson/fuzzdrivergpt-install/include ${INSTALL}/include 53 | 54 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 55 | cp -r /src/jansson/fuzzdrivergpt-install/lib ${INSTALL}/lib 56 | -------------------------------------------------------------------------------- /ossfuzz-targets/janus-gateway/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/janus-gateway 16 | ./configure --prefix=/src/janus-gateway/fuzzdrivergpt-install --enable-static 17 | make -j$(nproc) install 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/janus-gateway/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/janus-gateway/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/kamailio/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | 11 | set -eux 12 | # FILL HERE 13 | sed -i 's#make#make -j36#g' /src/build.sh 14 | 15 | set +eux 16 | 17 | # 18 | # do what should be done in build_fuzzers command 19 | # 20 | compile 21 | # 22 | # 23 | # 24 | 25 | ########## 26 | ## After compile, you can prepare the include/lib staff here 27 | ########## 28 | 29 | set -eux 30 | 31 | ########## 32 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 33 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 34 | ########## 35 | #while true 36 | #do 37 | # sleep 1h 38 | #done 39 | 40 | 41 | INSTALL=/root/workspace/fuzzdrivergpt/install 42 | mkdir -p ${INSTALL} 43 | mkdir -p ${INSTALL}/lib 44 | 45 | 46 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 47 | cp -r /src/kamailio/src/libkamilio.a ${INSTALL}/lib/libkamilio.a 48 | -------------------------------------------------------------------------------- /ossfuzz-targets/krb5/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | sed -i 's#make#make -j36#g' /src/build.sh 11 | sed -i 's#configure#configure --prefix=/src/krb5/fuzzdrivergpt-install#g' /src/build.sh 12 | set -eux 13 | # FILL HERE 14 | cat >> /src/build.sh << 'EOF' 15 | 16 | cd /src/krb5/src 17 | make -j36 install 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/krb5/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/krb5/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/lcms/cfg.yml: -------------------------------------------------------------------------------- 1 | lcms: 2 | language: "c" 3 | image: "fuzzdrivergpt/lcms:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '#include "lcms2.h"\n' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/lcms.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE /src/lcms/src/.libs/liblcms2.a -lm -lpthread -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/cmsIT8_load_fuzzer.c","/src/cms_overwrite_transform_fuzzer.c","/src/cms_profile_fuzzer.c","/src/cms_transform_all_fuzzer.c","/src/cms_transform_extended_fuzzer.c","/src/cms_transform_fuzzer.c","/src/cms_universal_transform_fuzzer.c" ] 12 | 13 | 14 | #+ clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ /src/cms_universal_transform_fuzzer.o -o /out/cms_universal_transform_fuzzer -fsanitize=fuzzer src/.libs/liblcms2.a -------------------------------------------------------------------------------- /ossfuzz-targets/lcms/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/lcms 16 | ./configure --enable-shared=no --enable-static --prefix=/src/lcms/fuzzdrivergpt-install 17 | make -j$(nproc) install 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/lcms/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/lcms/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/libarchive/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | cat >> /src/build.sh << 'EOF' 18 | cd $SRC/libarchive 19 | mkdir build3 20 | cd build3 21 | cmake -DCHECK_CRC_ON_SOLID_SKIP=1 -DDONT_FAIL_ON_CRC_ERROR=1 --install-prefix=/src/libarchive/fuzzdrivergpt-install ../ 22 | make -j$(nproc) install 23 | 24 | 25 | EOF 26 | set +eux 27 | 28 | # 29 | # do what should be done in build_fuzzers command 30 | # 31 | compile 32 | # 33 | # 34 | # 35 | 36 | ########## 37 | ## After compile, you can prepare the include/lib staff here 38 | ########## 39 | 40 | set -eux 41 | 42 | ########## 43 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 44 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 45 | ########## 46 | 47 | 48 | 49 | INSTALL=/root/workspace/fuzzdrivergpt/install 50 | mkdir -p ${INSTALL} 51 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 52 | cp -r /src/libarchive/fuzzdrivergpt-install/include ${INSTALL}/include 53 | 54 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 55 | cp -r /src/libarchive/fuzzdrivergpt-install/lib ${INSTALL}/lib 56 | -------------------------------------------------------------------------------- /ossfuzz-targets/libass/cfg.yml: -------------------------------------------------------------------------------- 1 | libass: 2 | language: "c" 3 | image: "fuzzdrivergpt/libass:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libass.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" ] 9 | build: "COMPBASE OUTFILE /usr/lib/libFuzzingEngine.a /usr/lib/x86_64-linux-gnu/libfreetype.a /src/libass/libass/.libs/libass.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libass/fuzz/fuzz.c" ] 12 | 13 | #clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -stdlib=libc++ -std=c++11 -o fuzz 14 | #/fuzz_ossfuzz fuzz/fuzz-fuzz.o /usr/lib/libFuzzingEngine.a libass/.libs/libass.a -Wl,-Bstatic -Wl,-Bdynamic -fsanitize=address -------------------------------------------------------------------------------- /ossfuzz-targets/libass/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | make clean 15 | cd /src/libass 16 | ./configure --disable-asm --disable-shared --disable-fuzz --prefix=/src/libass/fuzzdrivergpt-install 17 | make -j$(procn) install 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/libass/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/libass/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/libavif/cfg.yml: -------------------------------------------------------------------------------- 1 | libavif: 2 | language: "c" 3 | image: "fuzzdrivergpt/libavif:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libavif.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE /src/libavif/build/libavif.a /src/libavif/ext/dav1d/build/src/libdav1d.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libavif/tests/oss-fuzz/avif_decode_fuzzer.cc" ] 12 | 13 | #clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++11 -I../include ../tests/oss-fuzz/avif_decode_fuzzer.cc -o /out/avif_decode_fuzzer -fsanitize=fuzzer libavif.a ../ext/dav1d/build/src/libdav1d.a 14 | -------------------------------------------------------------------------------- /ossfuzz-targets/libavif/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | 18 | cat >> /src/build.sh << 'EOF' 19 | 20 | cd /src/libavif 21 | mkdir build1 22 | cd build1 23 | cmake -DBUILD_SHARED_LIBS=0 -DAVIF_CODEC_DAV1D=1 -DAVIF_LOCAL_DAV1D=1 --install-prefix=/src/libavif/fuzzdrivergpt-install .. 24 | make -j$(nproc) install 25 | 26 | EOF 27 | set +eux 28 | 29 | # 30 | # do what should be done in build_fuzzers command 31 | # 32 | compile 33 | # 34 | # 35 | # 36 | 37 | ########## 38 | ## After compile, you can prepare the include/lib staff here 39 | ########## 40 | 41 | set -eux 42 | 43 | ########## 44 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 45 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 46 | ########## 47 | 48 | 49 | INSTALL=/root/workspace/fuzzdrivergpt/install 50 | mkdir -p ${INSTALL} 51 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 52 | cp -r /src/libavif/fuzzdrivergpt-install/include ${INSTALL}/include 53 | 54 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 55 | cp -r /src/libavif/fuzzdrivergpt-install/lib ${INSTALL}/lib 56 | -------------------------------------------------------------------------------- /ossfuzz-targets/libbpf/cfg.yml: -------------------------------------------------------------------------------- 1 | libbpf: 2 | language: "c" 3 | image: "fuzzdrivergpt/libbpf:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '#include \n#include \n#include \n' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libbpf.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-O1", "-fno-omit-frame-pointer", "-gline-tables-only", "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION", "-fsanitize=address", "-fsanitize-address-use-after-scope", "-fsanitize=fuzzer-no-link", "-fsanitize=fuzzer", "-I/root/workspace/fuzzdrivergpt/install/include", "-D_LARGEFILE64_SOURCE", "-D_FILE_OFFSET_BITS=64", "-I/src/libbpf/include" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libbpf.a /src/libbpf/elfutils/libelf/libelf.a -l:libz.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libbpf/fuzz/bpf-object-fuzzer.c" ] -------------------------------------------------------------------------------- /ossfuzz-targets/libbpf/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | ########## 6 | #while true 7 | #do 8 | # sleep 1h 9 | #done 10 | 11 | ########## 12 | ## Before compile, you can modify build.sh for eaiser preparation here 13 | ########## 14 | # install libclang for our python usage, do this for all oss-fuzz projects 15 | pip3 install libclang 16 | 17 | set -eux 18 | cat >> /src/libbpf/scripts/build-fuzzers.sh << 'EOF' 19 | make -C src BUILD_STATIC_ONLY=y V=1 clean 20 | make -C src -j$(nproc) CFLAGS="-I$(pwd)/elfutils/libelf $CFLAGS" BUILD_STATIC_ONLY=y V=1 OBJDIR=/src/libbpf/fuzzdrivergpt-build DESTDIR=/src/libbpf/fuzzdrivergpt-install install 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | INSTALL=/root/workspace/fuzzdrivergpt/install 39 | mkdir -p ${INSTALL} 40 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 41 | cp -r /src/libbpf/fuzzdrivergpt-install/usr/include ${INSTALL}/include 42 | 43 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 44 | cp -r /src/libbpf/fuzzdrivergpt-install/usr/lib64 ${INSTALL}/lib 45 | -------------------------------------------------------------------------------- /ossfuzz-targets/libcbor/cfg.yml: -------------------------------------------------------------------------------- 1 | libcbor: 2 | language: "c" 3 | image: "fuzzdrivergpt/libcbor:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '#include "cbor.h"\n' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libcbor.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE /src/libcbor/build/src/libcbor.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libcbor/oss-fuzz/cbor_load_fuzzer.cc" ] 12 | 13 | # 14 | #clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++11 -I/work/include ../oss-fuzz/cbor_load_fuzzer.cc -o /out/cbor_load_fuzzer -fsanitize=fuzzer src/libcbor.a -------------------------------------------------------------------------------- /ossfuzz-targets/libcbor/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | 14 | 15 | cat >> /src/build.sh << 'EOF' 16 | cd /src/libcbor/ 17 | mkdir nbuild 18 | cd nbuild 19 | cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX="/src/libcbor/fuzzdrivergpt-install" -D SANITIZE=OFF .. 20 | make "-j$(nproc)" 21 | make install 22 | EOF 23 | set +eux 24 | 25 | # 26 | # do what should be done in build_fuzzers command 27 | # 28 | compile 29 | # 30 | # 31 | # 32 | 33 | ########## 34 | ## After compile, you can prepare the include/lib staff here 35 | ########## 36 | 37 | set -eux 38 | 39 | ########## 40 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 41 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 42 | ########## 43 | #while true 44 | #do 45 | # sleep 1h 46 | #done 47 | 48 | INSTALL=/root/workspace/fuzzdrivergpt/install 49 | mkdir -p ${INSTALL} 50 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 51 | cp -r /src/libcbor/fuzzdrivergpt-install/include ${INSTALL}/include 52 | 53 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 54 | cp -r /src/libcbor/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/libcoap/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/libcoap 15 | ./configure --disable-doxygen --disable-manpages --disable-dtls --prefix=/src/libcoap/fuzzdrivergpt-install 16 | make -j$(nproc) install 17 | EOF 18 | set +eux 19 | 20 | # 21 | # do what should be done in build_fuzzers command 22 | # 23 | compile 24 | # 25 | # 26 | # 27 | 28 | ########## 29 | ## After compile, you can prepare the include/lib staff here 30 | ########## 31 | 32 | set -eux 33 | 34 | ########## 35 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 36 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 37 | ########## 38 | #while true 39 | #do 40 | # sleep 1h 41 | #done 42 | 43 | 44 | INSTALL=/root/workspace/fuzzdrivergpt/install 45 | mkdir -p ${INSTALL} 46 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 47 | cp -r /src/libcoap/fuzzdrivergpt-install/include ${INSTALL}/include 48 | 49 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 50 | cp -r /src/libcoap/fuzzdrivergpt-install/lib ${INSTALL}/lib 51 | -------------------------------------------------------------------------------- /ossfuzz-targets/libdwarf/cfg.yml: -------------------------------------------------------------------------------- 1 | libdwarf: 2 | language: "c" 3 | image: "fuzzdrivergpt/libdwarf:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '#include \n' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib64/libdwarf.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-O1", "-fno-omit-frame-pointer", "-gline-tables-only", "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION", "-fsanitize=address", "-fsanitize-address-use-after-scope", "-fsanitize=fuzzer-no-link", "-fsanitize=fuzzer", "-g", "-Werror", "-I/root/workspace/fuzzdrivergpt/install/include", "-fuse-ld=lld" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib64/libdwarf.a -lz -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/fuzz_init_binary.c", "/src/fuzz_init_path.c", ] 12 | -------------------------------------------------------------------------------- /ossfuzz-targets/libdwarf/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | cat >> /src/build.sh << 'EOF' 20 | rm -rf /src/libdwarf/build 21 | mkdir -p /src/libdwarf/build 22 | cd /src/libdwarf/build 23 | cmake --install-prefix=/src/libdwarf/build/install .. 24 | make install 25 | EOF 26 | set +eux 27 | 28 | # 29 | # do what should be done in build_fuzzers command 30 | # 31 | compile 32 | # 33 | # 34 | # 35 | 36 | ########## 37 | ## After compile, you can prepare the include/lib staff here 38 | ########## 39 | 40 | set -eux 41 | 42 | INSTALL=/root/workspace/fuzzdrivergpt/install 43 | mkdir -p ${INSTALL} 44 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 45 | cp -r /src/libdwarf/build/install/include ${INSTALL}/include 46 | 47 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 48 | cp -r /src/libdwarf/build/install/lib64 ${INSTALL}/lib64 49 | -------------------------------------------------------------------------------- /ossfuzz-targets/libexif/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | EOF 16 | set +eux 17 | 18 | # 19 | # do what should be done in build_fuzzers command 20 | # 21 | compile 22 | # 23 | # 24 | # 25 | 26 | ########## 27 | ## After compile, you can prepare the include/lib staff here 28 | ########## 29 | 30 | set -eux 31 | 32 | ########## 33 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 34 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 35 | ########## 36 | #while true 37 | #do 38 | # sleep 1h 39 | #done 40 | 41 | 42 | #INSTALL=/root/workspace/fuzzdrivergpt/install 43 | #mkdir -p ${INSTALL} 44 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 45 | #cp -r /src/libexif/fuzzdrivergpt-install/include ${INSTALL}/include 46 | # 47 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 48 | #cp -r /src/libexif/fuzzdrivergpt-install/lib ${INSTALL}/lib 49 | -------------------------------------------------------------------------------- /ossfuzz-targets/libfido2/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | 14 | cat >> /src/build.sh << 'EOF' 15 | 16 | EOF 17 | set +eux 18 | 19 | # 20 | # do what should be done in build_fuzzers command 21 | # 22 | compile 23 | # 24 | # 25 | # 26 | 27 | ########## 28 | ## After compile, you can prepare the include/lib staff here 29 | ########## 30 | #while true 31 | #do 32 | # sleep 1h 33 | #done 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | 42 | 43 | INSTALL=/root/workspace/fuzzdrivergpt/install 44 | mkdir -p ${INSTALL} 45 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 46 | cp -r /work/include/fido ${INSTALL}/include 47 | cp -r /work/include/fido.h ${INSTALL}/include 48 | mkdir ${INSTALL}/lib 49 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 50 | cp -r /work/lib/libfido* ${INSTALL}/lib 51 | -------------------------------------------------------------------------------- /ossfuzz-targets/libgd/cfg.yml: -------------------------------------------------------------------------------- 1 | libgd: 2 | language: "c" 3 | image: "fuzzdrivergpt/libgd:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '#include "gd.h"\n#include "gd_color_map.h"\n#include "gd_errors.h"\n#include "gd_io.h"\n#include "gdcache.h"\n#include "gdfontg.h"\n#include "gdfontl.h"\n#include "gdfontmb.h"\n#include "gdfonts.h"\n#include "gdfontt.h"\n#include "gdfx.h"\n#include "gdpp.h"\n' 6 | headers: { "/work/include" : "**/*" } 7 | binaries: [ "/work/lib/libgd.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/work/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link","-L/work/lib","-Wl,-Bstatic","-Wl,-Bdynamic"] 9 | build: "COMPBASE OUTFILE -lgd -lz -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/gd_image_string_fuzzer.cc" ] 12 | 13 | 14 | #clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++11 -I/work/include -L/work/lib /src/gd_image_string_fuzzer.cc -o /out/gd_image_string_fuzzer -fsanitize=fuzzer -lgd -Wl,-Bstatic -lz -Wl,-Bdynamic -------------------------------------------------------------------------------- /ossfuzz-targets/libgd/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | EOF 16 | set +eux 17 | 18 | # 19 | # do what should be done in build_fuzzers command 20 | # 21 | compile 22 | # 23 | # 24 | # 25 | 26 | ########## 27 | ## After compile, you can prepare the include/lib staff here 28 | ########## 29 | 30 | set -eux 31 | 32 | ########## 33 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 34 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 35 | ########## 36 | #while true 37 | #do 38 | # sleep 1h 39 | #done 40 | 41 | 42 | #INSTALL=/root/workspace/fuzzdrivergpt/install 43 | #mkdir -p ${INSTALL} 44 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 45 | #cp -r /src/libgd/fuzzdrivergpt-install/include ${INSTALL}/include 46 | # 47 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 48 | #cp -r /src/libgd/fuzzdrivergpt-install/lib ${INSTALL}/lib 49 | -------------------------------------------------------------------------------- /ossfuzz-targets/libical/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | make clean 16 | cmake . -DSTATIC_ONLY=ON -DICAL_GLIB=False --install-prefix=/src/libical/fuzzdrivergpt-install 17 | make install -j$(nproc) 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/libical/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/libical/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/libiec61850/cfg.yml: -------------------------------------------------------------------------------- 1 | libiec61850: 2 | language: "c" 3 | image: "fuzzdrivergpt/libiec61850:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libiec61850.a", "/root/workspace/fuzzdrivergpt/install/lib/libhal.a", "/root/workspace/fuzzdrivergpt/install/lib/libhal-shared.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-O1", "-fno-omit-frame-pointer", "-gline-tables-only", "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION", "-fsanitize=address", "-fsanitize-address-use-after-scope", "-fsanitize=fuzzer-no-link", "-fsanitize=fuzzer", "-I/root/workspace/fuzzdrivergpt/install/include", "-fuse-ld=lld" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libiec61850.a /root/workspace/fuzzdrivergpt/install/lib/libhal.a /root/workspace/fuzzdrivergpt/install/lib/libhal-shared.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libiec61850/fuzz/fuzz_mms_decode.c" ] 12 | -------------------------------------------------------------------------------- /ossfuzz-targets/libiec61850/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | cat >> /src/build.sh << 'EOF' 20 | rm -rf /src/libiec61850/build 21 | mkdir -p /src/libiec61850/build 22 | cd /src/libiec61850/build 23 | cmake --install-prefix=/src/libiec61850/build/install .. 24 | make install 25 | EOF 26 | set +eux 27 | 28 | # 29 | # do what should be done in build_fuzzers command 30 | # 31 | compile 32 | # 33 | # 34 | # 35 | 36 | ########## 37 | ## After compile, you can prepare the include/lib staff here 38 | ########## 39 | 40 | set -eux 41 | 42 | INSTALL=/root/workspace/fuzzdrivergpt/install 43 | mkdir -p ${INSTALL} 44 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 45 | cp -r /src/libiec61850/build/install/include ${INSTALL}/include 46 | 47 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 48 | cp -r /src/libiec61850/build/install/lib ${INSTALL}/lib 49 | -------------------------------------------------------------------------------- /ossfuzz-targets/liblouis/cfg.yml: -------------------------------------------------------------------------------- 1 | liblouis: 2 | language: "c" 3 | image: "fuzzdrivergpt/liblouis:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/liblouis.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-O1", "-fno-omit-frame-pointer", "-gline-tables-only", "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION", "-fsanitize=address", "-fsanitize-address-use-after-scope", "-fsanitize=fuzzer-no-link", "-fsanitize=fuzzer", "-I/root/workspace/fuzzdrivergpt/install/include" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/liblouis.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/liblouis/tests/fuzzing/table_fuzzer.cc" ] 12 | -------------------------------------------------------------------------------- /ossfuzz-targets/liblouis/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | cat >> /src/liblouis/tests/fuzzing/build.sh << 'EOF' 20 | cd /src/liblouis 21 | make clean 22 | ./configure --prefix=/src/liblouis/install 23 | make install 24 | EOF 25 | set +eux 26 | 27 | # 28 | # do what should be done in build_fuzzers command 29 | # 30 | compile 31 | # 32 | # 33 | # 34 | 35 | ########## 36 | ## After compile, you can prepare the include/lib staff here 37 | ########## 38 | 39 | set -eux 40 | 41 | INSTALL=/root/workspace/fuzzdrivergpt/install 42 | mkdir -p ${INSTALL} 43 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 44 | cp -r /src/liblouis/install/include /root/workspace/fuzzdrivergpt/install/include 45 | 46 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 47 | cp -r /src/liblouis/install/lib /root/workspace/fuzzdrivergpt/install/lib 48 | -------------------------------------------------------------------------------- /ossfuzz-targets/libmodbus/cfg.yml: -------------------------------------------------------------------------------- 1 | libmodbus: 2 | language: "c" 3 | image: "fuzzdrivergpt/libmodbus:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libmodbus.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-O1", "-Wall", "-Wextra", "-gline-tables-only", "-fno-omit-frame-pointer", "-fsanitize=address", "-fsanitize=fuzzer-no-link", "-fsanitize-address-use-after-scope", "-fsanitize=fuzzer", "-I/root/workspace/fuzzdrivergpt/install/include", "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION", "-fuse-ld=lld" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libmodbus.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libmodbus/fuzz/FuzzClient.c", "/src/libmodbus/fuzz/FuzzServer.c" ] -------------------------------------------------------------------------------- /ossfuzz-targets/libmodbus/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | cat >> /src/build.sh << 'EOF' 20 | cd /src/libmodbus 21 | make clean 22 | ./configure --prefix=/src/libmodbus/install --disable-shared 23 | make install 24 | EOF 25 | set +eux 26 | 27 | # 28 | # do what should be done in build_fuzzers command 29 | # 30 | compile 31 | # 32 | # 33 | # 34 | 35 | ########## 36 | ## After compile, you can prepare the include/lib staff here 37 | ########## 38 | 39 | set -eux 40 | 41 | INSTALL=/root/workspace/fuzzdrivergpt/install 42 | mkdir -p ${INSTALL} 43 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 44 | cp -r /src/libmodbus/install/include /root/workspace/fuzzdrivergpt/install/include 45 | 46 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 47 | cp -r /src/libmodbus/install/lib /root/workspace/fuzzdrivergpt/install/lib 48 | -------------------------------------------------------------------------------- /ossfuzz-targets/libpcap/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | 18 | cat >> /src/build.sh << 'EOF' 19 | 20 | cd /src/libpcap 21 | # build project 22 | mkdir build1 23 | cd build1 24 | cmake --install-prefix=/src/libpcap/fuzzdrivergpt-install .. 25 | make -j$(nproc) install 26 | 27 | EOF 28 | set +eux 29 | 30 | # 31 | # do what should be done in build_fuzzers command 32 | # 33 | compile 34 | # 35 | # 36 | # 37 | 38 | ########## 39 | ## After compile, you can prepare the include/lib staff here 40 | ########## 41 | 42 | set -eux 43 | 44 | ########## 45 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 46 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 47 | ########## 48 | 49 | 50 | INSTALL=/root/workspace/fuzzdrivergpt/install 51 | mkdir -p ${INSTALL} 52 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 53 | cp -r /src/libpcap/fuzzdrivergpt-install/include ${INSTALL}/include 54 | 55 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 56 | cp -r /src/libpcap/fuzzdrivergpt-install/lib ${INSTALL}/lib 57 | -------------------------------------------------------------------------------- /ossfuzz-targets/libpg_query/cfg.yml: -------------------------------------------------------------------------------- 1 | libpg_query: 2 | language: "c" 3 | image: "fuzzdrivergpt/libpg_query:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libpg_query.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-O1", "-fno-omit-frame-pointer", "-gline-tables-only", "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION", "-fsanitize=address", "-fsanitize-address-use-after-scope", "-fsanitize=fuzzer-no-link", "-fsanitize=fuzzer", "-I/root/workspace/fuzzdrivergpt/install/include" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libpg_query.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libpg_query/test/fuzz/fuzz_parser.c" ] 12 | -------------------------------------------------------------------------------- /ossfuzz-targets/libpg_query/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | cat >> /src/build.sh << 'EOF' 20 | make clean 21 | make DESTDIR=/src/libpg_query/fuzzdrivergpt-install build install 22 | EOF 23 | set +eux 24 | 25 | # 26 | # do what should be done in build_fuzzers command 27 | # 28 | compile 29 | # 30 | # 31 | # 32 | 33 | ########## 34 | ## After compile, you can prepare the include/lib staff here 35 | ########## 36 | 37 | set -eux 38 | 39 | INSTALL=/root/workspace/fuzzdrivergpt/install 40 | mkdir -p ${INSTALL} 41 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 42 | cp -r /src/libpg_query/fuzzdrivergpt-install/usr/local/include /root/workspace/fuzzdrivergpt/install/include 43 | 44 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 45 | cp -r /src/libpg_query/fuzzdrivergpt-install/usr/local/lib /root/workspace/fuzzdrivergpt/install/lib 46 | -------------------------------------------------------------------------------- /ossfuzz-targets/libplist/cfg.yml: -------------------------------------------------------------------------------- 1 | libplist: 2 | language: "c" 3 | image: "fuzzdrivergpt/libplist:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libplist-2.0.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE /src/libplist/src/.libs/libplist-2.0.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: ['/src/libplist/fuzz/bplist_fuzzer.cc', '/src/libplist/fuzz/oplist_fuzzer.cc/src/libplist/fuzz/xplist_fuzzer.cc', '/src/libplist/fuzz/jplist_fuzzer.cc'] 12 | 13 | #clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++11 -Iinclude/ fuzz/bplist_fuzzer.cc -o /out/bplist_fuzzer -fsanitize=fuzzer src/.libs/libplist-2.0.a -------------------------------------------------------------------------------- /ossfuzz-targets/libplist/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/libplist 16 | make clean 17 | ./configure --prefix=/src/libplist/fuzzdrivergpt-install 18 | make -j$(nproc) install 19 | 20 | 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | ########## 39 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 40 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 41 | ########## 42 | #while true 43 | #do 44 | # sleep 1h 45 | #done 46 | 47 | 48 | INSTALL=/root/workspace/fuzzdrivergpt/install 49 | mkdir -p ${INSTALL} 50 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 51 | cp -r /src/libplist/fuzzdrivergpt-install/include ${INSTALL}/include 52 | 53 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 54 | cp -r /src/libplist/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/libpng/cfg.yml: -------------------------------------------------------------------------------- 1 | libpng: 2 | language: "c" 3 | image: "fuzzdrivergpt/libpng:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libpng16.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE -lFuzzingEngine /src/libpng/.libs/libpng16.a -lz -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc" ] 12 | 13 | #+ clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++11 -I. /src/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc -o /out/libpng_read_fuzzer -lFuzzingEngine .libs/libpng16.a -lz 14 | -------------------------------------------------------------------------------- /ossfuzz-targets/libpng/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/libpng 15 | ./configure --with-libpng-prefix=OSS_FUZZ_ --prefix=/src/libpng/fuzzdrivergpt-install 16 | make -j$(nproc) install 17 | 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/libpng/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/libpng/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/librdkafka/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | 18 | cat >> /src/build.sh << 'EOF' 19 | cd /src/librdkafka 20 | make clean 21 | ./configure --prefix=/src/librdkafka/fuzzdrivergpt-install 22 | make -j$(nproc) install 23 | 24 | 25 | EOF 26 | set +eux 27 | 28 | # 29 | # do what should be done in build_fuzzers command 30 | # 31 | compile 32 | # 33 | # 34 | # 35 | 36 | ########## 37 | ## After compile, you can prepare the include/lib staff here 38 | ########## 39 | 40 | set -eux 41 | 42 | ########## 43 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 44 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 45 | ########## 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/librdkafka/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/librdkafka/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/libredwg/cfg.yml: -------------------------------------------------------------------------------- 1 | libredwg: 2 | language: "c" 3 | image: "fuzzdrivergpt/libredwg:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '#include "dwg.h"\n#include "dwg_api.h"\n' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libredwg.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-O1", "-fno-omit-frame-pointer", "-gline-tables-only", "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION", "-fsanitize=address", "-fsanitize-address-use-after-scope", "-fsanitize=fuzzer-no-link", "-fsanitize=fuzzer", "-I/root/workspace/fuzzdrivergpt/install/include" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libredwg.a -lm -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libredwg/examples/llvmfuzz.c" ] 12 | 13 | 14 | #clang -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAF 15 | #E_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize 16 | #=fuzzer-no-link -fsanitize=fuzzer examples/llvmfuzz.c -o /out/llvmfuzz src/.libs/ 17 | #libredwg.a -I./include -I./src -------------------------------------------------------------------------------- /ossfuzz-targets/libredwg/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | cat>>$SRC/build.sh<<'EOF' 20 | cd $SRC/libredwg 21 | make clean 22 | ./configure --disable-shared --disable-bindings --enable-release --prefix=/src/libredwg/fuzzdrivergpt-install 23 | make install 24 | EOF 25 | set +eux 26 | 27 | # 28 | # do what should be done in build_fuzzers command 29 | # 30 | compile 31 | # 32 | # 33 | # 34 | 35 | ########## 36 | ## After compile, you can prepare the include/lib staff here 37 | ########## 38 | 39 | set -eux 40 | 41 | INSTALL=/root/workspace/fuzzdrivergpt/install 42 | mkdir -p ${INSTALL} 43 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 44 | cp -r /src/libredwg/fuzzdrivergpt-install/include ${INSTALL}/include 45 | 46 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 47 | cp -r /src/libredwg/fuzzdrivergpt-install/lib ${INSTALL}/lib -------------------------------------------------------------------------------- /ossfuzz-targets/libressl/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/libressl 16 | cmake -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX \ 17 | -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ 18 | $CMAKE_DEFINES --install-prefix=/src/libressl/fuzzdrivergpt-install $SRC/libressl/ 19 | make -j$(nproc ) install 20 | 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | ########## 39 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 40 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 41 | ########## 42 | #while true 43 | #do 44 | # sleep 1h 45 | #done 46 | 47 | 48 | INSTALL=/root/workspace/fuzzdrivergpt/install 49 | mkdir -p ${INSTALL} 50 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 51 | cp -r /src/libressl/fuzzdrivergpt-install/include ${INSTALL}/include 52 | 53 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 54 | cp -r /src/libressl/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/libsndfile/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | cat>>$SRC/libsndfile/ossfuzz/ossfuzz.sh<<'EOF' 20 | cd $SRC/libsndfile 21 | make distclean 22 | ./configure --disable-shared --enable-ossfuzzers --prefix=/src/libsndfile/fuzzdrivergpt-install 23 | make install 24 | EOF 25 | set +eux 26 | 27 | # 28 | # do what should be done in build_fuzzers command 29 | # 30 | compile 31 | # 32 | # 33 | # 34 | 35 | ########## 36 | ## After compile, you can prepare the include/lib staff here 37 | ########## 38 | 39 | set -eux 40 | 41 | INSTALL=/root/workspace/fuzzdrivergpt/install 42 | mkdir -p ${INSTALL} 43 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 44 | cp -r /src/libsndfile/fuzzdrivergpt-install/include ${INSTALL}/include 45 | 46 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 47 | cp -r /src/libsndfile/fuzzdrivergpt-install/lib ${INSTALL}/lib 48 | 49 | -------------------------------------------------------------------------------- /ossfuzz-targets/libsodium/cfg.yml: -------------------------------------------------------------------------------- 1 | libsodium: 2 | language: "c" 3 | image: "fuzzdrivergpt/libsodium:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '#include \n' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libsodium.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link","-I/src/libsodium/src/libsodium/include" ] 9 | build: "COMPBASE OUTFILE /src/libsodium/src/libsodium/.libs/libsodium.a -lpthread -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/secret_key_auth_fuzzer.cc","/src/secretbox_easy_fuzzer.cc" ] 12 | 13 | 14 | #clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++11 -I/src/libsodium/src/libsodium/include /src/secret_key_auth_fuzzer.cc -o /out/secret_key_auth_fuzzer /src/libsodium/src/libsodium/.libs/libsodium.a -fsanitize=fuzzer -------------------------------------------------------------------------------- /ossfuzz-targets/libsodium/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/libsodium 15 | make clean 16 | ./configure --enable-static LDFLAGS="$CXXFLAGS" --prefix=/src/libsodium/fuzzdrivergpt-install 17 | make -j$(nproc) install 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/libsodium/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/libsodium/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/libspng/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | 14 | cat >> /src/build.sh << 'EOF' 15 | mkdir /src/libspng/cbuild 16 | cd /src/libspng/cbuild 17 | apt install -y libz-dev 18 | cmake .. --install-prefix=/src/libspng/fuzzdrivergpt-install 19 | make -j$(nproc) 20 | make install 21 | 22 | EOF 23 | set +eux 24 | 25 | # 26 | # do what should be done in build_fuzzers command 27 | # 28 | compile 29 | # 30 | # 31 | # 32 | 33 | ########## 34 | ## After compile, you can prepare the include/lib staff here 35 | ########## 36 | 37 | set -eux 38 | 39 | ########## 40 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 41 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 42 | ########## 43 | #while true 44 | #do 45 | # sleep 1h 46 | #done 47 | 48 | 49 | INSTALL=/root/workspace/fuzzdrivergpt/install 50 | mkdir -p ${INSTALL} 51 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 52 | cp -r /src/libspng/fuzzdrivergpt-install/include ${INSTALL}/include 53 | 54 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 55 | cp -r /src/libspng/fuzzdrivergpt-install/lib ${INSTALL}/lib 56 | -------------------------------------------------------------------------------- /ossfuzz-targets/libsrtp/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | cat >> /src/build.sh << 'EOF' 18 | cd /src/libsrtp 19 | ./configure --prefix=/src/libsrtp/fuzzdrivergpt-install 20 | make -j$(nproc) install 21 | 22 | EOF 23 | set +eux 24 | 25 | # 26 | # do what should be done in build_fuzzers command 27 | # 28 | compile 29 | # 30 | # 31 | # 32 | 33 | ########## 34 | ## After compile, you can prepare the include/lib staff here 35 | ########## 36 | 37 | set -eux 38 | 39 | ########## 40 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 41 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 42 | ########## 43 | 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/libsrtp/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/libsrtp/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/libssh/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | # FILL HERE 20 | cat>>$SRC/build.sh<<'EOF' 21 | pushd $BUILD 22 | make clean 23 | cmake -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" \ 24 | -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ 25 | -DBUILD_SHARED_LIBS=OFF -DWITH_INSECURE_NONE=ON --install-prefix /src/libssh/fuzzdrivergpt-install $SRC/libssh 26 | make install 27 | EOF 28 | 29 | set +eux 30 | 31 | # 32 | # do what should be done in build_fuzzers command 33 | # 34 | compile 35 | # 36 | # 37 | # 38 | 39 | ########## 40 | ## After compile, you can prepare the include/lib staff here 41 | ########## 42 | 43 | set -eux 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/libssh/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/libssh/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/libssh2/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | ./configure --disable-shared \ 15 | --enable-ossfuzzers \ 16 | --disable-examples-build \ 17 | --enable-debug --prefix=/src/libssh2/fuzzdrivergpt-install 18 | make -j$(nproc) install 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | #while true 42 | #do 43 | # sleep 1h 44 | #done 45 | 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/libssh2/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/libssh2/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/libtpms/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/libtpms 15 | ./configure --disable-shared --enable-static --with-openssl --with-tpm2 --prefix=/src/libtpms/fuzzdrivergpt-install 16 | make -j$(nproc) install 17 | 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | # 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/libtpms/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/libtpms/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/libucl/cfg.yml: -------------------------------------------------------------------------------- 1 | libucl: 2 | language: "c" 3 | image: "fuzzdrivergpt/libucl:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libucl.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-O1", "-fno-omit-frame-pointer", "-gline-tables-only", "-DHAVE_CONFIG_H", "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION", "-fsanitize=address", "-fsanitize-address-use-after-scope", "-fsanitize=fuzzer-no-link", "-fsanitize=fuzzer", "-I/root/workspace/fuzzdrivergpt/install/include" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libucl.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libucl/tests/fuzzers/ucl_add_string_fuzzer.c" ] 12 | 13 | 14 | #+ clang -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -fsanitize=fuzzer tests/fuzzers/ucl_add_string_fuzzer.c -DHAVE_CONFIG_H -I./src -I./include src/.libs/libucl.a -I./ -o /out/ucl_add_string_fuzzer -------------------------------------------------------------------------------- /ossfuzz-targets/libucl/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | cat>>$SRC/build.sh<<'EOF' 20 | cd /src/libucl 21 | make clean 22 | ./configure --prefix=/src/libucl/fuzzdrivergpt-install 23 | make install 24 | EOF 25 | set +eux 26 | 27 | # 28 | # do what should be done in build_fuzzers command 29 | # 30 | compile 31 | # 32 | # 33 | # 34 | 35 | ########## 36 | ## After compile, you can prepare the include/lib staff here 37 | ########## 38 | 39 | set -eux 40 | 41 | INSTALL=/root/workspace/fuzzdrivergpt/install 42 | mkdir -p ${INSTALL} 43 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 44 | cp -r /src/libucl/fuzzdrivergpt-install/include ${INSTALL}/include 45 | 46 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 47 | cp -r /src/libucl/fuzzdrivergpt-install/lib ${INSTALL}/lib -------------------------------------------------------------------------------- /ossfuzz-targets/libusb/cfg.yml: -------------------------------------------------------------------------------- 1 | libusb: 2 | language: "c" 3 | image: "fuzzdrivergpt/libusb:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '#include "assert.h"\n' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libusb-1.0.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE /src/libusb/libusb/.libs/libusb-1.0.a -lpthread -ludev -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libusb_fuzzer.cc" ] 12 | 13 | #clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++11 -I. /src/libusb_fuzzer.cc -fsanitize=fuzzer ./libusb/.libs/libusb-1.0.a -lpthread -ludev -o /out/libusb_fuzzer -------------------------------------------------------------------------------- /ossfuzz-targets/libusb/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | cat >> /src/build.sh << 'EOF' 18 | cd /src/libusb 19 | ./configure --prefix=/src/libusb/fuzzdrivergpt-install 20 | make -j$(nproc) 21 | make install 22 | EOF 23 | set +eux 24 | 25 | # 26 | # do what should be done in build_fuzzers command 27 | # 28 | compile 29 | # 30 | # 31 | # 32 | 33 | ########## 34 | ## After compile, you can prepare the include/lib staff here 35 | ########## 36 | 37 | set -eux 38 | 39 | ########## 40 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 41 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 42 | ########## 43 | 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/libusb/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/libusb/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/libvips/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | cat >> /src/build.sh << 'EOF' 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | 41 | 42 | 43 | #INSTALL=/root/workspace/fuzzdrivergpt/install 44 | #mkdir -p ${INSTALL} 45 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 46 | #cp -r /src/libvips/fuzzdrivergpt-install/include ${INSTALL}/include 47 | # 48 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 49 | #cp -r /src/libvips/fuzzdrivergpt-install/lib ${INSTALL}/lib 50 | -------------------------------------------------------------------------------- /ossfuzz-targets/libvnc/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | cat >> /src/build.sh << 'EOF' 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | 41 | # 42 | # 43 | #INSTALL=/root/workspace/fuzzdrivergpt/install 44 | #mkdir -p ${INSTALL} 45 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 46 | #cp -r /src/libvnc/fuzzdrivergpt-install/include ${INSTALL}/include 47 | # 48 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 49 | #cp -r /src/libvnc/fuzzdrivergpt-install/lib ${INSTALL}/lib 50 | -------------------------------------------------------------------------------- /ossfuzz-targets/libwebsockets/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | cat>>$SRC/build.sh<<'EOF' 20 | mkdir mybuild 21 | cd mybuild 22 | cmake -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ 23 | -DCMAKE_EXE_LINKER_FLAGS="$CFLAGS" -DCMAKE_SHARED_LINKER_FLAGS="$CFLAGS" --install-prefix /src/libwebsockets/fuzzdrivergpt-install .. 24 | make install 25 | EOF 26 | set +eux 27 | 28 | # 29 | # do what should be done in build_fuzzers command 30 | # 31 | compile 32 | # 33 | # 34 | # 35 | 36 | ########## 37 | ## After compile, you can prepare the include/lib staff here 38 | ########## 39 | 40 | set -eux 41 | 42 | INSTALL=/root/workspace/fuzzdrivergpt/install 43 | mkdir -p ${INSTALL} 44 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 45 | cp -r /src/libwebsockets/fuzzdrivergpt-install/include ${INSTALL}/include 46 | 47 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 48 | cp -r /src/libwebsockets/fuzzdrivergpt-install/lib ${INSTALL}/lib 49 | -------------------------------------------------------------------------------- /ossfuzz-targets/libxls/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | cat >> /src/build.sh << 'EOF' 18 | 19 | make clean 20 | ./configure --enable-static --prefix=/src/libxls/fuzzdrivergpt-install 21 | make -j$(nproc) install 22 | EOF 23 | set +eux 24 | 25 | # 26 | # do what should be done in build_fuzzers command 27 | # 28 | compile 29 | # 30 | # 31 | # 32 | 33 | ########## 34 | ## After compile, you can prepare the include/lib staff here 35 | ########## 36 | 37 | set -eux 38 | 39 | ########## 40 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 41 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 42 | ########## 43 | 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/libxls/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/libxls/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/libyaml/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | EOF 16 | set +eux 17 | 18 | # 19 | # do what should be done in build_fuzzers command 20 | # 21 | compile 22 | # 23 | # 24 | # 25 | 26 | ########## 27 | ## After compile, you can prepare the include/lib staff here 28 | ########## 29 | 30 | set -eux 31 | 32 | ########## 33 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 34 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 35 | ########## 36 | #while true 37 | #do 38 | # sleep 1h 39 | #done 40 | 41 | 42 | #INSTALL=/root/workspace/fuzzdrivergpt/install 43 | #mkdir -p ${INSTALL} 44 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 45 | #cp -r /src/libyaml/fuzzdrivergpt-install/include ${INSTALL}/include 46 | # 47 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 48 | #cp -r /src/libyaml/fuzzdrivergpt-install/lib ${INSTALL}/lib 49 | -------------------------------------------------------------------------------- /ossfuzz-targets/libyang/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########## 4 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 5 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 6 | ########## 7 | #while true 8 | #do 9 | # sleep 1h 10 | #done 11 | 12 | ########## 13 | ## Before compile, you can modify build.sh for eaiser preparation here 14 | ########## 15 | # install libclang for our python usage, do this for all oss-fuzz projects 16 | pip3 install libclang 17 | 18 | set -eux 19 | cat>>$SRC/build.sh<<'EOF' 20 | make clean 21 | cmake -DENABLE_STATIC=ON --install-prefix /src/libyang/fuzzdrivergpt-install ../ 22 | make install 23 | EOF 24 | # now in /src/libyang/build 25 | set +eux 26 | 27 | # 28 | # do what should be done in build_fuzzers command 29 | # 30 | compile 31 | # 32 | # 33 | # 34 | 35 | ########## 36 | ## After compile, you can prepare the include/lib staff here 37 | ########## 38 | 39 | set -eux 40 | 41 | INSTALL=/root/workspace/fuzzdrivergpt/install 42 | mkdir -p ${INSTALL} 43 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 44 | cp -r /src/libyang/fuzzdrivergpt-install/include ${INSTALL}/include 45 | 46 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 47 | cp -r /src/libyang/fuzzdrivergpt-install/lib ${INSTALL}/lib 48 | -------------------------------------------------------------------------------- /ossfuzz-targets/libzip/cfg.yml: -------------------------------------------------------------------------------- 1 | libzip: 2 | language: "c" 3 | image: "fuzzdrivergpt/libzip:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libzip.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" ] 9 | build: "COMPBASE OUTFILE /usr/lib/libFuzzingEngine.a /src/libzip/build/lib/libzip.a -lz -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/libzip/regress/zip_read_fuzzer.cc" ] 12 | 13 | #clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -stdlib=libc++ -std=c++11 -I. -I../lib /src/libzip/regress/zip_read_fuzzer.cc -o /out/zip_read_fuzzer /usr/lib/libFuzzingEngine.a /src/libzip/build/lib/libzip.a -lz 14 | -------------------------------------------------------------------------------- /ossfuzz-targets/libzip/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/libzip 16 | mkdir build1 17 | cd build1 18 | cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF -DBUILD_TOOLS=OFF -DENABLE_LZMA=OFF --install-prefix=/src/libzip/fuzzdrivergpt-install .. 19 | make -j$(nproc) install 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | #while true 42 | #do 43 | # sleep 1h 44 | #done 45 | 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/libzip/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/libzip/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/lighttpd/SKIP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/occia/fuzzdrivergpt/35b0e957a61be8bd506017cda621a50e75f5acdb/ossfuzz-targets/lighttpd/SKIP -------------------------------------------------------------------------------- /ossfuzz-targets/lighttpd/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | sed -i 's#make#make -j$(nproc)#g' /src/build.sh 11 | set -eux 12 | 13 | # FILL HERE 14 | cat >> /src/build.sh << 'EOF' 15 | 16 | cd /src/lighttpd1.4 17 | make clean 18 | ./configure --without-pcre --enable-static --prefix=/src/lighttpd1.4/fuzzdrivergpt-install 19 | make -j$(nproc) install 20 | 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | ########## 39 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 40 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 41 | ########## 42 | #while true 43 | #do 44 | # sleep 1h 45 | #done 46 | 47 | 48 | INSTALL=/root/workspace/fuzzdrivergpt/install 49 | mkdir -p ${INSTALL} 50 | 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/lighttpd1.4/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/listFuzzdriver.sh: -------------------------------------------------------------------------------- 1 | ls /out/* | while read f; 2 | do 3 | [ -x $f ] && { 4 | count=`strings $f | grep LLVMFuzzerTestOneInput | wc -l`; 5 | [ $count -gt 0 ] && echo $f; 6 | }; 7 | done 8 | 9 | -------------------------------------------------------------------------------- /ossfuzz-targets/listTarget.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | absdir=$(dirname `realpath $0`) 4 | 5 | for d in `ls ${absdir}` 6 | do 7 | [ -d ${absdir}/$d ] && [[ ! -f ${absdir}/$d/SKIP ]] && echo $d 8 | done 9 | -------------------------------------------------------------------------------- /ossfuzz-targets/lldpd/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | sed -i 's#make#make -j$(nproc)#g' /src/build.sh 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | make clean 16 | ./configure CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$CFLAGS" --disable-shared --disable-hardening --enable-pie --prefix=/src/lldpd/fuzzdrivergpt-install 17 | make -j$(nproc) install 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########### 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | mkdir -p ${INSTALL}/include/daemon 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/lldpd/fuzzdrivergpt-install/include/* ${INSTALL}/include 51 | cp -r /src/lldpd/src/daemon/*.h ${INSTALL}/include/daemon 52 | 53 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 54 | cp -r /src/lldpd/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/llhttp/cfg.yml: -------------------------------------------------------------------------------- 1 | llhttp: 2 | language: "c" 3 | image: "fuzzdrivergpt/llhttp:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libllhttp.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link","-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libllhttp.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: ["/src/llhttp/test/fuzzers/fuzz_parser.c" ] 12 | 13 | 14 | #clang -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -fsanitize=fuzzer ./test/fuzzers/fuzz_parser.c -I./build/ ./build/libllhttp.a -o /out/fuzz_parser -------------------------------------------------------------------------------- /ossfuzz-targets/llhttp/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | sed -i 's#make#make -j$(nproc)#g' /src/build.sh 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | PREFIX=/src/llhttp/fuzzdrivergpt-install make -j$(nproc) install 15 | EOF 16 | set +eux 17 | 18 | # 19 | # do what should be done in build_fuzzers command 20 | # 21 | compile 22 | # 23 | # 24 | # 25 | 26 | ########## 27 | ## After compile, you can prepare the include/lib staff here 28 | ########## 29 | 30 | set -eux 31 | 32 | ########## 33 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 34 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 35 | ########## 36 | #while true 37 | #do 38 | # sleep 1h 39 | #done 40 | 41 | 42 | INSTALL=/root/workspace/fuzzdrivergpt/install 43 | mkdir -p ${INSTALL} 44 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 45 | cp -r /src/llhttp/fuzzdrivergpt-install/include ${INSTALL}/include 46 | 47 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 48 | cp -r /src/llhttp/fuzzdrivergpt-install/lib ${INSTALL}/lib 49 | -------------------------------------------------------------------------------- /ossfuzz-targets/lua/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | sed '/^make$/ s/#/make -j $(nproc)/' /src/build.sh 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/lua 16 | mkdir fuzzdrivergpt-install 17 | cd fuzzdrivergpt-install 18 | mkdir lib 19 | mkdir include 20 | cp /src/lua/liblua.a ./lib/liblua.a 21 | cp ../*.h ./include 22 | EOF 23 | set +eux 24 | 25 | # 26 | # do what should be done in build_fuzzers command 27 | # 28 | compile 29 | # 30 | # 31 | # 32 | 33 | ########## 34 | ## After compile, you can prepare the include/lib staff here 35 | ########## 36 | 37 | set -eux 38 | 39 | ########## 40 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 41 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 42 | ########## 43 | #while true 44 | #do 45 | # sleep 1h 46 | #done 47 | 48 | 49 | INSTALL=/root/workspace/fuzzdrivergpt/install 50 | mkdir -p ${INSTALL} 51 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 52 | cp -r /src/lua/fuzzdrivergpt-install/include ${INSTALL}/include 53 | 54 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 55 | cp -r /src/lua/fuzzdrivergpt-install/lib ${INSTALL}/lib 56 | -------------------------------------------------------------------------------- /ossfuzz-targets/lwan/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/lwan 16 | mkdir build 17 | cd build 18 | cmake -GNinja --install-prefix=/src/lwan/fuzzdrivergpt-install .. 19 | ninja install 20 | 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | ########## 39 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 40 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 41 | ########## 42 | #while true 43 | #do 44 | # sleep 1h 45 | #done 46 | 47 | 48 | INSTALL=/root/workspace/fuzzdrivergpt/install 49 | mkdir -p ${INSTALL} 50 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 51 | cp -r /src/lwan/fuzzdrivergpt-install/include ${INSTALL}/include 52 | 53 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 54 | cp -r /src/lwan/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/lz4/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/lz4/lib 16 | make install -j$(nproc) PREFIX=/src/lz4/fuzzdrivergpt-install 17 | 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/lz4/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/lz4/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/mbedtls/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | 18 | cat >> /src/build.sh << 'EOF' 19 | 20 | cd /src/mbedtls 21 | mkdir build1 22 | cd build1 23 | cmake -DENABLE_TESTING=OFF --install-prefix=/src/mbedtls/fuzzdrivergpt-install .. 24 | make -j$(nproc) install 25 | 26 | EOF 27 | set +eux 28 | 29 | # 30 | # do what should be done in build_fuzzers command 31 | # 32 | compile 33 | # 34 | # 35 | # 36 | 37 | ########## 38 | ## After compile, you can prepare the include/lib staff here 39 | ########## 40 | 41 | set -eux 42 | 43 | ########## 44 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 45 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 46 | ########## 47 | 48 | 49 | INSTALL=/root/workspace/fuzzdrivergpt/install 50 | mkdir -p ${INSTALL} 51 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 52 | cp -r /src/mbedtls/fuzzdrivergpt-install/include ${INSTALL}/include 53 | 54 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 55 | cp -r /src/mbedtls/fuzzdrivergpt-install/lib ${INSTALL}/lib 56 | -------------------------------------------------------------------------------- /ossfuzz-targets/md4c/cfg.yml: -------------------------------------------------------------------------------- 1 | md4c: 2 | language: "c" 3 | image: "fuzzdrivergpt/md4c:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ 8 | "/root/workspace/fuzzdrivergpt/install/lib/libmd4c.a", 9 | "/root/workspace/fuzzdrivergpt/install/lib/libmd4c-html.a", 10 | ] 11 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 12 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libmd4c-html.a /root/workspace/fuzzdrivergpt/install/lib/libmd4c.a -o OUTEXE" 13 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 14 | known_drivers: [ "/src/md4c/test/fuzzers/fuzz-mdhtml.c" ] 15 | 16 | # clang -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -fsanitize=fuzzer ../test/fuzzers/fuzz-mdhtml.c -o /out/fuzz-mdhtml -I../src ./src/libmd4c-html.a ./src/libmd4c.a -------------------------------------------------------------------------------- /ossfuzz-targets/md4c/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | sed '/^make$/ s/#/make -j $(nproc)/' /src/build.sh 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/md4c/build 16 | make clean 17 | cmake ../ -DBUILD_SHARED_LIBS=OFF --install-prefix=/src/md4c/fuzzdrivergpt-install 18 | make -j$(nproc) install 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | #while true 42 | #do 43 | # sleep 1h 44 | #done 45 | 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/md4c/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/md4c/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/mdbtools/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/mdbtools 15 | ./configure --enable-static --disable-man --disable-glib --disable-silent-rules --prefix=/src/mdbtools/fuzzdrivergpt-install 16 | make clean 17 | make -j$(nproc) install 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/mdbtools/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/mdbtools/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/miniz/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/miniz/build 15 | make clean 16 | cmake .. -DAMALGAMATE_SOURCES=ON -DBUILD_SHARED_LIBS=OFF --install-prefix=/src/miniz/fuzzdrivergpt-install 17 | make -j$(nproc) install 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/miniz/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/miniz/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/minizip/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/minizip-ng 16 | cmake . -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS" -DMZ_BUILD_FUZZ_TESTS=ON --install-prefix=/src/minizip-ng/fuzzdrivergpt-install -DCMAKE_VERBOSE_MAKEFILE=ON 17 | make clean 18 | make install -j$(nproc) 19 | 20 | 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | ########## 39 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 40 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 41 | ########## 42 | #while true 43 | #do 44 | # sleep 1h 45 | #done 46 | 47 | 48 | INSTALL=/root/workspace/fuzzdrivergpt/install 49 | mkdir -p ${INSTALL} 50 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 51 | cp -r /src/minizip-ng/fuzzdrivergpt-install/include ${INSTALL}/include 52 | 53 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 54 | cp -r /src/minizip-ng/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/msquic/SKIP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/occia/fuzzdrivergpt/35b0e957a61be8bd506017cda621a50e75f5acdb/ossfuzz-targets/msquic/SKIP -------------------------------------------------------------------------------- /ossfuzz-targets/msquic/cfg.yml: -------------------------------------------------------------------------------- 1 | msquic: 2 | language: "c" 3 | image: "fuzzdrivergpt/msquic:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/msquic.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "XXX_FILL_COMP_OPTS_XXX" ] 9 | build: "COMPBASE OUTFILE XXX_FILL_LINK_OPTS_XXX -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ REPLACEME ] 12 | -------------------------------------------------------------------------------- /ossfuzz-targets/msquic/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | EOF 16 | set +eux 17 | 18 | # 19 | # do what should be done in build_fuzzers command 20 | # 21 | compile 22 | # 23 | # 24 | # 25 | 26 | ########## 27 | ## After compile, you can prepare the include/lib staff here 28 | ########## 29 | 30 | set -eux 31 | 32 | ########## 33 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 34 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 35 | ########## 36 | while true 37 | do 38 | sleep 1h 39 | done 40 | 41 | 42 | INSTALL=/root/workspace/fuzzdrivergpt/install 43 | mkdir -p ${INSTALL} 44 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 45 | cp -r /src/msquic/fuzzdrivergpt-install/include ${INSTALL}/include 46 | 47 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 48 | cp -r /src/msquic/fuzzdrivergpt-install/lib ${INSTALL}/lib 49 | -------------------------------------------------------------------------------- /ossfuzz-targets/ndpi/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/ndpi 16 | ./configure --prefix=/src/ndpi/fuzzdrivergpt-install 17 | make -j$(nproc) install 18 | 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | #while true 42 | #do 43 | # sleep 1h 44 | #done 45 | 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/ndpi/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/ndpi/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/njs/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | 18 | cat >> /src/build.sh << 'EOF' 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | 42 | 43 | #INSTALL=/root/workspace/fuzzdrivergpt/install 44 | #mkdir -p ${INSTALL} 45 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 46 | #cp -r /src/njs/fuzzdrivergpt-install/include ${INSTALL}/include 47 | # 48 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 49 | #cp -r /src/njs/fuzzdrivergpt-install/lib ${INSTALL}/lib 50 | -------------------------------------------------------------------------------- /ossfuzz-targets/oniguruma/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/oniguruma 16 | make clean 17 | ./configure --prefix=/src/oniguruma/fuzzdrivergpt-install 18 | make -j$(nproc) install 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | #while true 42 | #do 43 | # sleep 1h 44 | #done 45 | 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/oniguruma/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/oniguruma/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/openexr/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/openexr 16 | mkdir build 17 | cd build 18 | cmake ${CMAKE_SETTINGS[@]} --install-prefix=/src/openexr/fuzzdrivergpt-install .. 19 | make -j$(nproc) install 20 | 21 | 22 | EOF 23 | set +eux 24 | 25 | # 26 | # do what should be done in build_fuzzers command 27 | # 28 | compile 29 | # 30 | # 31 | # 32 | 33 | ########## 34 | ## After compile, you can prepare the include/lib staff here 35 | ########## 36 | 37 | set -eux 38 | 39 | ########## 40 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 41 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 42 | ########## 43 | #while true 44 | #do 45 | # sleep 1h 46 | #done 47 | 48 | 49 | INSTALL=/root/workspace/fuzzdrivergpt/install 50 | mkdir -p ${INSTALL} 51 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 52 | cp -r /src/openexr/fuzzdrivergpt-install/include ${INSTALL}/include 53 | 54 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 55 | cp -r /src/openexr/fuzzdrivergpt-install/lib ${INSTALL}/lib 56 | -------------------------------------------------------------------------------- /ossfuzz-targets/openjpeg/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | cat >> /src/build.sh << 'EOF' 18 | 19 | cd /src/openjpeg 20 | mkdir build1 21 | cd build1 22 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON --install-prefix=/src/openjpeg/fuzzdrivergpt-install .. 23 | make -j$(nproc) install 24 | 25 | 26 | 27 | EOF 28 | set +eux 29 | 30 | # 31 | # do what should be done in build_fuzzers command 32 | # 33 | compile 34 | # 35 | # 36 | # 37 | 38 | ########## 39 | ## After compile, you can prepare the include/lib staff here 40 | ########## 41 | 42 | set -eux 43 | 44 | ########## 45 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 46 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 47 | ########## 48 | 49 | 50 | 51 | INSTALL=/root/workspace/fuzzdrivergpt/install 52 | mkdir -p ${INSTALL} 53 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 54 | cp -r /src/openjpeg/fuzzdrivergpt-install/include ${INSTALL}/include 55 | 56 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 57 | cp -r /src/openjpeg/fuzzdrivergpt-install/lib ${INSTALL}/lib 58 | -------------------------------------------------------------------------------- /ossfuzz-targets/opensips/SKIP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/occia/fuzzdrivergpt/35b0e957a61be8bd506017cda621a50e75f5acdb/ossfuzz-targets/opensips/SKIP -------------------------------------------------------------------------------- /ossfuzz-targets/opensips/cfg.yml: -------------------------------------------------------------------------------- 1 | opensips: 2 | language: "c" 3 | image: "fuzzdrivergpt/opensips:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libopensips.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libopensips.a -ldl -lresolv -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ REPLACEME ] 12 | 13 | # 14 | #clang -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -fsanitize=fuzzer ./parser/fuzz_csv_parser.o ./libopensips.a -ldl -lresolv -o /out/fuzz_csv_parser -------------------------------------------------------------------------------- /ossfuzz-targets/opensips/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/opensips 16 | 17 | EOF 18 | set +eux 19 | 20 | # 21 | # do what should be done in build_fuzzers command 22 | # 23 | compile 24 | # 25 | # 26 | # 27 | 28 | ########## 29 | ## After compile, you can prepare the include/lib staff here 30 | ########## 31 | 32 | set -eux 33 | 34 | ########## 35 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 36 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 37 | ########## 38 | while true 39 | do 40 | sleep 1h 41 | done 42 | 43 | 44 | INSTALL=/root/workspace/fuzzdrivergpt/install 45 | mkdir -p ${INSTALL} 46 | mkdir -p ${INSTALL}/lib 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/opensips/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/opensips/libopensips.a ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/opusfile/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/opusfile 15 | make clean 16 | ./configure --enable-static --disable-shared --disable-doc --enable-assertions --prefix=/src/opusfile/fuzzdrivergpt-install 17 | make install 18 | 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | #while true 42 | #do 43 | # sleep 1h 44 | #done 45 | 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/opusfile/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/opusfile/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/ostree/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/ostree 16 | ./configure --enable-static --without-selinux --prefix=/src/ostree/fuzzdrivergpt-install 17 | make -j$(nproc) install 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/ostree/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/ostree/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/p11-kit/SKIP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/occia/fuzzdrivergpt/35b0e957a61be8bd506017cda621a50e75f5acdb/ossfuzz-targets/p11-kit/SKIP -------------------------------------------------------------------------------- /ossfuzz-targets/p11-kit/cfg.yml: -------------------------------------------------------------------------------- 1 | p11-kit: 2 | language: "c" 3 | image: "fuzzdrivergpt/p11-kit:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/p11-kit.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "XXX_FILL_COMP_OPTS_XXX" ] 9 | build: "COMPBASE OUTFILE XXX_FILL_LINK_OPTS_XXX -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ 12 | "/src/p11-kit/fuzz/main.c" , 13 | "/src/p11-kit/rpc_fuzzer.c" ] 14 | 15 | -------------------------------------------------------------------------------- /ossfuzz-targets/p11-kit/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/p11-kit 15 | 16 | EOF 17 | set +eux 18 | 19 | # 20 | # do what should be done in build_fuzzers command 21 | # 22 | compile 23 | # 24 | # 25 | # 26 | 27 | ########## 28 | ## After compile, you can prepare the include/lib staff here 29 | ########## 30 | 31 | set -eux 32 | 33 | ########## 34 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 35 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 36 | ########## 37 | while true 38 | do 39 | sleep 1h 40 | done 41 | 42 | 43 | INSTALL=/root/workspace/fuzzdrivergpt/install 44 | mkdir -p ${INSTALL} 45 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 46 | cp -r /src/p11-kit/fuzzdrivergpt-install/include ${INSTALL}/include 47 | 48 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 49 | cp -r /src/p11-kit/fuzzdrivergpt-install/lib ${INSTALL}/lib 50 | -------------------------------------------------------------------------------- /ossfuzz-targets/picotls/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE\ 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | 18 | cat >> /src/build.sh << 'EOF' 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | 42 | 43 | #INSTALL=/root/workspace/fuzzdrivergpt/install 44 | #mkdir -p ${INSTALL} 45 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 46 | #cp -r /src/picotls/fuzzdrivergpt-install/include ${INSTALL}/include 47 | # 48 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 49 | #cp -r /src/picotls/fuzzdrivergpt-install/lib ${INSTALL}/lib 50 | -------------------------------------------------------------------------------- /ossfuzz-targets/postfix/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | EOF 16 | set +eux 17 | 18 | # 19 | # do what should be done in build_fuzzers command 20 | # 21 | compile 22 | # 23 | # 24 | # 25 | 26 | ########## 27 | ## After compile, you can prepare the include/lib staff here 28 | ########## 29 | 30 | set -eux 31 | 32 | ########## 33 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 34 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 35 | ########## 36 | #while true 37 | #do 38 | # sleep 1h 39 | #done 40 | 41 | 42 | INSTALL=/root/workspace/fuzzdrivergpt/install 43 | mkdir -p ${INSTALL} 44 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 45 | cp -r /src/postfix/postfix/lib ${INSTALL}/lib 46 | -------------------------------------------------------------------------------- /ossfuzz-targets/proftpd/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/proftpd/tests/fuzzing/oss_fuzz_build.sh << 'EOF' 14 | 15 | pushd /src/proftpd 16 | ./configure --enable-ctrls --prefix=/src/proftpd/fuzzdrivergpt-install 17 | make -j$(nproc) install 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | # 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | mkdir -p ${INSTALL}/lib 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/proftpd/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp /src/proftpd/lib/prbase.a ${INSTALL}/lib/prbase.a 53 | cp /src/proftpd/fuzz_lib.a ${INSTALL}/lib/fuzz_lib.a 54 | cp -r /src/proftpd/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/protobuf-c/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | #sed -i 's#configure#configure --prefix=/src/protobuf-c/fuzzdrivergpt-install#g' /src/build.sh 12 | set -eux 13 | # FILL HERE 14 | cat >> /src/build.sh << 'EOF' 15 | cd /src/protobuf-c 16 | ./configure --enable-static=yes --enable-shared=false --prefix=/src/protobuf-c/fuzzdrivergpt-install 17 | make -j$(nproc) 18 | make install 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | #while true 42 | #do 43 | # sleep 1h 44 | #done 45 | 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/protobuf-c/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/protobuf-c/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/pupnp/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/pupnp/build 15 | make clean 16 | cmake -DFUZZER=ON -DLIB_FUZZING_ENGINE="$LIB_FUZZING_ENGINE" --install-prefix=/src/pupnp/fuzzdrivergpt-install ../ 17 | make -j$(nproc) install 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/pupnp/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/pupnp/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/pycryptodome/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/pycryptodome/src 15 | 16 | EOF 17 | set +eux 18 | 19 | # 20 | # do what should be done in build_fuzzers command 21 | # 22 | compile 23 | # 24 | # 25 | # 26 | 27 | ########## 28 | ## After compile, you can prepare the include/lib staff here 29 | ########## 30 | 31 | set -eux 32 | 33 | ########## 34 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 35 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 36 | ########## 37 | #while true 38 | #do 39 | # sleep 1h 40 | #done 41 | 42 | -------------------------------------------------------------------------------- /ossfuzz-targets/quickjs/cfg.yml: -------------------------------------------------------------------------------- 1 | quickjs: 2 | language: "c" 3 | image: "fuzzdrivergpt/quickjs:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/src/quickjs" : "*.h" } 7 | binaries: [ "/src/quickjs/libquickjs.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/src/quickjs", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link", ] 9 | build: "COMPBASE OUTFILE /src/quickjs/libquickjs.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/fuzz_compile.c","/src/fuzz_eval.c","/src/fuzz_regexp.c" ] 12 | 13 | 14 | #+ clang -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -Iquickjs -c fuzz_regexp.c -o fuzz_regexp.o 15 | # + clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ fuzz_regexp.o -o /out/fuzz_regexp quickjs/libquickjs.a -fsanitize=fuzzer 16 | # -------------------------------------------------------------------------------- /ossfuzz-targets/quickjs/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | alias make="make -j$(nproc)" 12 | set -eux 13 | # FILL HERE 14 | cat >> /src/build.sh << 'EOF' 15 | cd /src/quickjs 16 | 17 | EOF 18 | set +eux 19 | 20 | # 21 | # do what should be done in build_fuzzers command 22 | # 23 | compile 24 | # 25 | # 26 | # 27 | 28 | ########## 29 | ## After compile, you can prepare the include/lib staff here 30 | ########## 31 | 32 | set -eux 33 | 34 | ########## 35 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 36 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 37 | ########## 38 | #while true 39 | #do 40 | # sleep 1h 41 | #done 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /ossfuzz-targets/readstat/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/readstat 16 | ./configure --enable-static --prefix=/src/readstat/fuzzdrivergpt-install 17 | make -j$(nproc) install 18 | 19 | 20 | 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | ########## 39 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 40 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 41 | ########## 42 | #while true 43 | #do 44 | # sleep 1h 45 | #done 46 | 47 | 48 | INSTALL=/root/workspace/fuzzdrivergpt/install 49 | mkdir -p ${INSTALL} 50 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 51 | cp -r /src/readstat/fuzzdrivergpt-install/include ${INSTALL}/include 52 | 53 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 54 | cp -r /src/readstat/fuzzdrivergpt-install/lib ${INSTALL}/lib 55 | -------------------------------------------------------------------------------- /ossfuzz-targets/ruby/SKIP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/occia/fuzzdrivergpt/35b0e957a61be8bd506017cda621a50e75f5acdb/ossfuzz-targets/ruby/SKIP -------------------------------------------------------------------------------- /ossfuzz-targets/ruby/cfg.yml: -------------------------------------------------------------------------------- 1 | ruby: 2 | language: "c" 3 | image: "fuzzdrivergpt/ruby:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/usr/local/include/ruby-3.3.0+0" : "**/*.h" } 7 | binaries: [ "/src/ruby/libruby-static.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ,"-I/usr/local/include/ruby-3.3.0+0/x86_64-linux","-I/usr/local/include/ruby-3.3.0+0"] 9 | build: "COMPBASE OUTFILE -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lruby -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/fuzz_ruby_gems.c" ] 12 | 13 | #clang -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link fuzz_ruby_gems.c -o /out/fuzz_ruby_gems -Wall '-Wl,-rpath,$ORIGIN/lib' -L/usr/local/lib -I/usr/local/include/ruby-3.3.0+0/x86_64-linux -I/usr/local/include/ruby-3.3.0+0 -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lruby -fsanitize=fuzzer 14 | 15 | -------------------------------------------------------------------------------- /ossfuzz-targets/ruby/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | 12 | set -eux 13 | # FILL HERE 14 | cat >> /src/build.sh << 'EOF' 15 | 16 | EOF 17 | set +eux 18 | 19 | # 20 | # do what should be done in build_fuzzers command 21 | # 22 | compile 23 | # 24 | # 25 | # 26 | 27 | ########## 28 | ## After compile, you can prepare the include/lib staff here 29 | ########## 30 | 31 | set -eux 32 | 33 | ########## 34 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 35 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 36 | ########## 37 | #while true 38 | #do 39 | # sleep 1h 40 | #done 41 | # 42 | # 43 | #INSTALL=/root/workspace/fuzzdrivergpt/install 44 | #mkdir -p ${INSTALL} 45 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 46 | #cp -r /src/ruby/fuzzdrivergpt-install/include ${INSTALL}/include 47 | # 48 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 49 | #cp -r /src/ruby/fuzzdrivergpt-install/lib ${INSTALL}/lib 50 | -------------------------------------------------------------------------------- /ossfuzz-targets/samba/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | #sed -i 's#./configure#./configure --prefix=/src/samba/fuzzdrivergpt-install#g' /src/samba/lib/fuzzing/oss-fuzz/do_build.sh 13 | # FILL HERE 14 | #/src/samba/lib/fuzzing/oss-fuzz/build_image.sh 15 | 16 | cat >> /src/samba/lib/fuzzing/oss-fuzz/do_build.sh << 'EOF' 17 | cd /src/samba 18 | make -j$(nproc) install 19 | rm -rf /src/samba/bin 20 | rm -rf /out/* 21 | EOF 22 | set +eux 23 | 24 | # 25 | # do what should be done in build_fuzzers command 26 | # 27 | compile 28 | # 29 | # 30 | # 31 | 32 | ########## 33 | ## After compile, you can prepare the include/lib staff here 34 | ########## 35 | 36 | set -eux 37 | 38 | ########## 39 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 40 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 41 | ########## 42 | #while true 43 | #do 44 | # sleep 1h 45 | #done 46 | 47 | 48 | -------------------------------------------------------------------------------- /ossfuzz-targets/selinux/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | export DESTDIR="/src/selinux/fuzzdrivergpt-install" 12 | set -eux 13 | # FILL HERE 14 | cat >> /src/selinux/scripts/oss-fuzz.sh << 'EOF' 15 | 16 | 17 | EOF 18 | set +eux 19 | 20 | # 21 | # do what should be done in build_fuzzers command 22 | # 23 | compile 24 | # 25 | # 26 | # 27 | 28 | ########## 29 | ## After compile, you can prepare the include/lib staff here 30 | ########## 31 | 32 | set -eux 33 | 34 | ########## 35 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 36 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 37 | ########## 38 | #while true 39 | #do 40 | # sleep 1h 41 | #done 42 | 43 | 44 | INSTALL=/root/workspace/fuzzdrivergpt/install 45 | mkdir -p ${INSTALL} 46 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 47 | #cp -r /src/selinux/fuzzdrivergpt-install/include ${INSTALL}/include 48 | # 49 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 50 | #cp -r /src/selinux/fuzzdrivergpt-install/lib ${INSTALL}/lib 51 | -------------------------------------------------------------------------------- /ossfuzz-targets/sleuthkit/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | apt install -y libz-dev 14 | cat >> /src/build.sh << 'EOF' 15 | 16 | ./configure --prefix=/src/sleuthkit/fuzzdrivergpt-install --enable-static --disable-shared --disable-java --without-afflib --without-libewf --without-libvhdi --without-libvmdk 17 | make -j$(nproc) install 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/sleuthkit/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/sleuthkit/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/sound-open-firmware/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/sof 15 | 16 | EOF 17 | set +eux 18 | 19 | # 20 | # do what should be done in build_fuzzers command 21 | # 22 | compile 23 | # 24 | # 25 | # 26 | 27 | ########## 28 | ## After compile, you can prepare the include/lib staff here 29 | ########## 30 | 31 | set -eux 32 | 33 | ########## 34 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 35 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 36 | ########## 37 | #while true 38 | #do 39 | # sleep 1h 40 | #done 41 | 42 | 43 | #INSTALL=/root/workspace/fuzzdrivergpt/install 44 | #mkdir -p ${INSTALL} 45 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 46 | #cp -r /src/sound-open-firmware/fuzzdrivergpt-install/include ${INSTALL}/include 47 | # 48 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 49 | #cp -r /src/sound-open-firmware/fuzzdrivergpt-install/lib ${INSTALL}/lib 50 | -------------------------------------------------------------------------------- /ossfuzz-targets/spdk/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/spdk 15 | ./configure --without-shared --prefix=/src/spdk/fuzzdrivergpt-install 16 | make -j$(nproc) install 17 | 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/spdk/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/spdk/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/template/SKIP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/occia/fuzzdrivergpt/35b0e957a61be8bd506017cda621a50e75f5acdb/ossfuzz-targets/template/SKIP -------------------------------------------------------------------------------- /ossfuzz-targets/template/cfg.yml: -------------------------------------------------------------------------------- 1 | TEMPLATE: 2 | language: "c" 3 | image: "fuzzdrivergpt/TEMPLATE:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/TEMPLATE.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "XXX_FILL_COMP_OPTS_XXX" ] 9 | build: "COMPBASE OUTFILE XXX_FILL_LINK_OPTS_XXX -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ REPLACEME ] 12 | -------------------------------------------------------------------------------- /ossfuzz-targets/template/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | EOF 16 | set +eux 17 | 18 | # 19 | # do what should be done in build_fuzzers command 20 | # 21 | compile 22 | # 23 | # 24 | # 25 | 26 | ########## 27 | ## After compile, you can prepare the include/lib staff here 28 | ########## 29 | 30 | set -eux 31 | 32 | ########## 33 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 34 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 35 | ########## 36 | while true 37 | do 38 | sleep 1h 39 | done 40 | 41 | 42 | INSTALL=/root/workspace/fuzzdrivergpt/install 43 | mkdir -p ${INSTALL} 44 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 45 | cp -r /src/template/fuzzdrivergpt-install/include ${INSTALL}/include 46 | 47 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 48 | cp -r /src/template/fuzzdrivergpt-install/lib ${INSTALL}/lib 49 | -------------------------------------------------------------------------------- /ossfuzz-targets/tidy-html5/cfg.yml: -------------------------------------------------------------------------------- 1 | tidy-html5: 2 | language: "c" 3 | image: "fuzzdrivergpt/tidy-html5:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '#include "tidy.h"\n' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libtidy.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE /work/tidy-html5/libtidy.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: ['/src/tidy_config_fuzzer.c', '/src/tidy_general_fuzzer.c', '/src/tidy_parse_string_fuzzer.c', '/src/tidy_fuzzer.c', '/src/tidy_parse_file_fuzzer.c', '/src/tidy_xml_fuzzer.c'] 12 | 13 | #+ clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++11 tidy_general_fuzzer.o -o /out/tidy_general_fuzzer -fsanitize=fuzzer /work/tidy-html5/libtidy.a -------------------------------------------------------------------------------- /ossfuzz-targets/tidy-html5/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | cat >> /src/build.sh << 'EOF' 18 | 19 | cd /src/tidy-html5 20 | mkdir build1 21 | cd build1 22 | cmake -GNinja -DCMAKE_INSTALL_PREFIX=/src/tidy-html5/fuzzdrivergpt-install ${SRC}/tidy-html5/ 23 | ninja 24 | ninja install 25 | 26 | EOF 27 | set +eux 28 | 29 | 30 | # 31 | # do what should be done in build_fuzzers command 32 | # 33 | compile 34 | # 35 | # 36 | # 37 | 38 | ########## 39 | ## After compile, you can prepare the include/lib staff here 40 | ########## 41 | 42 | set -eux 43 | 44 | ########## 45 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 46 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 47 | ########## 48 | 49 | 50 | INSTALL=/root/workspace/fuzzdrivergpt/install 51 | mkdir -p ${INSTALL} 52 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 53 | cp -r /src/tidy-html5/fuzzdrivergpt-install/include ${INSTALL}/include 54 | 55 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 56 | cp -r /src/tidy-html5/fuzzdrivergpt-install/lib ${INSTALL}/lib 57 | -------------------------------------------------------------------------------- /ossfuzz-targets/unit/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/unit 15 | 16 | 17 | EOF 18 | set +eux 19 | 20 | # 21 | # do what should be done in build_fuzzers command 22 | # 23 | compile 24 | # 25 | # 26 | # 27 | 28 | ########## 29 | ## After compile, you can prepare the include/lib staff here 30 | ########## 31 | 32 | set -eux 33 | 34 | ########## 35 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 36 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 37 | ########## 38 | #while true 39 | #do 40 | # sleep 1h 41 | #done 42 | # 43 | # 44 | #INSTALL=/root/workspace/fuzzdrivergpt/install 45 | #mkdir -p ${INSTALL} 46 | ## copy the headers to /root/workspace/fuzzdrivergpt/install/include 47 | #cp -r /src/unit/fuzzdrivergpt-install/include ${INSTALL}/include 48 | # 49 | ## copy the libs to /root/workspace/fuzzdrivergpt/install/lib 50 | #cp -r /src/unit/fuzzdrivergpt-install/lib ${INSTALL}/lib 51 | -------------------------------------------------------------------------------- /ossfuzz-targets/uriparser/cfg.yml: -------------------------------------------------------------------------------- 1 | uriparser: 2 | language: "c" 3 | image: "fuzzdrivergpt/uriparser:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include": "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/liburiparser.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE /src/uriparser/build/liburiparser.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/uri_dissect_query_malloc_fuzzer.cc","/src/uri_parse_fuzzer.cc","/src/uri_free_fuzzer.cc" ] 12 | 13 | #clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++11 -I. /src/uri_dissect_query_malloc_fuzzer.cc -fsanitize=fuzzer ./liburiparser.a -o /out/uri_dissect_query_malloc_fuzzer -------------------------------------------------------------------------------- /ossfuzz-targets/uriparser/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/uriparser 16 | mkdir build1 17 | cd build1 18 | 19 | cmake -DCMAKE_BUILD_TYPE=Release -DURIPARSER_BUILD_DOCS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -DURIPARSER_BUILD_TESTS:BOOL=OFF --install-prefix=/src/uriparser/fuzzdrivergpt-install .. 20 | make -j$(nproc) install 21 | 22 | EOF 23 | set +eux 24 | 25 | # 26 | # do what should be done in build_fuzzers command 27 | # 28 | compile 29 | # 30 | # 31 | # 32 | 33 | ########## 34 | ## After compile, you can prepare the include/lib staff here 35 | ########## 36 | 37 | set -eux 38 | 39 | ########## 40 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 41 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 42 | ########## 43 | 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/uriparser/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/uriparser/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | 54 | #while true 55 | #do 56 | # sleep 1h 57 | #done 58 | -------------------------------------------------------------------------------- /ossfuzz-targets/utf8proc/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | echo set\(CMAKE_VERBOSE_MAKEFILE ON\) >> /src/utf8proc/CMakeLists.txt 12 | set -eux 13 | # FILL HERE 14 | cat >> /src/utf8proc/test/ossfuzz.sh << 'EOF' 15 | cd /src/utf8proc 16 | cd build 17 | cmake .. -DUTF8PROC_ENABLE_TESTING=ON -DLIB_FUZZING_ENGINE="$LIB_FUZZING_ENGINE" --install-prefix=/src/utf8proc/fuzzdrivergpt-install 18 | V=1 make -j$(nproc) install 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | #while true 42 | #do 43 | # sleep 1h 44 | #done 45 | 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/utf8proc/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/utf8proc/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/varnish/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/varnish-cache 15 | ./configure --enable-oss-fuzz PCRE2_LIBS=-l:libpcre2-8.a --prefix=/src/varnish-cache/fuzzdrivergpt-install 16 | make -j$(nproc) install 17 | 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | # 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/varnish-cache/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/varnish-cache/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/w3m/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/w3m 15 | #make clean 16 | #./configure --prefix=/src/w3m/fuzzdrivergpt-install 17 | #make -j$(nproc) install 18 | 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | #while true 42 | #do 43 | # sleep 1h 44 | #done 45 | # 46 | 47 | -------------------------------------------------------------------------------- /ossfuzz-targets/wasm3/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | EOF 16 | set +eux 17 | 18 | # 19 | # do what should be done in build_fuzzers command 20 | # 21 | compile 22 | # 23 | # 24 | # 25 | 26 | ########## 27 | ## After compile, you can prepare the include/lib staff here 28 | ########## 29 | 30 | set -eux 31 | 32 | ########## 33 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 34 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 35 | ########## 36 | #while true 37 | #do 38 | # sleep 1h 39 | #done 40 | 41 | 42 | -------------------------------------------------------------------------------- /ossfuzz-targets/wavpack/cfg.yml: -------------------------------------------------------------------------------- 1 | wavpack: 2 | language: "c" 3 | image: "fuzzdrivergpt/wavpack:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libwavpack.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include","-I/src/wavpack/cli", "-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link" ] 9 | build: "COMPBASE OUTFILE /src/wavpack/src/.libs/libwavpack.a -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/wavpack/fuzzing/fuzzer.cc" ] 12 | 13 | #+ clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++11 -I/src/wavpack/include -I/src/wavpack/cli /src/wavpack/fuzzing/fuzzer.cc -o /out/fuzzer -fsanitize=fuzzer /src/wavpack/src/.libs/libwavpack.a -------------------------------------------------------------------------------- /ossfuzz-targets/wavpack/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/wavpack 16 | CFLAGS="$CFLAGS -fno-sanitize=signed-integer-overflow" ./configure --disable-apps --disable-shared --enable-static --prefix=/src/wavpack/fuzzdrivergpt-install 17 | make install 18 | 19 | EOF 20 | set +eux 21 | 22 | # 23 | # do what should be done in build_fuzzers command 24 | # 25 | compile 26 | # 27 | # 28 | # 29 | 30 | ########## 31 | ## After compile, you can prepare the include/lib staff here 32 | ########## 33 | 34 | set -eux 35 | 36 | ########## 37 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 38 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 39 | ########## 40 | #while true 41 | #do 42 | # sleep 1h 43 | #done 44 | 45 | 46 | INSTALL=/root/workspace/fuzzdrivergpt/install 47 | mkdir -p ${INSTALL} 48 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 49 | cp -r /src/wavpack/fuzzdrivergpt-install/include ${INSTALL}/include 50 | 51 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 52 | cp -r /src/wavpack/fuzzdrivergpt-install/lib ${INSTALL}/lib 53 | -------------------------------------------------------------------------------- /ossfuzz-targets/wolfmqtt/cfg.yml: -------------------------------------------------------------------------------- 1 | wolfmqtt: 2 | language: "c" 3 | image: "fuzzdrivergpt/wolfmqtt:env" 4 | apiblocklist: [ "^$" ] 5 | precode: '' 6 | headers: { "/root/workspace/fuzzdrivergpt/install/include" : "**/*" } 7 | binaries: [ "/root/workspace/fuzzdrivergpt/install/lib/libwolfmqtt.a" ] 8 | compile: [ "/usr/local/bin/clang-15", "-isystem", "/usr/local/lib/clang/15.0.0/include", "-isystem", "/usr/local/include", "-isystem", "/usr/include/x86_64-linux-gnu", "-isystem", "/usr/include", "-fsanitize=address", "-fsanitize=fuzzer","-I/root/workspace/fuzzdrivergpt/install/include","-O1","-fno-omit-frame-pointer","-gline-tables-only","-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION","-fsanitize=address","-fsanitize-address-use-after-scope","-fsanitize=fuzzer-no-link","-I/src/wolfssl/","-I/src/wolfmqtt/" ] 9 | build: "COMPBASE OUTFILE /root/workspace/fuzzdrivergpt/install/lib/libwolfmqtt.a /src/wolfssl/src/.libs/libwolfssl.a -lm -lpthread -o OUTEXE" 10 | run: "OUTEXE -detect_leaks=0 -max_total_time=60 -timeout=30 -artifact_prefix=ARTIFACTDIR/ -close_fd_mask=3 SEEDDIR" 11 | known_drivers: [ "/src/wolfmqtt-fuzzers/fuzzer.cpp" ] 12 | 13 | 14 | # clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++17 -I /src/fuzzing-headers/include/ -I/src/wolfssl/ -I/src/wolfmqtt/ /src/wolfmqtt-fuzzers/fuzzer.cpp /src/wolfmqtt/src/.libs/libwolfmqtt.a /src/wolfssl/src/.libs/libwolfssl.a -fsanitize=fuzzer -o /out/wolfmqtt-fuzzer -------------------------------------------------------------------------------- /ossfuzz-targets/wolfmqtt/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | cd /src/wolfmqtt 15 | make clean 16 | ./configure --enable-static --disable-examples --enable-mqtt5 --prefix=/src/wolfmqtt/fuzzdrivergpt-install 17 | make -j$(nproc) install 18 | EOF 19 | set +eux 20 | 21 | # 22 | # do what should be done in build_fuzzers command 23 | # 24 | compile 25 | # 26 | # 27 | 28 | 29 | ########## 30 | ## After compile, you can prepare the include/lib staff here 31 | ########## 32 | 33 | set -eux 34 | 35 | ########## 36 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 37 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 38 | ########## 39 | #while true 40 | #do 41 | # sleep 1h 42 | #done 43 | 44 | 45 | INSTALL=/root/workspace/fuzzdrivergpt/install 46 | mkdir -p ${INSTALL} 47 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 48 | cp -r /src/wolfmqtt/fuzzdrivergpt-install/include ${INSTALL}/include 49 | 50 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 51 | cp -r /src/wolfmqtt/fuzzdrivergpt-install/lib ${INSTALL}/lib 52 | -------------------------------------------------------------------------------- /ossfuzz-targets/zlib/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | cat >> /src/build.sh << 'EOF' 14 | 15 | cd /src/zlib 16 | ./configure --prefix=/src/zlib/fuzzdrivergpt-install 17 | make -j$(nproc) install 18 | 19 | 20 | EOF 21 | set +eux 22 | 23 | # 24 | # do what should be done in build_fuzzers command 25 | # 26 | compile 27 | # 28 | # 29 | # 30 | 31 | ########## 32 | ## After compile, you can prepare the include/lib staff here 33 | ########## 34 | 35 | set -eux 36 | 37 | ########## 38 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 39 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 40 | ########## 41 | #while true 42 | #do 43 | # sleep 1h 44 | #done 45 | 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/zlib/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/zlib/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /ossfuzz-targets/zstd/fuzzdrivergpt_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | 5 | ########## 6 | ## Before compile, you can modify build.sh for eaiser preparation here 7 | ########## 8 | # install libclang for our python usage, do this for all oss-fuzz projects 9 | pip3 install libclang 10 | export MAKEFLAGS="-j`nproc`" 11 | set -eux 12 | # FILL HERE 13 | #while true 14 | #do 15 | # sleep 1h 16 | #done 17 | cat >> /src/build.sh << 'EOF' 18 | 19 | cd /src/zstd 20 | make install -j$(nproc) PREFIX=/src/zstd/fuzzdrivergpt-install 21 | 22 | 23 | EOF 24 | set +eux 25 | 26 | # 27 | # do what should be done in build_fuzzers command 28 | # 29 | compile 30 | # 31 | # 32 | # 33 | 34 | ########## 35 | ## After compile, you can prepare the include/lib staff here 36 | ########## 37 | 38 | set -eux 39 | 40 | ########## 41 | # UNCOMMENT this for manual exploration on how to write this fuzzdrivergpt_build.sh 42 | # COMMENT this for testing the real logic of fuzzdrivergpt_build.sh 43 | ########## 44 | 45 | 46 | 47 | INSTALL=/root/workspace/fuzzdrivergpt/install 48 | mkdir -p ${INSTALL} 49 | # copy the headers to /root/workspace/fuzzdrivergpt/install/include 50 | cp -r /src/zstd/fuzzdrivergpt-install/include ${INSTALL}/include 51 | 52 | # copy the libs to /root/workspace/fuzzdrivergpt/install/lib 53 | cp -r /src/zstd/fuzzdrivergpt-install/lib ${INSTALL}/lib 54 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==2.3.2 2 | flask_cors==3.0.10 3 | flask_httpauth==4.8.0 4 | ipdb==0.13.13 5 | openai==0.27.8 6 | PyYAML==6.0 7 | Requests==2.31.0 8 | transformers==4.30.2 9 | utils==1.0.1 10 | cxxfilt==0.3.0 11 | docker==6.1.3 12 | pathos==0.3.0 13 | tblib==1.7.0 14 | libclang==11.0.0 15 | -------------------------------------------------------------------------------- /validation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/occia/fuzzdrivergpt/35b0e957a61be8bd506017cda621a50e75f5acdb/validation/__init__.py --------------------------------------------------------------------------------