Skip to contentSkip to conversation

python3-django: upgrade 4.2.29 -> 4.2.30

PATCH New [email protected] 1 participant 5 messages Apr 11

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 python3-django: upgrade 4.2.29 -> 4.2.30

From: Ankur Tyagi <[email protected]>

Release Notes:
https://docs.djangoproject.com/en/dev/releases/4.2.30/

---
 .../0001-lower-setuptools-requirements.patch                    | 0
 .../{python3-django_4.2.29.bb => python3-django_4.2.30.bb}      | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename meta-python/recipes-devtools/python/{python3-django-4.2.29 => python3-django-4.2.30}/0001-lower-setuptools-requirements.patch (100%)
 rename meta-python/recipes-devtools/python/{python3-django_4.2.29.bb => python3-django_4.2.30.bb} (82%)
meta-python/recipes-devtools/python/python3-django-4.2.30/0001-lower-setuptools-requirements.patch renamed from meta-python/recipes-devtools/python/python3-django-4.2.29/0001-lower-setuptools-requirements.patch +0 -0
similarity index 100%
rename from meta-python/recipes-devtools/python/python3-django-4.2.29/0001-lower-setuptools-requirements.patch
rename to meta-python/recipes-devtools/python/python3-django-4.2.30/0001-lower-setuptools-requirements.patch
meta-python/recipes-devtools/python/python3-django_4.2.30.bb renamed from meta-python/recipes-devtools/python/python3-django_4.2.29.bb +1 -1
similarity index 82%
rename from meta-python/recipes-devtools/python/python3-django_4.2.29.bb
rename to meta-python/recipes-devtools/python/python3-django_4.2.30.bb
index c8d2c17589..146cd1eb90 100644
@@ -2,7 +2,7 @@ require python-django.inc
 inherit python_setuptools_build_meta
 
 SRC_URI += "file://0001-lower-setuptools-requirements.patch"
-SRC_URI[sha256sum] = "86d91bc8086569c8d08f9c55888b583a921ac1f95ed3bdc7d5659d4709542014"
+SRC_URI[sha256sum] = "4ebc7a434e3819db6cf4b399fb5b3f536310a30e8486f08b66886840be84b37c"
 
 RDEPENDS:${PN} += "\
     python3-sqlparse \
#1 lore raw

PATCH 2/5 python3-ecdsa: fix CVE-2026-33936

From: Ankur Tyagi <[email protected]>

Details:
https://nvd.nist.gov/vuln/detail/CVE-2026-33936

Ptests passed:

root@qemux86:~# ptest-runner python3-ecdsa
START: ptest-runner
2026-04-11T08:04
BEGIN: /usr/lib/python3-ecdsa/ptest
...
...
Testsuite summary
# TOTAL: 1978
# PASS: 1974
# SKIP: 4
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
DURATION: 386
END: /usr/lib/python3-ecdsa/ptest
2026-04-11T08:10
STOP: ptest-runner
TOTAL: 1 FAIL: 0
---
 .../python/python3-ecdsa/CVE-2026-33936.patch | 56 +++++++++++++++++++
 .../python/python3-ecdsa_0.19.0.bb            |  1 +
 2 files changed, 57 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-ecdsa/CVE-2026-33936.patch
meta-python/recipes-devtools/python/python3-ecdsa/CVE-2026-33936.patch new file +56 -0
new file mode 100644
index 0000000000..f2d3743825
@@ -0,0 +1,56 @@
+From 41e6b7be293284ef8b1f102587f0da6eae1b753f Mon Sep 17 00:00:00 2001
+From: 0xmrma <[email protected]>
+Date: Sun, 1 Mar 2026 09:18:21 +0200
+Subject: [PATCH] der: reject truncated lengths in octet/implicit/constructed
+
+CVE: CVE-2026-33936
+Upstream-Status: Backport [https://github.com/tlsfuzzer/python-ecdsa/commit/bd66899550d7185939bf27b75713a2ac9325a9d3]
+Signed-off-by: Ankur Tyagi <[email protected]>
+---
+ src/ecdsa/der.py      |  4 ++++
+ src/ecdsa/test_der.py | 13 +++++++++++++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/src/ecdsa/der.py b/src/ecdsa/der.py
+index b291485..5bbfaa3 100644
+--- a/src/ecdsa/der.py
++++ b/src/ecdsa/der.py
+@@ -137,6 +137,8 @@ def remove_constructed(string):
+         )
+     tag = s0 & 0x1F
+     length, llen = read_length(string[1:])
++    if length > len(string) - 1 - llen:
++        raise UnexpectedDER("Length longer than the provided buffer")
+     body = string[1 + llen : 1 + llen + length]
+     rest = string[1 + llen + length :]
+     return tag, body, rest
+@@ -160,6 +162,8 @@ def remove_octet_string(string):
+         n = str_idx_as_int(string, 0)
+         raise UnexpectedDER("wanted type 'octetstring' (0x04), got 0x%02x" % n)
+     length, llen = read_length(string[1:])
++    if length > len(string) - 1 - llen:
++        raise UnexpectedDER("Length longer than the provided buffer")
+     body = string[1 + llen : 1 + llen + length]
+     rest = string[1 + llen + length :]
+     return body, rest
+diff --git a/src/ecdsa/test_der.py b/src/ecdsa/test_der.py
+index 0c2dc4d..28d231e 100644
+--- a/src/ecdsa/test_der.py
++++ b/src/ecdsa/test_der.py
+@@ -476,3 +476,16 @@ def test_oids(ids):
+     decoded_oid, rest = remove_object(encoded_oid)
+     assert rest == b""
+     assert decoded_oid == ids
++
++def test_remove_octet_string_rejects_truncated_length():
++    # OCTET STRING: declared length 4096, but only 3 bytes present
++    bad = b"\x04\x82\x10\x00" + b"ABC"
++    with pytest.raises(UnexpectedDER, match="Length longer than the provided buffer"):
++        remove_octet_string(bad)
++
++def test_remove_constructed_rejects_truncated_length():
++    # Constructed tag: 0xA0 (context-specific constructed, tag=0)
++    # declared length 4096, but only 3 bytes present
++    bad = b"\xA0\x82\x10\x00" + b"ABC"
++    with pytest.raises(UnexpectedDER, match="Length longer than the provided buffer"):
++        remove_constructed(bad)
meta-python/recipes-devtools/python/python3-ecdsa_0.19.0.bb +1 -0
index 8e967f9259..0ae93fe3d9 100644
@@ -10,6 +10,7 @@ inherit pypi setuptools3 python3native ptest
 
 SRC_URI += " \
 	file://run-ptest \
+	file://CVE-2026-33936.patch \
 "
 
 RDEPENDS:${PN}-ptest += " \
#2 lore raw

PATCH 3/5 python3-flask: upgrade 3.0.2 -> 3.0.3

In reply to [email protected]

From: Ankur Tyagi <[email protected]>

License Update: File renamed as txt[1]

Release Notes:
https://github.com/pallets/flask/releases/tag/3.0.3

[1] https://github.com/pallets/flask/commit/87d5f5b9a9697434e6d972b021201105eabb54e6

---
 .../python/{python3-flask_3.0.2.bb => python3-flask_3.0.3.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta-python/recipes-devtools/python/{python3-flask_3.0.2.bb => python3-flask_3.0.3.bb} (80%)
meta-python/recipes-devtools/python/python3-flask_3.0.3.bb renamed from meta-python/recipes-devtools/python/python3-flask_3.0.2.bb +2 -2
similarity index 80%
rename from meta-python/recipes-devtools/python/python3-flask_3.0.2.bb
rename to meta-python/recipes-devtools/python/python3-flask_3.0.3.bb
index 300ca99ddc..b68946ba0c 100644
@@ -4,9 +4,9 @@ Flask is a microframework for Python based on Werkzeug, Jinja 2 and good \
 intentions. And before you ask: It’s BSD licensed!"
 HOMEPAGE = "https://github.com/mitsuhiko/flask/"
 LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ffeffa59c90c9c4a033c7574f8f3fb75"
 
-SRC_URI[sha256sum] = "822c03f4b799204250a7ee84b1eddc40665395333973dfb9deebfe425fefcb7d"
+SRC_URI[sha256sum] = "ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842"
 
 UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/Flask"
 UPSTREAM_CHECK_REGEX = "/Flask/(?P<pver>(\d+[\.\-_]*)+)"
#3 lore raw

PATCH 4/5 python3-tornado: fix CVE-2026-35536

In reply to [email protected]

From: Ankur Tyagi <[email protected]>

Backport the commit[1] from version 6.5.5 which fixes this vulnerability according to the NVD[2].

[1] https://github.com/tornadoweb/tornado/commit/24a2d96ea115f663b223887deb0060f13974c104
[2] https://nvd.nist.gov/vuln/detail/CVE-2026-35536

---
 .../python3-tornado/CVE-2026-35536.patch      | 155 ++++++++++++++++++
 .../python/python3-tornado_6.4.2.bb           |   1 +
 2 files changed, 156 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-tornado/CVE-2026-35536.patch
meta-python/recipes-devtools/python/python3-tornado/CVE-2026-35536.patch new file +155 -0
new file mode 100644
index 0000000000..783d0aa116
@@ -0,0 +1,155 @@
+From 66587e51009457274cedec28f5fd43000d129e4e Mon Sep 17 00:00:00 2001
+From: Ben Darnell <[email protected]>
+Date: Fri, 6 Mar 2026 14:50:25 -0500
+Subject: [PATCH] web: Validate characters in all cookie attributes.
+
+Our previous control character check was missing a check for
+U+007F, and also semicolons, which are only allowed in quoted
+parts of values. This commit checks all attributes and
+updates the set of disallowed characters.
+
+CVE: CVE-2026-35536
+Upstream-Status: Backport [https://github.com/tornadoweb/tornado/commit/24a2d96ea115f663b223887deb0060f13974c104]
+Signed-off-by: Ankur Tyagi <[email protected]>
+---
+ tornado/test/web_test.py | 65 ++++++++++++++++++++++++++++++++++++++++
+ tornado/web.py           | 27 +++++++++++++++--
+ 2 files changed, 89 insertions(+), 3 deletions(-)
+
+diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py
+index 801a80ed..ae39e8fc 100644
+--- a/tornado/test/web_test.py
++++ b/tornado/test/web_test.py
+@@ -1,3 +1,5 @@
++import http
++
+ from tornado.concurrent import Future
+ from tornado import gen
+ from tornado.escape import (
+@@ -291,11 +293,67 @@ class CookieTest(WebTestCase):
+                 self.set_cookie("unicode_args", "blah", domain="foo.com", path="/foo")
+ 
+         class SetCookieSpecialCharHandler(RequestHandler):
++            # "Special" characters are allowed in cookie values, but trigger special quoting.
+             def get(self):
+                 self.set_cookie("equals", "a=b")
+                 self.set_cookie("semicolon", "a;b")
+                 self.set_cookie("quote", 'a"b')
+ 
++        class SetCookieForbiddenCharHandler(RequestHandler):
++            def get(self):
++                # Control characters and semicolons raise errors in cookie names and attributes
++                # (but not values, which are tested in SetCookieSpecialCharHandler)
++                for char in list(map(chr, range(0x20))) + [chr(0x7F), ";"]:
++                    try:
++                        self.set_cookie("foo" + char, "bar")
++                        self.write(
++                            "Didn't get expected exception for char %r in name\n" % char
++                        )
++                    except http.cookies.CookieError as e:
++                        if "Invalid cookie attribute name" not in str(e):
++                            self.write(
++                                "unexpected exception for char %r in name: %s\n"
++                                % (char, e)
++                            )
++
++                    try:
++                        self.set_cookie("foo", "bar", domain="example" + char + ".com")
++                        self.write(
++                            "Didn't get expected exception for char %r in domain\n"
++                            % char
++                        )
++                    except http.cookies.CookieError as e:
++                        if "Invalid cookie attribute domain" not in str(e):
++                            self.write(
++                                "unexpected exception for char %r in domain: %s\n"
++                                % (char, e)
++                            )
++
++                    try:
++                        self.set_cookie("foo", "bar", path="/" + char)
++                        self.write(
++                            "Didn't get expected exception for char %r in path\n" % char
++                        )
++                    except http.cookies.CookieError as e:
++                        if "Invalid cookie attribute path" not in str(e):
++                            self.write(
++                                "unexpected exception for char %r in path: %s\n"
++                                % (char, e)
++                            )
++
++                    try:
++                        self.set_cookie("foo", "bar", samesite="a" + char)
++                        self.write(
++                            "Didn't get expected exception for char %r in samesite\n"
++                            % char
++                        )
++                    except http.cookies.CookieError as e:
++                        if "Invalid cookie attribute samesite" not in str(e):
++                            self.write(
++                                "unexpected exception for char %r in samesite: %s\n"
++                                % (char, e)
++                            )
++
+         class SetCookieOverwriteHandler(RequestHandler):
+             def get(self):
+                 self.set_cookie("a", "b", domain="example.com")
+@@ -329,6 +387,7 @@ class CookieTest(WebTestCase):
+             ("/get", GetCookieHandler),
+             ("/set_domain", SetCookieDomainHandler),
+             ("/special_char", SetCookieSpecialCharHandler),
++            ("/forbidden_char", SetCookieForbiddenCharHandler),
+             ("/set_overwrite", SetCookieOverwriteHandler),
+             ("/set_max_age", SetCookieMaxAgeHandler),
+             ("/set_expires_days", SetCookieExpiresDaysHandler),
+@@ -385,6 +444,12 @@ class CookieTest(WebTestCase):
+             response = self.fetch("/get", headers={"Cookie": header})
+             self.assertEqual(response.body, utf8(expected))
+ 
++    def test_set_cookie_forbidden_char(self):
++        response = self.fetch("/forbidden_char")
++        self.assertEqual(response.code, 200)
++        self.maxDiff = 10000
++        self.assertMultiLineEqual(to_unicode(response.body), "")
++
+     def test_set_cookie_overwrite(self):
+         response = self.fetch("/set_overwrite")
+         headers = response.headers.get_list("Set-Cookie")
+diff --git a/tornado/web.py b/tornado/web.py
+index 8a740504..4b70ea93 100644
+--- a/tornado/web.py
++++ b/tornado/web.py
+@@ -643,9 +643,30 @@ class RequestHandler(object):
+         # The cookie library only accepts type str, in both python 2 and 3
+         name = escape.native_str(name)
+         value = escape.native_str(value)
+-        if re.search(r"[\x00-\x20]", name + value):
+-            # Don't let us accidentally inject bad stuff
+-            raise ValueError("Invalid cookie %r: %r" % (name, value))
++        if re.search(r"[\x00-\x20]", value):
++            # Legacy check for control characters in cookie values. This check is no longer needed
++            # since the cookie library escapes these characters correctly now. It will be removed
++            # in the next feature release.
++            raise ValueError(f"Invalid cookie {name!r}: {value!r}")
++        for attr_name, attr_value in [
++            ("name", name),
++            ("domain", domain),
++            ("path", path),
++            ("samesite", samesite),
++        ]:
++            # Cookie attributes may not contain control characters or semicolons (except when
++            # escaped in the value). A check for control characters was added to the http.cookies
++            # library in a Feb 2026 security release; as of March it still does not check for
++            # semicolons.
++            #
++            # When a semicolon check is added to the standard library (and the release has had time
++            # for adoption), this check may be removed, but be mindful of the fact that this may
++            # change the timing of the exception (to the generation of the Set-Cookie header in
++            # flush()). We m
++            if attr_value is not None and re.search(r"[\x00-\x20\x3b\x7f]", attr_value):
++                raise http.cookies.CookieError(
++                    f"Invalid cookie attribute {attr_name}={attr_value!r} for cookie {name!r}"
++                )
+         if not hasattr(self, "_new_cookie"):
+             self._new_cookie = (
+                 http.cookies.SimpleCookie()
meta-python/recipes-devtools/python/python3-tornado_6.4.2.bb +1 -0
index 3dabcab38b..25f1b2a310 100644
@@ -11,6 +11,7 @@ SRC_URI[sha256sum] = "92bad5b4746e9879fd7bf1eb21dce4e3fc5128d71601f80005afa39237
 SRC_URI += "file://CVE-2025-47287.patch \
             file://CVE-2025-67724.patch \
             file://CVE-2025-67726.patch \
+            file://CVE-2026-35536.patch \
 "
 
 inherit pypi python_setuptools_build_meta
#4 lore raw

PATCH 5/5 python3-werkzeug: ignore CVE-2026-27199

In reply to [email protected]

From: Ankur Tyagi <[email protected]>

Vvulnerability affects Windows application and can be ignored.

Details: https://nvd.nist.gov/vuln/detail/CVE-2026-27199

---
 meta-python/recipes-devtools/python/python3-werkzeug_3.0.6.bb | 1 +
 1 file changed, 1 insertion(+)
meta-python/recipes-devtools/python/python3-werkzeug_3.0.6.bb +1 -0
index 5f88a9577a..e7b00d37ce 100644
@@ -25,3 +25,4 @@ RDEPENDS:${PN} += " \
 
 CVE_STATUS[CVE-2025-66221] = "not-applicable-platform: The vulnerability is Windows specific"
 CVE_STATUS[CVE-2026-21860] = "not-applicable-platform: The vulnerability is Windows specific"
+CVE_STATUS[CVE-2026-27199] = "not-applicable-platform: The vulnerability is Windows specific"