Backport the fix for CVE-2024-41817

Add below patch to fix
0012-ImageMagick-Fix-CVE-2024-41817.patch

Signed-off-by: Divyanshu Rathore <[email protected]>
---
 .../0012-ImageMagick-Fix-CVE-2024-41817.patch | 44 +++++++++++++++++++
 .../imagemagick/imagemagick_7.0.10.bb         |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 
meta-oe/recipes-support/imagemagick/files/0012-ImageMagick-Fix-CVE-2024-41817.patch

diff --git 
a/meta-oe/recipes-support/imagemagick/files/0012-ImageMagick-Fix-CVE-2024-41817.patch
 
b/meta-oe/recipes-support/imagemagick/files/0012-ImageMagick-Fix-CVE-2024-41817.patch
new file mode 100644
index 0000000000..1a7f2aa72d
--- /dev/null
+++ 
b/meta-oe/recipes-support/imagemagick/files/0012-ImageMagick-Fix-CVE-2024-41817.patch
@@ -0,0 +1,44 @@
+From 80612989115844741371c10deda249d592c0b801 Mon Sep 17 00:00:00 2001
+From: Divyanshu Rathore <[email protected]>
+Date: Fri, 7 Nov 2025 09:45:43 +0530
+Subject: [PATCH 8/8] ImageMagick: Fix CVE-2024-41817
+
+CVE: CVE-2024-41817
+
+Upstream-Status: Backport 
[https://github.com/ImageMagick/ImageMagick/commit/6526a2b28510ead6a3e14de711bb991ad9abff38]
+
+Comment: Refreshed hunk to match latest kirkstone
+
+Signed-off-by: Divyanshu Rathore <[email protected]>
+---
+ AppRun | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/AppRun b/AppRun
+index 4c597fa99..cd2787fe3 100644
+--- a/AppRun
++++ b/AppRun
+@@ -7,16 +7,16 @@
+ 
+ HERE="$(dirname "$(readlink -f "${0}")")"
+ 
+-export MAGICK_HOME="$HERE/usr:$MAGICK_HOME" # 
https://imagemagick.org/QuickStart.txt
+-export MAGICK_CONFIGURE_PATH=$(readlink -f 
"$HERE/usr/lib/ImageMagick-7.0.9/config-Q16"):$(readlink -f 
"$HERE/usr/lib/ImageMagick-7.0.9/config-Q16HDRI"):$(readlink -f 
"$HERE/usr/share/ImageMagick-7"):$(readlink -f 
"$HERE/usr/etc/ImageMagick-7"):$MAGICK_CONFIGURE_PATH #Wildcards don't work
++export MAGICK_HOME="$HERE/usr$MAGICK_HOME" # 
https://imagemagick.org/QuickStart.txt
++export MAGICK_CONFIGURE_PATH=$(readlink -f 
"$HERE/usr/lib/ImageMagick-7.0.9/config-Q16"):$(readlink -f 
"$HERE/usr/lib/ImageMagick-7.0.9/config-Q16HDRI"):$(readlink -f 
"$HERE/usr/share/ImageMagick-7"):$(readlink -f 
"$HERE/usr/etc/ImageMagick-7")$MAGICK_CONFIGURE_PATH #Wildcards don't work
+ 
+ export LD_LIBRARY_PATH=$(readlink -f "$HERE/usr/lib"):$LD_LIBRARY_PATH
+ export 
LD_LIBRARY_PATH=${HERE}/usr/lib/ImageMagick-7.0.9/modules-Q16HDRI/coders:$LD_LIBRARY_PATH
+ 
+ if [ "$1" == "man" ] ; then
+-  export MANPATH="$HERE/usr/share/man:$MANPATH" ; exec "$@" ; exit $?
++  export MANPATH="$HERE/usr/share/man$MANPATH" ; exec "$@" ; exit $?
+ elif [ "$1" == "info" ] ; then
+-  export INFOPATH="$HERE/usr/share/info:$INFOPATH" ; exec "$@" ; exit $?
++  export INFOPATH="$HERE/usr/share/info$INFOPATH" ; exec "$@" ; exit $?
+ fi
+ 
+ if [ ! -z $APPIMAGE ] ; then
+-- 
+2.34.1
+
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 d929a220f1..1b4ab344c2 100644
--- a/meta-oe/recipes-support/imagemagick/imagemagick_7.0.10.bb
+++ b/meta-oe/recipes-support/imagemagick/imagemagick_7.0.10.bb
@@ -39,6 +39,7 @@ SRC_URI = 
"git://github.com/ImageMagick/ImageMagick.git;branch=main;protocol=htt
     file://0011-ImageMagick-Add-support-patch-4-to-fix-CVE-2025-5529.patch \
     file://0011-ImageMagick-Fix-1-CVE-2025-55298.patch \
     file://0011-ImageMagick-Fix-2-CVE-2025-55298.patch \
+    file://0012-ImageMagick-Fix-CVE-2024-41817.patch \
 "
 
 SRCREV = "35b4991eb0939a327f3489988c366e21068b0178"
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#121946): 
https://lists.openembedded.org/g/openembedded-devel/message/121946
Mute This Topic: https://lists.openembedded.org/mt/116392326/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to