diff options
| -rw-r--r-- | meta-oe/recipes-support/imagemagick/files/0006-ImageMagick-Fix-CVE-2025-55004.patch | 67 | ||||
| -rw-r--r-- | meta-oe/recipes-support/imagemagick/imagemagick_7.0.10.bb | 1 |
2 files changed, 68 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/imagemagick/files/0006-ImageMagick-Fix-CVE-2025-55004.patch b/meta-oe/recipes-support/imagemagick/files/0006-ImageMagick-Fix-CVE-2025-55004.patch new file mode 100644 index 0000000000..59805b6a69 --- /dev/null +++ b/meta-oe/recipes-support/imagemagick/files/0006-ImageMagick-Fix-CVE-2025-55004.patch | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | From 13089a79a67ed0f1408fdee09f89e6e2497f10c6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Divyanshu Rathore <Divyanshu.Rathore@bmwtechworks.in> | ||
| 3 | Date: Tue, 28 Oct 2025 13:55:50 +0530 | ||
| 4 | Subject: [PATCH 06/18] ImageMagick: Fix CVE-2025-55004 | ||
| 5 | |||
| 6 | CVE: CVE-2025-55004 | ||
| 7 | Upstream-Status: Backport [https://github.com/ImageMagick/ImageMagick/commit/55d97055e00a7bc7ae2776c99824002fbb4a72aa] | ||
| 8 | Reference: https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-cjc8-g9w8-chfw | ||
| 9 | |||
| 10 | Comment: Refreshed hunk to match latest kirkstone | ||
| 11 | |||
| 12 | Signed-off-by: Divyanshu Rathore <Divyanshu.Rathore@bmwtechworks.in> | ||
| 13 | --- | ||
| 14 | coders/png.c | 29 ++++++++++------------------- | ||
| 15 | 1 file changed, 10 insertions(+), 19 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/coders/png.c b/coders/png.c | ||
| 18 | index dbab45e60..343934ce8 100644 | ||
| 19 | --- a/coders/png.c | ||
| 20 | +++ b/coders/png.c | ||
| 21 | @@ -5113,33 +5113,24 @@ static Image *ReadOneJNGImage(MngInfo *m | ||
| 22 | jng_image=ReadImage(alpha_image_info,exception); | ||
| 23 | |||
| 24 | if (jng_image != (Image *) NULL) | ||
| 25 | - for (y=0; y < (ssize_t) image->rows; y++) | ||
| 26 | { | ||
| 27 | - s=GetVirtualPixels(jng_image,0,y,image->columns,1,exception); | ||
| 28 | - q=GetAuthenticPixels(image,0,y,image->columns,1,exception); | ||
| 29 | - if ((s == (const Quantum *) NULL) || (q == (Quantum *) NULL)) | ||
| 30 | - break; | ||
| 31 | + image->alpha_trait=BlendPixelTrait; | ||
| 32 | + for (y=0; y < (ssize_t) image->rows; y++) | ||
| 33 | + { | ||
| 34 | + s=GetVirtualPixels(jng_image,0,y,image->columns,1,exception); | ||
| 35 | + q=GetAuthenticPixels(image,0,y,image->columns,1,exception); | ||
| 36 | + if ((s == (const Quantum *) NULL) || (q == (Quantum *) NULL)) | ||
| 37 | + break; | ||
| 38 | |||
| 39 | - if (image->alpha_trait != UndefinedPixelTrait) | ||
| 40 | for (x=(ssize_t) image->columns; x != 0; x--) | ||
| 41 | { | ||
| 42 | SetPixelAlpha(image,GetPixelRed(jng_image,s),q); | ||
| 43 | q+=GetPixelChannels(image); | ||
| 44 | s+=GetPixelChannels(jng_image); | ||
| 45 | } | ||
| 46 | - | ||
| 47 | - else | ||
| 48 | - for (x=(ssize_t) image->columns; x != 0; x--) | ||
| 49 | - { | ||
| 50 | - SetPixelAlpha(image,GetPixelRed(jng_image,s),q); | ||
| 51 | - if (GetPixelAlpha(image,q) != OpaqueAlpha) | ||
| 52 | - image->alpha_trait=BlendPixelTrait; | ||
| 53 | - q+=GetPixelChannels(image); | ||
| 54 | - s+=GetPixelChannels(jng_image); | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - if (SyncAuthenticPixels(image,exception) == MagickFalse) | ||
| 58 | - break; | ||
| 59 | + if (SyncAuthenticPixels(image,exception) == MagickFalse) | ||
| 60 | + break; | ||
| 61 | + } | ||
| 62 | } | ||
| 63 | (void) RelinquishUniqueFileResource(alpha_image->filename); | ||
| 64 | alpha_image=DestroyImageList(alpha_image); | ||
| 65 | -- | ||
| 66 | 2.34.1 | ||
| 67 | |||
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 d3d83fc453..3185df9adc 100644 --- a/meta-oe/recipes-support/imagemagick/imagemagick_7.0.10.bb +++ b/meta-oe/recipes-support/imagemagick/imagemagick_7.0.10.bb | |||
| @@ -31,6 +31,7 @@ SRC_URI = "git://github.com/ImageMagick/ImageMagick.git;branch=main;protocol=htt | |||
| 31 | file://0003-ImageMagick-Fix-CVE-2025-55160.patch \ | 31 | file://0003-ImageMagick-Fix-CVE-2025-55160.patch \ |
| 32 | file://0004-ImageMagick-Fix-CVE-2025-55005.patch \ | 32 | file://0004-ImageMagick-Fix-CVE-2025-55005.patch \ |
| 33 | file://0005-ImageMagick-Fix-CVE-2025-53019.patch \ | 33 | file://0005-ImageMagick-Fix-CVE-2025-53019.patch \ |
| 34 | file://0006-ImageMagick-Fix-CVE-2025-55004.patch \ | ||
| 34 | " | 35 | " |
| 35 | 36 | ||
| 36 | SRCREV = "35b4991eb0939a327f3489988c366e21068b0178" | 37 | SRCREV = "35b4991eb0939a327f3489988c366e21068b0178" |
