From 875b6b5daa758bb780bff14b851352ad5b1d7648 Mon Sep 17 00:00:00 2001
From: rtlhq
Date: Mon, 17 Jul 2023 15:10:02 +0000
Subject: [PATCH] SECURITY UPDATE * SECURITY UPDATE: heap-based buffer
overflow issue - CVE-2021-3610 - CVE-2023-3428 - CVE-2023-1289
- CVE-2023-1906 - CVE-2023-3195 - CVE-2023-34151
---
debian/changelog | 4 +-
debian/patches/0001-Fix-br-tag.patch | 7 +-
...-ImageMagick-ImageMagick6-issues-145.patch | 6 +-
debian/patches/0002-Fix-api-Image-.html.patch | 5 +-
.../0003-Fix-www-api-mophologie.html.patch | 5 +-
...04-Fix-www-command-line-options.html.patch | 7 +-
.../0005-Use-modern-idiom-for-autoconf.patch | 5 +-
...on-to-custumize-the-html-pointer-to-.patch | 21 +-
...-Improve-policy-in-order-to-be-safer.patch | 5 +-
...08-Fix-remaining-error-in-html-files.patch | 9 +-
...-to-use-version-information-and-quan.patch | 29 +-
.../0010-Fix-changelog-tag-mismatch.patch | 5 +-
...11-Fix-html-error-in-api-Image-.html.patch | 5 +-
debian/patches/0012-Fix-www-escape.html.patch | 5 +-
.../0013-Fix-www-magick-script.html.patch | 5 +-
.../patches/0014-Fix-www-support.html.patch | 5 +-
...015-Fix-instead-of-lt-and-input-form.patch | 249 ++++++++--------
...016-Fix-another-errors-in-html-files.patch | 11 +-
debian/patches/0017-Fix-index.html.patch | 5 +-
debian/patches/0018-Fix-end-tags.patch | 5 +-
.../patches/0019-Fix-a-few-html-error.patch | 19 +-
.../patches/0020-Fix-a-typo-in-manpage.patch | 25 +-
.../0021-Finalize-fixing-error-in-html.patch | 281 +++++++++---------
.../0022-FIx-error-in-new-upstream-html.patch | 9 +-
.../0023-disable-ghostscript-formats.patch | 12 +-
debian/patches/CVE-2021-20241.patch | 9 +-
debian/patches/CVE-2021-20243.patch | 23 +-
debian/patches/CVE-2021-20244.patch | 9 +-
debian/patches/CVE-2021-20245.patch | 9 +-
debian/patches/CVE-2021-20246.patch | 9 +-
debian/patches/CVE-2021-20309.patch | 9 +-
debian/patches/CVE-2021-20312_20313.patch | 48 +--
debian/patches/CVE-2021-3574.patch | 11 +-
debian/patches/CVE-2021-3610.patch | 14 +-
debian/patches/CVE-2021-39212.patch | 42 ++-
debian/patches/CVE-2021-4219.patch | 12 +-
debian/patches/CVE-2022-1114.patch | 13 +-
debian/patches/CVE-2022-28463.patch | 9 +-
debian/patches/CVE-2022-32545.patch | 45 +--
debian/patches/CVE-2022-32546.patch | 9 +-
debian/patches/CVE-2022-32547.patch | 9 +-
debian/patches/CVE-2023-1289-prepatch.patch | 49 +--
debian/patches/CVE-2023-1289.patch | 21 +-
debian/patches/CVE-2023-1906.patch | 23 +-
debian/patches/CVE-2023-3195.patch | 19 +-
.../patches/CVE-2023-34151-prepatch-2.patch | 40 +--
debian/patches/CVE-2023-34151-prepatch.patch | 43 +--
debian/patches/CVE-2023-34151.patch | 119 +++++---
debian/patches/CVE-2023-3428.patch | 13 +-
.../move-profile-property-to-cli-option.patch | 24 +-
50 files changed, 719 insertions(+), 656 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 1b74e92..ea0365e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,7 +8,7 @@ imagemagick (8:6.9.11.60+dfsg-ok1.2) yangtze; urgency=medium
- CVE-2023-3195
- CVE-2023-34151
- -- rtlhq Mon, 17 Jul 2023 20:40:36 +0800
+ -- rtlhq Thu, 16 Feb 2023 16:06:07 +0800
imagemagick (8:6.9.11.60+dfsg-ok1.1) yangtze; urgency=medium
@@ -36,4 +36,4 @@ imagemagick (8:6.9.11.60+dfsg-ok1) yangtze; urgency=medium
* Build for openKylin.
- -- rtlhq Fri, 03 Feb 2023 12:00:43 +0800
\ No newline at end of file
+ -- rtlhq Fri, 03 Feb 2023 12:00:43 +0800
diff --git a/debian/patches/0001-Fix-br-tag.patch b/debian/patches/0001-Fix-br-tag.patch
index ad5814c..a2e382a 100644
--- a/debian/patches/0001-Fix-br-tag.patch
+++ b/debian/patches/0001-Fix-br-tag.patch
@@ -1,5 +1,4 @@
-From 15346579514de52b30b4006571b3dabdb73b0ed3 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?=
+From: =?utf-8?q?Bastien_ROUCARI=C3=88S?=
Date: Fri, 2 Feb 2018 22:14:03 +0100
Subject: Fix br tag
@@ -7,11 +6,11 @@ find . -path './.git' -prune -o -type 'f' -name '*.html' -exec sed -i 's,
,
Date: Sat, 10 Apr 2021 12:15:54 -0400
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick6/issues/145
@@ -8,7 +7,7 @@ Subject: [PATCH] https://github.com/ImageMagick/ImageMagick6/issues/145
1 file changed, 9 insertions(+)
diff --git a/magick/annotate.c b/magick/annotate.c
-index 29c8bbe74..20fbf7bb1 100644
+index 29c8bbe..20fbf7b 100644
--- a/magick/annotate.c
+++ b/magick/annotate.c
@@ -1484,6 +1484,15 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info,
@@ -27,6 +26,3 @@ index 29c8bbe74..20fbf7bb1 100644
metrics->width=0;
metrics->origin.x=0;
metrics->origin.y=0;
---
-2.31.0
-
diff --git a/debian/patches/0002-Fix-api-Image-.html.patch b/debian/patches/0002-Fix-api-Image-.html.patch
index 8206850..cedbd45 100644
--- a/debian/patches/0002-Fix-api-Image-.html.patch
+++ b/debian/patches/0002-Fix-api-Image-.html.patch
@@ -1,5 +1,4 @@
-From 992187e26057185e70e21aa77eda645697dfebae Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?=
+From: =?utf-8?q?Bastien_ROUCARI=C3=88S?=
Date: Wed, 14 Dec 2016 15:18:12 +0100
Subject: Fix api/Image++.html
@@ -9,7 +8,7 @@ Forwarded: Yes, https://github.com/ImageMagick/ImageMagick/issues/304
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/www/api/Image++.html b/www/api/Image++.html
-index 031a1a3ef4..c0cba474c9 100644
+index 031a1a3..c0cba47 100644
--- a/www/api/Image++.html
+++ b/www/api/Image++.html
@@ -147,7 +147,7 @@ int main(int argc,char **argv)
diff --git a/debian/patches/0003-Fix-www-api-mophologie.html.patch b/debian/patches/0003-Fix-www-api-mophologie.html.patch
index 8d472bc..64b4f5d 100644
--- a/debian/patches/0003-Fix-www-api-mophologie.html.patch
+++ b/debian/patches/0003-Fix-www-api-mophologie.html.patch
@@ -1,5 +1,4 @@
-From 239f4d987de41a153050e4f695cbeb36ddbdda1c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?=
+From: =?utf-8?q?Bastien_ROUCARI=C3=88S?=
Date: Wed, 14 Dec 2016 15:23:11 +0100
Subject: Fix www/api/mophologie.html
@@ -9,7 +8,7 @@ Forwarded: Yes, https://github.com/ImageMagick/ImageMagick/issues/304
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/www/api/morphology.html b/www/api/morphology.html
-index 734665c274..184fe8ddeb 100644
+index 734665c..184fe8d 100644
--- a/www/api/morphology.html
+++ b/www/api/morphology.html
@@ -321,7 +321,7 @@ void ScaleGeometryKernelInfo(KernelInfo *kernel,
diff --git a/debian/patches/0004-Fix-www-command-line-options.html.patch b/debian/patches/0004-Fix-www-command-line-options.html.patch
index cf74c7d..05bb8e3 100644
--- a/debian/patches/0004-Fix-www-command-line-options.html.patch
+++ b/debian/patches/0004-Fix-www-command-line-options.html.patch
@@ -1,15 +1,14 @@
-From 801e2ff28a4292868da219979ae197c14d46d6d4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?=
+From: =?utf-8?q?Bastien_ROUCARI=C3=88S?=
Date: Wed, 14 Dec 2016 15:26:15 +0100
Subject: Fix www/command-line-options.html
Forwarded: Yes, https://github.com/ImageMagick/ImageMagick/issues/304
---
- www/command-line-options.html | 721 +++++++++++++++++++++++++++++++++-
+ www/command-line-options.html | 721 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 720 insertions(+), 1 deletion(-)
diff --git a/www/command-line-options.html b/www/command-line-options.html
-index 3280c00f3c..f347420207 100644
+index 3280c00..f347420 100644
--- a/www/command-line-options.html
+++ b/www/command-line-options.html
@@ -1856,7 +1856,725 @@ is case-dependent.
diff --git a/debian/patches/0005-Use-modern-idiom-for-autoconf.patch b/debian/patches/0005-Use-modern-idiom-for-autoconf.patch
index 49df7e1..ba23554 100644
--- a/debian/patches/0005-Use-modern-idiom-for-autoconf.patch
+++ b/debian/patches/0005-Use-modern-idiom-for-autoconf.patch
@@ -1,5 +1,4 @@
-From 1012523f76edd9c46ea5a9dff6062fefffb51a40 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?=
+From: =?utf-8?q?Bastien_ROUCARI=C3=88S?=
Date: Tue, 15 Sep 2015 22:01:13 +0200
Subject: Use modern idiom for autoconf
@@ -9,7 +8,7 @@ Forwarded: yes, https://github.com/ImageMagick/ImageMagick/issues/305
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 7963576e31..37ed00c988 100644
+index 7963576..37ed00c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,9 +208,9 @@ AC_SUBST([SBIN_DIR])
diff --git a/debian/patches/0006-Allow-distribution-to-custumize-the-html-pointer-to-.patch b/debian/patches/0006-Allow-distribution-to-custumize-the-html-pointer-to-.patch
index 404f116..83ce789 100644
--- a/debian/patches/0006-Allow-distribution-to-custumize-the-html-pointer-to-.patch
+++ b/debian/patches/0006-Allow-distribution-to-custumize-the-html-pointer-to-.patch
@@ -1,5 +1,4 @@
-From dfc70e98fbbcb4ce393deeaec86729469be6fc23 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?=
+From: =?utf-8?q?Bastien_ROUCARI=C3=88S?=
Date: Fri, 2 Feb 2018 22:17:26 +0100
Subject: Allow distribution to custumize the html pointer to documentation
@@ -20,7 +19,7 @@ Bug-debian: https://bugs.debian.org/727739
9 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/configure.ac b/configure.ac
-index 37ed00c988..ea0bb94f1b 100644
+index 37ed00c..ea0bb94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3058,6 +3058,18 @@ esac
@@ -43,7 +42,7 @@ index 37ed00c988..ea0bb94f1b 100644
# Enable/Disable documentation
AC_ARG_ENABLE([docs],
diff --git a/utilities/conjure.1.in b/utilities/conjure.1.in
-index 93a503451c..a10c077c86 100644
+index 93a5034..a10c077 100644
--- a/utilities/conjure.1.in
+++ b/utilities/conjure.1.in
@@ -7,7 +7,7 @@ conjure \- interprets and executes scripts written in the Magick Scripting Langu
@@ -62,7 +61,7 @@ index 93a503451c..a10c077c86 100644
-\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html or http://imagemagick.org/script/license.php\fP
+\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html@EXTRA_DOC_DIR@ or https://www.imagemagick.org/script/license.php\fP
diff --git a/utilities/convert.1.in b/utilities/convert.1.in
-index 19b73fecd8..e588c02a47 100644
+index 19b73fe..e588c02 100644
--- a/utilities/convert.1.in
+++ b/utilities/convert.1.in
@@ -7,7 +7,7 @@ convert \- convert between image formats as well as resize an image, blur, crop,
@@ -82,7 +81,7 @@ index 19b73fecd8..e588c02a47 100644
+
+\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html@EXTRA_DOC_DIR@ or https://www.imagemagick.org/script/license.php\fP
diff --git a/utilities/display.1.in b/utilities/display.1.in
-index c8a9cf04a7..a9bdfa3fbc 100644
+index c8a9cf0..a9bdfa3 100644
--- a/utilities/display.1.in
+++ b/utilities/display.1.in
@@ -7,7 +7,7 @@ display \- displays an image or image sequence on any X server.
@@ -101,7 +100,7 @@ index c8a9cf04a7..a9bdfa3fbc 100644
-\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html or http://imagemagick.org/script/license.php\fP
+\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html@EXTRA_DOC_DIR@ or https://www.imagemagick.org/script/license.php\fP
diff --git a/utilities/identify.1.in b/utilities/identify.1.in
-index b553cc42be..6ba20ef736 100644
+index b553cc4..6ba20ef 100644
--- a/utilities/identify.1.in
+++ b/utilities/identify.1.in
@@ -7,7 +7,7 @@ identify \- describes the format and characteristics of one or more image files.
@@ -120,7 +119,7 @@ index b553cc42be..6ba20ef736 100644
-\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html or http://imagemagick.org/script/license.php\fP
+\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html@EXTRA_DOC_DIR@ or https://www.imagemagick.org/script/license.php\fP
diff --git a/utilities/import.1.in b/utilities/import.1.in
-index 3f726f96d4..e12586f83d 100644
+index 3f726f9..e12586f 100644
--- a/utilities/import.1.in
+++ b/utilities/import.1.in
@@ -7,7 +7,7 @@ import \- saves any visible window on an X server and outputs it as an image fil
@@ -139,7 +138,7 @@ index 3f726f96d4..e12586f83d 100644
-\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html or http://imagemagick.org/script/license.php\fP
+\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html@EXTRA_DOC_DIR@ or https://www.imagemagick.org/script/license.php\fP
diff --git a/utilities/mogrify.1.in b/utilities/mogrify.1.in
-index c76d312bb8..084765fe20 100644
+index c76d312..084765f 100644
--- a/utilities/mogrify.1.in
+++ b/utilities/mogrify.1.in
@@ -7,7 +7,7 @@ mogrify \- resize an image, blur, crop, despeckle, dither, draw on, flip, join,
@@ -158,7 +157,7 @@ index c76d312bb8..084765fe20 100644
-\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html or http://imagemagick.org/script/license.php\fP
+\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html@EXTRA_DOC_DIR@ or https://www.imagemagick.org/script/license.php\fP
diff --git a/utilities/montage.1.in b/utilities/montage.1.in
-index 5ea9a35b6c..d3664c5391 100644
+index 5ea9a35..d3664c5 100644
--- a/utilities/montage.1.in
+++ b/utilities/montage.1.in
@@ -7,7 +7,8 @@ montage \- create a composite image by combining several separate images. The im
@@ -178,7 +177,7 @@ index 5ea9a35b6c..d3664c5391 100644
-\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html or http://imagemagick.org/script/license.php\fP
+\fBCopyright (C) 1999-2020 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file://@DOCUMENTATION_PATH@/www/license.html@EXTRA_DOC_DIR@ or https://www.imagemagick.org/script/license.php\fP
diff --git a/utilities/stream.1.in b/utilities/stream.1.in
-index d0b6b8960a..d3002d95bb 100644
+index d0b6b89..d3002d9 100644
--- a/utilities/stream.1.in
+++ b/utilities/stream.1.in
@@ -7,7 +7,7 @@ stream \- a lightweight tool to stream one or more pixel components of the image
diff --git a/debian/patches/0007-Improve-policy-in-order-to-be-safer.patch b/debian/patches/0007-Improve-policy-in-order-to-be-safer.patch
index b81eb83..bb4f4c1 100644
--- a/debian/patches/0007-Improve-policy-in-order-to-be-safer.patch
+++ b/debian/patches/0007-Improve-policy-in-order-to-be-safer.patch
@@ -1,5 +1,4 @@
-From 6d99f963f4817a07e9a7f9ad65711693814f4ed8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?=
+From: =?utf-8?q?Bastien_ROUCARI=C3=88S?=
Date: Tue, 22 Nov 2016 12:59:01 +0100
Subject: Improve policy in order to be safer
@@ -13,7 +12,7 @@ Forwarded: No
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/config/policy.xml b/config/policy.xml
-index 2ed14de8a6..54e64782b3 100644
+index 2ed14de..54e6478 100644
--- a/config/policy.xml
+++ b/config/policy.xml
@@ -57,26 +57,36 @@
diff --git a/debian/patches/0008-Fix-remaining-error-in-html-files.patch b/debian/patches/0008-Fix-remaining-error-in-html-files.patch
index 6a2ef6d..9bd6c4e 100644
--- a/debian/patches/0008-Fix-remaining-error-in-html-files.patch
+++ b/debian/patches/0008-Fix-remaining-error-in-html-files.patch
@@ -1,5 +1,4 @@
-From 644457efe4a513b60d0f3085315426c5b4737a3b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?=
+From: =?utf-8?q?Bastien_ROUCARI=C3=88S?=
Date: Sat, 18 Mar 2017 15:47:28 +0100
Subject: Fix remaining error in html files
@@ -10,7 +9,7 @@ Subject: Fix remaining error in html files
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/www/changelog.html b/www/changelog.html
-index 284960b90f..5d9c77bd4f 100644
+index 284960b..5d9c77b 100644
--- a/www/changelog.html
+++ b/www/changelog.html
@@ -67,8 +67,8 @@
@@ -57,7 +56,7 @@ index 284960b90f..5d9c77bd4f 100644