diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-05-13 01:04:20 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 01:04:20 +0900 |
commit | 57ee137ff203e3b23d5ae39242d1835ca6a1fabb (patch) | |
tree | 3edcb9810e79fcd1afcc78c7cc0740954fd04bfe /src/resolve | |
parent | cd0cade1ad67405a4ce205b855836e9b605e90d0 (diff) | |
parent | c4f883b78e5ffd326a82eaf18e01a9e4e243db58 (diff) | |
download | systemd-57ee137ff203e3b23d5ae39242d1835ca6a1fabb.tar.gz |
Merge pull request #23358 from keszybz/fuzzer-input-sizes
fuzzers: add input size limits, always configure limits in two ways
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/fuzz-dns-packet.c | 2 | ||||
-rw-r--r-- | src/resolve/fuzz-dns-packet.options | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/resolve/fuzz-dns-packet.c b/src/resolve/fuzz-dns-packet.c index b9a0aa1216..de5ee20434 100644 --- a/src/resolve/fuzz-dns-packet.c +++ b/src/resolve/fuzz-dns-packet.c @@ -7,7 +7,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { _cleanup_(dns_packet_unrefp) DnsPacket *p = NULL; - if (size > DNS_PACKET_SIZE_MAX) + if (outside_size_range(size, 0, DNS_PACKET_SIZE_MAX)) return 0; assert_se(dns_packet_new(&p, DNS_PROTOCOL_DNS, 0, DNS_PACKET_SIZE_MAX) >= 0); diff --git a/src/resolve/fuzz-dns-packet.options b/src/resolve/fuzz-dns-packet.options index 0824b19fab..678d526b1e 100644 --- a/src/resolve/fuzz-dns-packet.options +++ b/src/resolve/fuzz-dns-packet.options @@ -1,2 +1,2 @@ [libfuzzer] -max_len = 65535 +max_len = 65536 |