diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-10 11:55:37 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-05-11 02:12:35 +0900 |
commit | 82544241bade82d0740378fa099d0d6c3dcfaeb0 (patch) | |
tree | 61f18a576560920f57ade11e4d52dc18d8e7c0cd /src/fuzz | |
parent | 01c99b29e961b7f0ad8bfe24d56a03c77ef50100 (diff) | |
download | systemd-82544241bade82d0740378fa099d0d6c3dcfaeb0.tar.gz |
fuzz-bootspec: limit input size
https://oss-fuzz.com/testcase-detail/5680508182331392 has the
first timeout with 811kb of input. As in the other cases, the code
is known to be slow with lots of repeated entries and we're fine with
that.
Diffstat (limited to 'src/fuzz')
-rw-r--r-- | src/fuzz/fuzz-bootspec.c | 3 | ||||
-rw-r--r-- | src/fuzz/fuzz-bootspec.options | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/fuzz/fuzz-bootspec.c b/src/fuzz/fuzz-bootspec.c index b59e67c24e..fa9e3f06e0 100644 --- a/src/fuzz/fuzz-bootspec.c +++ b/src/fuzz/fuzz-bootspec.c @@ -84,6 +84,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { _cleanup_(boot_config_free) BootConfig config = BOOT_CONFIG_NULL; int r; + if (size > 65535) + return 0; + /* Disable most logging if not running standalone */ if (!getenv("SYSTEMD_LOG_LEVEL")) log_set_max_level(LOG_CRIT); diff --git a/src/fuzz/fuzz-bootspec.options b/src/fuzz/fuzz-bootspec.options new file mode 100644 index 0000000000..0824b19fab --- /dev/null +++ b/src/fuzz/fuzz-bootspec.options @@ -0,0 +1,2 @@ +[libfuzzer] +max_len = 65535 |