sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (10a687770ede3f3a3241bbe1592511795405db03)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
- Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (10a687770ede3f3a3241bbe1592511795405db03)
- Date: Mon, 17 Feb 2025 21:31:34 +0000
GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:
libs/musl/HISTORY
| 5 +
libs/musl/patches/0001-iconv-fix-erroneous-input-validation-in-EUC-KR-decoder.patch
| 38 ++++++++++
libs/musl/patches/0001-iconv-harden-UTF-8-output-code-path-against-input-decoder.patch
| 38 ++++++++++
python-pypi/diffoscope/DETAILS
| 4 -
python-pypi/diffoscope/HISTORY
| 3
5 files changed, 86 insertions(+), 2 deletions(-)
New commits:
commit 10a687770ede3f3a3241bbe1592511795405db03
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
diffoscope 288
commit 71ec1eef8c2c9df8cec69eb667138a90631e070d
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
musl: Fix CVE-2025-26519
diff --git a/libs/musl/HISTORY b/libs/musl/HISTORY
index 5885882..84cab5f 100644
--- a/libs/musl/HISTORY
+++ b/libs/musl/HISTORY
@@ -1,3 +1,8 @@
+2025-02-17 Ismael Luceno <ismael AT sourcemage.org>
+ *
patches/0001-iconv-fix-erroneous-input-validation-in-EUC-KR-decoder.patch,
+
patches/0001-iconv-harden-UTF-8-output-code-path-against-input-decoder.patch:
+ fixed CVE-2025-26519
+
2024-04-09 Ismael Luceno <ismael AT sourcemage.org>
* DETAILS: updated spell to 1.2.5
* patches/0001-glob-introduce-context-struct-for-do_glob.patch,
diff --git
a/libs/musl/patches/0001-iconv-fix-erroneous-input-validation-in-EUC-KR-decoder.patch
b/libs/musl/patches/0001-iconv-fix-erroneous-input-validation-in-EUC-KR-decoder.patch
new file mode 100644
index 0000000..e62d28d
--- /dev/null
+++
b/libs/musl/patches/0001-iconv-fix-erroneous-input-validation-in-EUC-KR-decoder.patch
@@ -0,0 +1,38 @@
+>From e5adcd97b5196e29991b524237381a0202a60659 Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias AT aerifal.cx>
+Date: Sun, 9 Feb 2025 10:07:19 -0500
+Subject: [PATCH] iconv: fix erroneous input validation in EUC-KR decoder
+
+as a result of incorrect bounds checking on the lead byte being
+decoded, certain invalid inputs which should produce an encoding
+error, such as "\xc8\x41", instead produced out-of-bounds loads from
+the ksc table.
+
+in a worst case, the loaded value may not be a valid unicode scalar
+value, in which case, if the output encoding was UTF-8, wctomb would
+return (size_t)-1, causing an overflow in the output pointer and
+remaining buffer size which could clobber memory outside of the output
+buffer.
+
+bug report was submitted in private by Nick Wellnhofer on account of
+potential security implications.
+---
+ src/locale/iconv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/locale/iconv.c b/src/locale/iconv.c
+index 9605c8e9..008c93f0 100644
+--- a/src/locale/iconv.c
++++ b/src/locale/iconv.c
+@@ -502,7 +502,7 @@ size_t iconv(iconv_t cd, char **restrict in, size_t
*restrict inb, char **restri
+ if (c >= 93 || d >= 94) {
+ c += (0xa1-0x81);
+ d += 0xa1;
+- if (c >= 93 || c>=0xc6-0x81 && d>0x52)
++ if (c > 0xc6-0x81 || c==0xc6-0x81 && d>0x52)
+ goto ilseq;
+ if (d-'A'<26) d = d-'A';
+ else if (d-'a'<26) d = d-'a'+26;
+--
+2.21.0
+
diff --git
a/libs/musl/patches/0001-iconv-harden-UTF-8-output-code-path-against-input-decoder.patch
b/libs/musl/patches/0001-iconv-harden-UTF-8-output-code-path-against-input-decoder.patch
new file mode 100644
index 0000000..9b64508
--- /dev/null
+++
b/libs/musl/patches/0001-iconv-harden-UTF-8-output-code-path-against-input-decoder.patch
@@ -0,0 +1,38 @@
+>From c47ad25ea3b484e10326f933e927c0bc8cded3da Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias AT aerifal.cx>
+Date: Wed, 12 Feb 2025 17:06:30 -0500
+Subject: [PATCH] iconv: harden UTF-8 output code path against input decoder
+ bugs
+
+the UTF-8 output code was written assuming an invariant that iconv's
+decoders only emit valid Unicode Scalar Values which wctomb can encode
+successfully, thereby always returning a value between 1 and 4.
+
+if this invariant is not satisfied, wctomb returns (size_t)-1, and the
+subsequent adjustments to the output buffer pointer and remaining
+output byte count overflow, moving the output position backwards,
+potentially past the beginning of the buffer, without storing any
+bytes.
+---
+ src/locale/iconv.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/locale/iconv.c b/src/locale/iconv.c
+index 008c93f0..52178950 100644
+--- a/src/locale/iconv.c
++++ b/src/locale/iconv.c
+@@ -545,6 +545,10 @@ size_t iconv(iconv_t cd, char **restrict in, size_t
*restrict inb, char **restri
+ if (*outb < k) goto toobig;
+ memcpy(*out, tmp, k);
+ } else k = wctomb_utf8(*out, c);
++ /* This failure condition should be unreachable, but
++ * is included to prevent decoder bugs from
translating
++ * into advancement outside the output buffer range.
*/
++ if (k>4) goto ilseq;
+ *out += k;
+ *outb -= k;
+ break;
+--
+2.21.0
+
+
diff --git a/python-pypi/diffoscope/DETAILS b/python-pypi/diffoscope/DETAILS
index 2387711..7e04ced 100755
--- a/python-pypi/diffoscope/DETAILS
+++ b/python-pypi/diffoscope/DETAILS
@@ -1,8 +1,8 @@
SPELL=diffoscope
- VERSION=178
+ VERSION=288
SOURCE="${SPELL}-${VERSION}.tar.gz"
SOURCE_URL[0]=https://files.pythonhosted.org/packages/source/d/diffoscope/${SPELL}-${VERSION}.tar.gz
-
SOURCE_HASH=sha512:706c95f5c04cfe081fed7e3e5ed73579949c948b15eaf0f984fc7d406b74007859f7946c44e4ca13e1210b105ed65ea68fd1f03452a50f161ed27f996f4f2540
+
SOURCE_HASH=sha512:fdeea9dd90fd10c12537676b24a4c5c921ac5402b98e1d9d634afb6b5dd5a0d379907b37dbbf9d33efa0a1922149006bc2e7964bad13e74f15d9598b41cf5c1e
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
WEB_SITE="https://diffoscope.org"
LICENSE[0]=GPL
diff --git a/python-pypi/diffoscope/HISTORY b/python-pypi/diffoscope/HISTORY
index dfdbc4d..5ed630a 100644
--- a/python-pypi/diffoscope/HISTORY
+++ b/python-pypi/diffoscope/HISTORY
@@ -1,3 +1,6 @@
+2025-02-17 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: updated spell to 288
+
2021-07-17 Florian Franzmann <bwlf AT bandrate.org>
* DETAILS, DEPENDS: version 178
- [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (10a687770ede3f3a3241bbe1592511795405db03), Ismael Luceno, 02/17/2025
Archive powered by MHonArc 2.6.24.