]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Reduce Max number of commands handled per fuzzer pass in quic-lcidm. master
authorNeil Horman <nhorman@openssl.org>
Wed, 1 Oct 2025 21:34:38 +0000 (17:34 -0400)
committerTomas Mraz <tomas@openssl.org>
Sat, 4 Oct 2025 08:28:50 +0000 (10:28 +0200)
We've gotten a few recent reports of a hang in the quic-lcidm fuzzer:

https://issues.oss-fuzz.com/issues/448510502

It looks pretty straightforward (I think).  The fuzzer input buffer is
used in this particular case to randomly issue commands to the lcidm
hash table (add/delete/query/flush/etc).

The loop for the command processing (based on the input buffer), is
limited to 10k commands.  However the fuzzer will on occasion provide
very large buffers (500k) which easily saturate that limit.  If the
input buffer happens to do something like get biased toward mostly
additions, we wind up with a huge hashtable that has to constantly grow
and rehash, which we've seen leads to timeouts in the past.

Most direct fix I think here, given that this is something of an
artificial failure in the fuzzer, is to simply clamp the command limit
more.

Fixes openssl/project#1664

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28724)

fuzz/quic-lcidm.c

index 4c206e631f9715769c34ba186c4ed50b6cb0c564..221bc0950137b23267fa90f91fdc8b1585930cdc 100644 (file)
@@ -48,7 +48,7 @@ enum {
     CMD_LOOKUP
 };
 
-#define MAX_CMDS    10000
+#define MAX_CMDS    5000
 
 static int get_cid(PACKET *pkt, QUIC_CONN_ID *cid)
 {