mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-14 05:49:57 +00:00
ImageMagick: Fix CVE-2025-53101
Backport the fix for CVE-2025-53101 Upstream-Status: Backport [https://github.com/ImageMagick/ImageMagick/commit/66dc8f51c11b0ae1f1cdeacd381c3e9a4de69774] Add below patch to fix 0002-ImageMagick-Fix-CVE-2025-53101.patch Signed-off-by: Divyanshu Rathore <Divyanshu.Rathore@bmwtechworks.in> Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
This commit is contained in:
committed by
Gyorgy Sarvari
parent
520f64ef3c
commit
bbcd2ab724
@@ -0,0 +1,60 @@
|
|||||||
|
From 3c6a0eea436afbf5de708b6dda7e9dc7e5189399 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Divyanshu Rathore <Divyanshu.Rathore@bmwtechworks.in>
|
||||||
|
Date: Wed, 5 Nov 2025 12:54:53 +0530
|
||||||
|
Subject: [PATCH 02/18] ImageMagick: Fix CVE-2025-53101
|
||||||
|
|
||||||
|
CVE: CVE-2025-53101
|
||||||
|
Upstream-Status: Backport [https://github.com/ImageMagick/ImageMagick/commit/66dc8f51c11b0ae1f1cdeacd381c3e9a4de69774]
|
||||||
|
Reference: https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-qh3h-j545-h8c9
|
||||||
|
|
||||||
|
Comment: Refreshed hunk to match latest kirkstone
|
||||||
|
|
||||||
|
Signed-off-by: Divyanshu Rathore <Divyanshu.Rathore@bmwtechworks.in>
|
||||||
|
---
|
||||||
|
MagickCore/image.c | 13 +++++++------
|
||||||
|
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/MagickCore/image.c b/MagickCore/image.c
|
||||||
|
index fe2a1cb5f..346285165 100644
|
||||||
|
--- a/MagickCore/image.c
|
||||||
|
+++ b/MagickCore/image.c
|
||||||
|
@@ -1650,7 +1650,6 @@ MagickExport size_t InterpretImageFilename(const ImageInfo *image_info,
|
||||||
|
*p;
|
||||||
|
|
||||||
|
ssize_t
|
||||||
|
- field_width,
|
||||||
|
offset;
|
||||||
|
|
||||||
|
canonical=MagickFalse;
|
||||||
|
@@ -1664,21 +1663,23 @@ MagickExport size_t InterpretImageFilename(const ImageInfo *image_info,
|
||||||
|
p++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
- field_width=0;
|
||||||
|
- if (*q == '0')
|
||||||
|
- field_width=(ssize_t) strtol(q,&q,10);
|
||||||
|
switch (*q)
|
||||||
|
{
|
||||||
|
case 'd':
|
||||||
|
case 'o':
|
||||||
|
case 'x':
|
||||||
|
{
|
||||||
|
+ ssize_t
|
||||||
|
+ count;
|
||||||
|
+
|
||||||
|
q++;
|
||||||
|
c=(*q);
|
||||||
|
*q='\0';
|
||||||
|
- (void) FormatLocaleString(filename+(p-format-offset),(size_t)
|
||||||
|
+ count=FormatLocaleString(filename+(p-format-offset),(size_t)
|
||||||
|
(MagickPathExtent-(p-format-offset)),p,value);
|
||||||
|
- offset+=(4-field_width);
|
||||||
|
+ if ((count <= 0) || (count > (MagickPathExtent-(p-format-offset))))
|
||||||
|
+ return(0);
|
||||||
|
+ offset+=(ssize_t) ((q-p)-count);
|
||||||
|
*q=c;
|
||||||
|
(void) ConcatenateMagickString(filename,q,MagickPathExtent);
|
||||||
|
canonical=MagickTrue;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
@@ -27,6 +27,7 @@ SRC_URI = "git://github.com/ImageMagick/ImageMagick.git;branch=main;protocol=htt
|
|||||||
file://CVE-2023-5341.patch \
|
file://CVE-2023-5341.patch \
|
||||||
file://CVE-2022-28463.patch \
|
file://CVE-2022-28463.patch \
|
||||||
file://0001-ImageMagick-Fix-CVE-2025-53014.patch \
|
file://0001-ImageMagick-Fix-CVE-2025-53014.patch \
|
||||||
|
file://0002-ImageMagick-Fix-CVE-2025-53101.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRCREV = "35b4991eb0939a327f3489988c366e21068b0178"
|
SRCREV = "35b4991eb0939a327f3489988c366e21068b0178"
|
||||||
|
|||||||
Reference in New Issue
Block a user