package/python3: security bump to v3.12.14
PATCH 1/1 package/python3: security bump to v3.12.14
See the release notes: https://www.python.org/downloads/release/python-31214/
- CVE-2026-7210
https://github.com/python/cpython/issues/149018
https://github.com/python/cpython/commit/e37df2a6a71d6538698e2d3188a7c345b827640b
- CVE-2026-4519
https://github.com/python/cpython/issues/143930
https://github.com/python/cpython/commit/cbba6119391112aba9c5aebf7b94aea447922c48
- CVE-2026-3644
https://github.com/python/cpython/issues/145599
https://github.com/python/cpython/commit/3974092b037f9a3b000fb15b48ea61ce3b25d330
- CVE-2026-15308
https://github.com/python/cpython/issues/153030
https://github.com/python/cpython/commit/785df8f743800661961528970f8598edcd291c14
- CVE-2025-13462
https://github.com/python/cpython/issues/141707
https://github.com/python/cpython/commit/d10950739a78f54d0718d88fb5a868374603c084
- CVE-2026-2297
https://github.com/python/cpython/issues/145506
https://github.com/python/cpython/commit/c70adad78caeeea33f92f560ecb93331ca11bf66
- CVE-2026-4224
https://github.com/python/cpython/issues/145986
https://github.com/python/cpython/commit/24ce88b285f56ee11626cf5e472af3cd8cc7c621
- CVE‑2026‑4360
https://github.com/python/cpython/issues/151987
https://github.com/python/cpython/commit/0367912be336348b30572f8029cec4a282782d92
- CVE‑2026‑0864
https://github.com/python/cpython/issues/143927
https://github.com/python/cpython/commit/db4a157c790479710a1a840d7937c5c815a6f8b6
- CVE‑2026‑1502
https://github.com/python/cpython/commit/c00c386faa579ad71196d33408644478488e43ec
https://github.com/python/cpython/issues/146211
- CVE‑2026‑3087
https://github.com/python/cpython/commit/a6650a2cdf0c49fb8ce0c982903aa2aa274beefe
https://github.com/python/cpython/issues/146581
- CVE‑2026‑4786
https://github.com/python/cpython/issues/148169
https://github.com/python/cpython/commit/a4d3edf3a6ecfde504d02126410d2a65a859b744
- CVE‑2026‑6100
https://github.com/python/cpython/issues/148395
https://github.com/python/cpython/commit/ea8d735eb084cf8cc021df1a30e90d10a8f052e3
- CVE‑2026‑6879
https://github.com/python/cpython/issues/152674
https://github.com/python/cpython/commit/96510a3758f4a075f43223afdee3b6ee1a7a7f02
- CVE‑2026‑11972
https://github.com/python/cpython/issues/151981
https://github.com/python/cpython/commit/f5e2776ff0383a902c12acf2b703e7e951fc8438
- CVE‑2026‑12003
https://github.com/python/cpython/issues/151544
https://github.com/python/cpython/commit/03ab7b44788bfd6b8927e16bcdbd025aa08dce06
The CVE-2026-3276, CVE-2026-7774, CVE-2026-8328, CVE-2026-9669, CVE-2026-11940 were already fixed with a backport on 2025.02.x.
--- ...al-ordering-in-unicodedata-normalize.patch | 275 ------------------ ...le-data_filter-validate-written-link.patch | 178 ------------ ...E-2021-4189-PASV-fix-to-ftplib-ftpcp.patch | 118 -------- ...-bz2-decompressor-reuse-after-errors.patch | 108 ------- ...tarfile-hardlink-extraction-fallback.patch | 77 ----- package/python3/python3.hash | 4 +- package/python3/python3.mk | 13 +- 7 files changed, 3 insertions(+), 770 deletions(-) delete mode 100644 package/python3/0013-Fix-O-n-2-canonical-ordering-in-unicodedata-normalize.patch delete mode 100644 package/python3/0014-tarfile-data_filter-validate-written-link.patch delete mode 100644 package/python3/0015-Apply-CVE-2021-4189-PASV-fix-to-ftplib-ftpcp.patch delete mode 100644 package/python3/0016-prevent-bz2-decompressor-reuse-after-errors.patch delete mode 100644 package/python3/0017-Fix-symlink-escape-via-tarfile-hardlink-extraction-fallback.patch
package/python3/0013-Fix-O-n-2-canonical-ordering-in-unicodedata-normalize.patch deleted +0 -275
@@ -1,275 +0,0 @@ -From d8deb45e25f8eae007449f4018a4f1e117a772d4 Mon Sep 17 00:00:00 2001 -From: Petr Viktorin <[email protected]> -Date: Tue, 2 Jun 2026 18:12:42 +0200 -Subject: [PATCH] [3.12] gh-149079: Fix O(n^2) canonical ordering in - unicodedata.normalize() (GH-149080) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Replace the insertion sort used for canonical ordering of combining -characters with a hybrid approach: insertion sort for short runs (< 20) -and counting sort for longer runs, reducing worst-case complexity from -O(n^2) to O(n). This prevents denial of service via crafted Unicode -strings with many combining characters in alternating CCC order. - -(cherry picked from commit 991224b1e8311c85f198f6dd8208bf8cff7fc26f) - -Co-authored-by: Seth Larson <[email protected]> -Co-authored-by: ch4n3-yoon <[email protected]> -Co-authored-by: Seokchan Yoon <[email protected]> -Co-authored-by: Stan Ulbrych <[email protected]> -Co-authored-by: Bénédikt Tran <[email protected]> -Co-authored-by: Serhiy Storchaka <[email protected]> -Co-authored-by: Maurycy Pawłowski-Wieroński <[email protected]> - -Upstream: https://github.com/python/cpython/pull/150843 -CVE: CVE-2026-3276 -Signed-off-by: Titouan Christophe <[email protected]> ---- - Lib/test/test_unicodedata.py | 28 ++++ - ...-04-27-16-36-11.gh-issue-149079.vKl-LM.rst | 5 + - Modules/unicodedata.c | 144 ++++++++++++++---- - 3 files changed, 151 insertions(+), 26 deletions(-) - create mode 100644 Misc/NEWS.d/next/Security/2026-04-27-16-36-11.gh-issue-149079.vKl-LM.rst - -diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py -index 515c3840cb36474..6b4bff194eb4b59 100644 ---- a/Lib/test/test_unicodedata.py -+++ b/Lib/test/test_unicodedata.py -@@ -203,6 +203,34 @@ def test_issue10254(self): - b = 'C\u0338' * 20 + '\xC7' - self.assertEqual(self.db.normalize('NFC', a), b) - -+ def test_long_combining_mark_run(self): -+ # gh-149079: avoid quadratic canonical ordering. -+ payload = "a" + ("\u0300\u0327" * 32) -+ nfd = "a" + ("\u0327" * 32) + ("\u0300" * 32) -+ nfc = "\u00e0" + ("\u0327" * 32) + ("\u0300" * 31) -+ -+ self.assertEqual(self.db.normalize("NFD", payload), nfd) -+ self.assertEqual(self.db.normalize("NFKD", payload), nfd) -+ self.assertEqual(self.db.normalize("NFC", payload), nfc) -+ self.assertEqual(self.db.normalize("NFKC", payload), nfc) -+ -+ def test_combining_mark_run_fast_paths(self): -+ # gh-149079: cover short runs and already-sorted long runs. -+ short_payload = "a" + ("\u0300\u0327" * 9) + "\u0300" -+ short_nfd = "a" + ("\u0327" * 9) + ("\u0300" * 10) -+ short_nfc = "\u00e0" + ("\u0327" * 9) + ("\u0300" * 9) -+ long_sorted = "a" + ("\u0327" * 30) + ("\u0300" * 30) -+ long_sorted_nfc = "\u00e0" + ("\u0327" * 30) + ("\u0300" * 29) -+ -+ self.assertEqual(self.db.normalize("NFD", short_payload), short_nfd) -+ self.assertEqual(self.db.normalize("NFKD", short_payload), short_nfd) -+ self.assertEqual(self.db.normalize("NFC", short_payload), short_nfc) -+ self.assertEqual(self.db.normalize("NFKC", short_payload), short_nfc) -+ self.assertEqual(self.db.normalize("NFD", long_sorted), long_sorted) -+ self.assertEqual(self.db.normalize("NFKD", long_sorted), long_sorted) -+ self.assertEqual(self.db.normalize("NFC", long_sorted), long_sorted_nfc) -+ self.assertEqual(self.db.normalize("NFKC", long_sorted), long_sorted_nfc) -+ - def test_issue29456(self): - # Fix #29456 - u1176_str_a = '\u1100\u1176\u11a8' -diff --git a/Misc/NEWS.d/next/Security/2026-04-27-16-36-11.gh-issue-149079.vKl-LM.rst b/Misc/NEWS.d/next/Security/2026-04-27-16-36-11.gh-issue-149079.vKl-LM.rst -new file mode 100644 -index 000000000000000..4ed22b58f7405f5 ---- /dev/null -+++ b/Misc/NEWS.d/next/Security/2026-04-27-16-36-11.gh-issue-149079.vKl-LM.rst -@@ -0,0 +1,5 @@ -+Fix a potential denial of service in :func:`unicodedata.normalize`. The -+canonical ordering step of Unicode normalization used a quadratic-time insertion -+sort for reordering combining characters, which could be exploited with -+crafted input containing many combining characters in non-canonical order. -+Replaced with a linear-time counting sort for long runs. -diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c -index 41dcd5f8f883f2c..de3451628c6ef9f 100644 ---- a/Modules/unicodedata.c -+++ b/Modules/unicodedata.c -@@ -490,19 +490,80 @@ get_decomp_record(PyObject *self, Py_UCS4 code, - #define NCount (VCount*TCount) - #define SCount (LCount*NCount) - -+/* Small combining runs are usually cheaper with insertion sort. */ -+#define CANONICAL_ORDERING_COUNTING_SORT_THRESHOLD 20 -+ -+static void -+canonical_ordering_sort_insertion(int kind, void *data, -+ Py_ssize_t start, Py_ssize_t end) -+{ -+ for (Py_ssize_t i = start + 1; i < end; i++) { -+ Py_UCS4 code = PyUnicode_READ(kind, data, i); -+ unsigned char combining = _getrecord_ex(code)->combining; -+ Py_ssize_t j = i; -+ -+ while (j > start) { -+ Py_UCS4 previous = PyUnicode_READ(kind, data, j - 1); -+ if (_getrecord_ex(previous)->combining <= combining) { -+ break; -+ } -+ PyUnicode_WRITE(kind, data, j, previous); -+ j--; -+ } -+ if (j != i) { -+ PyUnicode_WRITE(kind, data, j, code); -+ } -+ } -+} -+ -+static void -+canonical_ordering_sort_counting(int kind, void *data, -+ Py_ssize_t start, Py_ssize_t end, -+ Py_UCS4 *sortbuf) -+{ -+ Py_ssize_t counts[256] = {0}; -+ Py_ssize_t run_length = end - start; -+ Py_ssize_t total = 0; -+ -+ for (Py_ssize_t i = start; i < end; i++) { -+ Py_UCS4 code = PyUnicode_READ(kind, data, i); -+ unsigned char combining = _getrecord_ex(code)->combining; -+ counts[combining]++; -+ } -+ -+ for (size_t i = 0; i < Py_ARRAY_LENGTH(counts); i++) { -+ Py_ssize_t count = counts[i]; -+ counts[i] = total; -+ total += count; -+ } -+ -+ /* Reuse counts[] as the next output slot for each CCC. */ -+ for (Py_ssize_t i = start; i < end; i++) { -+ Py_UCS4 code = PyUnicode_READ(kind, data, i); -+ unsigned char combining = _getrecord_ex(code)->combining; -+ sortbuf[counts[combining]++] = code; -+ } -+ for (Py_ssize_t i = 0; i < run_length; i++) { -+ PyUnicode_WRITE(kind, data, start + i, sortbuf[i]); -+ } -+} -+ - static PyObject* - nfd_nfkd(PyObject *self, PyObject *input, int k) - { - PyObject *result; - Py_UCS4 *output; - Py_ssize_t i, o, osize; -- int kind; -- const void *data; -+ int input_kind, result_kind; -+ const void *input_data; -+ void *result_data; - /* Longest decomposition in Unicode 3.2: U+FDFA */ - Py_UCS4 stack[20]; - Py_ssize_t space, isize; - int index, prefix, count, stackptr; - unsigned char prev, cur; -+ Py_UCS4 *sortbuf = NULL; -+ Py_ssize_t sortbuflen = 0; - - stackptr = 0; - isize = PyUnicode_GET_LENGTH(input); -@@ -522,11 +583,11 @@ nfd_nfkd(PyObject *self, PyObject *input, int k) - return NULL; - } - i = o = 0; -- kind = PyUnicode_KIND(input); -- data = PyUnicode_DATA(input); -+ input_kind = PyUnicode_KIND(input); -+ input_data = PyUnicode_DATA(input); - - while (i < isize) { -- stack[stackptr++] = PyUnicode_READ(kind, data, i++); -+ stack[stackptr++] = PyUnicode_READ(input_kind, input_data, i++); - while(stackptr) { - Py_UCS4 code = stack[--stackptr]; - /* Hangul Decomposition adds three characters in -@@ -591,35 +652,66 @@ nfd_nfkd(PyObject *self, PyObject *input, int k) - PyMem_Free(output); - if (!result) - return NULL; -+ - /* result is guaranteed to be ready, as it is compact. */ -- kind = PyUnicode_KIND(result); -- data = PyUnicode_DATA(result); -+ result_kind = PyUnicode_KIND(result); -+ result_data = PyUnicode_DATA(result); - -- /* Sort canonically. */ -+ /* Sort each consecutive combining-character run canonically. */ - i = 0; -- prev = _getrecord_ex(PyUnicode_READ(kind, data, i))->combining; -- for (i++; i < PyUnicode_GET_LENGTH(result); i++) { -- cur = _getrecord_ex(PyUnicode_READ(kind, data, i))->combining; -- if (prev == 0 || cur == 0 || prev <= cur) { -- prev = cur; -+ while (i < o) { -+ Py_ssize_t run_length, run_start; -+ int needs_sort = 0; -+ -+ Py_UCS4 ch = PyUnicode_READ(result_kind, result_data, i); -+ prev = _getrecord_ex(ch)->combining; -+ if (prev == 0) { -+ i++; - continue; - } -- /* Non-canonical order. Need to switch *i with previous. */ -- o = i - 1; -- while (1) { -- Py_UCS4 tmp = PyUnicode_READ(kind, data, o+1); -- PyUnicode_WRITE(kind, data, o+1, -- PyUnicode_READ(kind, data, o)); -- PyUnicode_WRITE(kind, data, o, tmp); -- o--; -- if (o < 0) -- break; -- prev = _getrecord_ex(PyUnicode_READ(kind, data, o))->combining; -- if (prev == 0 || prev <= cur) -+ -+ run_start = i++; -+ while (i < o) { -+ Py_UCS4 ch = PyUnicode_READ(result_kind, result_data, i); -+ cur = _getrecord_ex(ch)->combining; -+ if (cur == 0) { - break; -+ } -+ if (prev > cur) { -+ needs_sort = 1; -+ } -+ prev = cur; -+ i++; -+ } -+ if (!needs_sort) { -+ continue; -+ } -+ -+ run_length = i - run_start; -+ if (run_length < CANONICAL_ORDERING_COUNTING_SORT_THRESHOLD) { -+ canonical_ordering_sort_insertion(result_kind, result_data, -+ run_start, i); -+ continue; - } -- prev = _getrecord_ex(PyUnicode_READ(kind, data, i))->combining; -+ -+ if (run_length > sortbuflen) { -+ Py_UCS4 *new_sortbuf = PyMem_Resize(sortbuf, -+ Py_UCS4, -+ run_length); -+ if (new_sortbuf == NULL) { -+ PyErr_NoMemory(); -+ PyMem_Free(sortbuf); -+ Py_DECREF(result); -+ return NULL; -+ } -+ sortbuf = new_sortbuf; -+ sortbuflen = run_length; -+ } -+ -+ canonical_ordering_sort_counting(result_kind, result_data, -+ run_start, i, sortbuf); - } -+ PyMem_Free(sortbuf); - return result; - } -
package/python3/0014-tarfile-data_filter-validate-written-link.patch deleted +0 -178
178 lines not on this page · raw message
package/python3/0015-Apply-CVE-2021-4189-PASV-fix-to-ftplib-ftpcp.patch deleted +0 -118
118 lines not on this page · raw message
package/python3/0016-prevent-bz2-decompressor-reuse-after-errors.patch deleted +0 -108
108 lines not on this page · raw message
package/python3/0017-Fix-symlink-escape-via-tarfile-hardlink-extraction-fallback.patch deleted +0 -77
77 lines not on this page · raw message
package/python3/python3.hash +2 -2
@@ -1,5 +1,5 @@ -# From https://www.python.org/downloads/release/python-31213/ -md5 b67dc5d55b27c98a36615f7d0dfa6e4c Python-3.12.13.tar.xz +# From https://www.python.org/downloads/release/python-31214/ +sha256 5c8462af5790baf43a321a1559dbe0db06d1be4300fb85fb53c40060668e548a Python-3.12.14.tar.xz # Locally computed sha256 c08bc65a81971c1dd5783182826503369466c7e67374d1646519adf05207b684 Python-3.12.13.tar.xz sha256 3b2f81fe21d181c499c59a256c8e1968455d6689d269aa85373bfb6af41da3bf LICENSE
package/python3/python3.mk +1 -12
@@ -5,7 +5,7 @@ ################################################################################ PYTHON3_VERSION_MAJOR = 3.12 -PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).13 +PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).14 PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz PYTHON3_SITE = https://python.org/ftp/python/$(PYTHON3_VERSION) PYTHON3_LICENSE = Python-2.0, others
@@ -13,17 +13,6 @@ PYTHON3_LICENSE_FILES = LICENSE PYTHON3_CPE_ID_VENDOR = python PYTHON3_CPE_ID_PRODUCT = python -# 0013-Fix-O-n-2-canonical-ordering-in-unicodedata-normalize.patch -PYTHON3_IGNORE_CVES += CVE-2026-3276 -# 0014-tarfile-data_filter-validate-written-link.patch -PYTHON3_IGNORE_CVES += CVE-2026-7774 -# 0015-Apply-CVE-2021-4189-PASV-fix-to-ftplib-ftpcp.patch -PYTHON3_IGNORE_CVES += CVE-2026-8328 -# 0016-prevent-bz2-decompressor-reuse-after-errors.patch -PYTHON3_IGNORE_CVES += CVE-2026-9669 -# 0017-Fix-symlink-escape-via-tarfile-hardlink-extraction-fallback.patch -PYTHON3_IGNORE_CVES += CVE-2026-11940 - # This host Python is installed in $(HOST_DIR), as it is needed when # cross-compiling third-party Python modules.
Signature · 6 lines
2.55.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas,
Quoted 79 lines · Thomas Perale via buildroot
See the release notes: https://www.python.org/downloads/release/python-31214/
- CVE-2026-7210
https://github.com/python/cpython/issues/149018
https://github.com/python/cpython/commit/e37df2a6a71d6538698e2d3188a7c345b827640b- CVE-2026-4519
https://github.com/python/cpython/issues/143930
https://github.com/python/cpython/commit/cbba6119391112aba9c5aebf7b94aea447922c48- CVE-2026-3644
https://github.com/python/cpython/issues/145599
https://github.com/python/cpython/commit/3974092b037f9a3b000fb15b48ea61ce3b25d330- CVE-2026-15308
https://github.com/python/cpython/issues/153030
https://github.com/python/cpython/commit/785df8f743800661961528970f8598edcd291c14- CVE-2025-13462
https://github.com/python/cpython/issues/141707
https://github.com/python/cpython/commit/d10950739a78f54d0718d88fb5a868374603c084- CVE-2026-2297
https://github.com/python/cpython/issues/145506
https://github.com/python/cpython/commit/c70adad78caeeea33f92f560ecb93331ca11bf66- CVE-2026-4224
https://github.com/python/cpython/issues/145986
https://github.com/python/cpython/commit/24ce88b285f56ee11626cf5e472af3cd8cc7c621- CVE‑2026‑4360
https://github.com/python/cpython/issues/151987
https://github.com/python/cpython/commit/0367912be336348b30572f8029cec4a282782d92- CVE‑2026‑0864
https://github.com/python/cpython/issues/143927
https://github.com/python/cpython/commit/db4a157c790479710a1a840d7937c5c815a6f8b6- CVE‑2026‑1502
https://github.com/python/cpython/commit/c00c386faa579ad71196d33408644478488e43ec
https://github.com/python/cpython/issues/146211- CVE‑2026‑3087
https://github.com/python/cpython/commit/a6650a2cdf0c49fb8ce0c982903aa2aa274beefe
https://github.com/python/cpython/issues/146581- CVE‑2026‑4786
https://github.com/python/cpython/issues/148169
https://github.com/python/cpython/commit/a4d3edf3a6ecfde504d02126410d2a65a859b744- CVE‑2026‑6100
https://github.com/python/cpython/issues/148395
https://github.com/python/cpython/commit/ea8d735eb084cf8cc021df1a30e90d10a8f052e3- CVE‑2026‑6879
https://github.com/python/cpython/issues/152674
https://github.com/python/cpython/commit/96510a3758f4a075f43223afdee3b6ee1a7a7f02- CVE‑2026‑11972
https://github.com/python/cpython/issues/151981
https://github.com/python/cpython/commit/f5e2776ff0383a902c12acf2b703e7e951fc8438- CVE‑2026‑12003
Quoted 7 lines
https://github.com/python/cpython/issues/151544
https://github.com/python/cpython/commit/03ab7b44788bfd6b8927e16bcdbd025aa08dce06The CVE-2026-3276, CVE-2026-7774, CVE-2026-8328, CVE-2026-9669, CVE-2026-11940 were already fixed with a backport on 2025.02.x.
Signed-off-by Thomas Perale <[email protected]>
I already had a similar commit, but with a more concise message.
I updated my commit with your detailed CVE list, and added you as Co-authored-by.
With this,
Applied to 2025.02.x, thanks !
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot