diff --git a/meta-oe/recipes-support/imagemagick/files/CVE-2025-66628.patch b/meta-oe/recipes-support/imagemagick/files/CVE-2025-66628.patch new file mode 100644 index 0000000000..6b1d14ca06 --- /dev/null +++ b/meta-oe/recipes-support/imagemagick/files/CVE-2025-66628.patch @@ -0,0 +1,23 @@ +From bdae0681ad1e572defe62df85834218f01e6d670 Mon Sep 17 00:00:00 2001 +From: Dirk Lemstra +Date: Tue, 2 Dec 2025 22:49:12 +0100 + +Subject: [PATCH] imagemagick: Fix CVE-2025-66628 +CVE: CVE-2025-66628 +Upstream-Status: Backport [https://github.com/ImageMagick/ImageMagick/commit/bdae0681ad1e572defe62df85834218f01e6d670] +Signed-off-by: Nitin Wankhade +=== +diff --git a/coders/tim.c b/coders/tim.c +index 9a281b3..7b9cb1b 100644 +--- a/coders/tim.c ++++ b/coders/tim.c +@@ -231,7 +231,8 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception) + (void) ReadBlobLSBShort(image); + width=ReadBlobLSBShort(image); + height=ReadBlobLSBShort(image); +- image_size=2*width*height; ++ if (HeapOverflowSanityCheckGetSize(2*width,height,&image_size) != MagickFalse) ++ ThrowReaderException(CorruptImageError,"ImproperImageHeader"); + if (image_size > GetBlobSize(image)) + ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile"); + bytes_per_line=width*2; diff --git a/meta-oe/recipes-support/imagemagick/imagemagick_7.0.10.bb b/meta-oe/recipes-support/imagemagick/imagemagick_7.0.10.bb index c4e48b4bbe..7b2d33ccb8 100644 --- a/meta-oe/recipes-support/imagemagick/imagemagick_7.0.10.bb +++ b/meta-oe/recipes-support/imagemagick/imagemagick_7.0.10.bb @@ -49,6 +49,7 @@ SRC_URI = "git://github.com/ImageMagick/ImageMagick.git;branch=main;protocol=htt file://CVE-2025-65955.patch \ file://CVE-2025-62171.patch \ file://CVE-2025-43965.patch \ + file://CVE-2025-66628.patch \ " SRCREV = "35b4991eb0939a327f3489988c366e21068b0178"