Skip to content

Commit a88226d

Browse files
committed
Generate execute corpus in generate_all.php
And add crypt() to the function blacklist, it can be very slow.
1 parent ac98ac7 commit a88226d

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

sapi/fuzzer/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ When running `make` it creates these binaries in `sapi/fuzzer/`:
2525
* `php-fuzz-unserializehash`: Fuzzing unserialize() for HashContext objects
2626
* `php-fuzz-json`: Fuzzing JSON parser (requires --enable-json)
2727
* `php-fuzz-exif`: Fuzzing `exif_read_data()` function (requires --enable-exif)
28-
* `php-fuzz-mbstring`: fuzzing `mb_ereg[i]()` (requires --enable-mbstring)
28+
* `php-fuzz-mbstring`: Fuzzing `mb_ereg[i]()` (requires --enable-mbstring)
29+
* `php-fuzz-execute`: Fuzzing the executor
2930

3031
Some fuzzers have a seed corpus in `sapi/fuzzer/corpus`. You can use it as follows:
3132

sapi/fuzzer/fuzzer-sapi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ const char HARDCODED_INI[] =
5050
",chgrp,chmod,chown,copy,file_put_contents,lchgrp,lchown,link,mkdir"
5151
",move_uploaded_file,rename,rmdir,symlink,tempname,touch,unlink,fopen"
5252
",fsockopen,stream_socket_pair,stream_socket_client"
53+
/* crypt() can be very slow. */
54+
",crypt"
5355
/* openlog() has a known memory-management issue. */
5456
",openlog"
5557
;

sapi/fuzzer/generate_all.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
require __DIR__ . '/generate_unserialize_dict.php';
33
require __DIR__ . '/generate_unserializehash_corpus.php';
44
require __DIR__ . '/generate_parser_corpus.php';
5+
require __DIR__ . '/generate_execute_corpus.php';

0 commit comments

Comments
 (0)