From: Evgeny Vereshchagin Date: Sat, 30 Oct 2021 18:09:30 +0000 (+0000) Subject: mount_fuzz: reject giant files early X-Git-Tag: v2.38-rc1~195^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=58c3bc12a54c9d78fe0999036a3cca70bdda1d6e;p=thirdparty%2Futil-linux.git mount_fuzz: reject giant files early It should help to address https://github.com/google/oss-fuzz/issues/6703 Signed-off-by: Evgeny Vereshchagin --- diff --git a/libmount/src/fuzz.c b/libmount/src/fuzz.c index e845016a0a..2c84714430 100644 --- a/libmount/src/fuzz.c +++ b/libmount/src/fuzz.c @@ -13,6 +13,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (size == 0) return 0; + // 128Kb should be enough to trigger all the issues we're interested in + if (size > 131072) + return 0; + tb = mnt_new_table(); if (!tb) err_oom();