Large images mean large memory allocations, which could fail or at least be
very slow.
Also large images mean large files, which fuzzing generally cannot create.
Finally,
most parsing bugs (at least that we've found!) don't seem to rely on actually
large
images. So simply reduce the maximum size of an image to something we're more
likely
to actually be able to provide.
---
include/grub/bitmap.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/grub/bitmap.h b/include/grub/bitmap.h
index 431048936132..1e0c2666bc10 100644
--- a/include/grub/bitmap.h
+++ b/include/grub/bitmap.h
@@ -25,7 +25,11 @@
#include <grub/video.h>
#include <grub/safemath.h>
+#ifdef FUZZING_BUILD_MODE_NOT_SAFE_FOR_PRODUCTION
+#define IMAGE_HW_MAX_PX 512
+#else
#define IMAGE_HW_MAX_PX 16384
+#endif
struct grub_video_bitmap
{
--
2.25.1
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel