已合并
fix(cve): 修复 CVE-2026-83813 在 python-twisted 中的漏洞, CVE-2026-115775, CVE-2026-115877 #75
fix(cve): 修复 CVE-2026-83813 在 python-twisted 中的漏洞, CVE-2026-115775, CVE-2026-115877 #75
已合并
infra_team创建于 5 天前
共 3 个文件变更+12-52
@@ -1,48 +0,0 @@
1-From 25a0f42d04de23a9689a6cabc12a386fde5fba62 Mon Sep 17 00:00:00 2001
2-From: Glyph <code@glyph.im>
3-Date: Fri, 14 Aug 2026 18:57:50 -0700
4-Subject: [PATCH] fix: CVE-2026-106454 - escape IMAP wildcards and
5- metacharacters in wildcardToRegexp
6- 
7-fix: CVE-2026-106454 - escape IMAP wildcards and metacharacters in wildcardToRegexp
8- 
9-Upstream-commit: https://github.com/twisted/twisted/commit/2f8a3c29246f4eb324690e06a9767a11dc4aec9f
10-Signed-off-by: infra_team <zhaiwenjie1@huawei.com>
11----
12- src/twisted/mail/imap4.py | 20 ++++++++++++++------
13- 1 file changed, 14 insertions(+), 6 deletions(-)
14- 
15-diff --git a/src/twisted/mail/imap4.py b/src/twisted/mail/imap4.py
16-index bf8e3af..339f24c 100644
17---- a/src/twisted/mail/imap4.py
18-+++ b/src/twisted/mail/imap4.py
19-@@ -4594,12 +4594,20 @@ def Not(query):
20-
21-
22- def wildcardToRegexp(wildcard, delim=None):
23-- wildcard = wildcard.replace("*", "(?:.*?)")
24-- if delim is None:
25-- wildcard = wildcard.replace("%", "(?:.*?)")
26-- else:
27-- wildcard = wildcard.replace("%", "(?:(?:[^%s])*?)" % re.escape(delim))
28-- return re.compile(wildcard, re.I)
29-+ # Split on the two IMAP wildcards, escape everything else
30-+ parts = re.split(r"([*%])", wildcard)
31-+ result = []
32-+ for p in parts:
33-+ if p == "*":
34-+ result.append("(?:.*?)")
35-+ elif p == "%":
36-+ if delim is None:
37-+ result.append("(?:.*?)")
38-+ else:
39-+ result.append(f"(?:(?:[^{re.escape(delim)}])*?)")
40-+ else:
41-+ result.append(re.escape(p))
42-+ return re.compile("".join(result), re.I)
43-
44-
45- def splitQuoted(s):
46---
47-2.39.5
48- 
@@ -1,12 +1,11 @@
1%define debug_package %{nil}1%define debug_package %{nil}
2Name: python-twisted2Name: python-twisted
3-Version: 26.4.03+Version: 26.10.0
4-Release: 24+Release: 1
5Summary: An event-driven networking engine written in Python5Summary: An event-driven networking engine written in Python
6License: MIT6License: MIT
7URL: http://twistedmatrix.com/7URL: http://twistedmatrix.com/
8-Source0: https://github.com/twisted/twisted/archive/refs/tags/twisted-26.4.0.tar.gz8+Source0: https://github.com/twisted/twisted/archive/refs/tags/twisted-26.10.0.tar.gz
9-Patch0: backport-CVE-2026-106454.patch
10BuildRequires: python3-pip python3-hatchling python3-hatch-vcs python3-wheel9BuildRequires: python3-pip python3-hatchling python3-hatch-vcs python3-wheel
11BuildRequires: python3-hatch-fancy-pypi-readme python3-incremental10BuildRequires: python3-hatch-fancy-pypi-readme python3-incremental
12 11 
@@ -111,6 +110,15 @@ PATH=%{buildroot}%{_bindir}:$PATH PYTHONPATH=%{buildroot}%{python3_sitelib} %{bu
111%{_mandir}/man1/{cftp.1*,ckeygen.1*,conch.1*,mailmail.1*,pyhtmlizer.1*,tkconch.1*,trial.1*,twistd.1*}110%{_mandir}/man1/{cftp.1*,ckeygen.1*,conch.1*,mailmail.1*,pyhtmlizer.1*,tkconch.1*,trial.1*,twistd.1*}
112 111 
113%changelog112%changelog
113+* Sat Oct 31 2026 infra_team <zhaiwenjie1@huawei.com> - 26.10.0-1
114+- fix CVE: CVE-2026-83813
115+- Upgrade python-twisted to 26.10.0 to fix CVE-2026-83813 (GHSA-jj36-9pvh-vj5r):
116+ twisted.names DNS client now validates the source address of responses and
117+ discards those sent from the wrong host or port, preventing DNS response
118+ spoofing (CWE-346)
119+- Drop backport-CVE-2026-106454.patch, the IMAP wildcardToRegexp escaping
120+ fix is included upstream in 26.10.0
121+ 
114* Wed Oct 14 2026 infra_team <zhaiwenjie1@huawei.com> - 26.4.0-2122* Wed Oct 14 2026 infra_team <zhaiwenjie1@huawei.com> - 26.4.0-2
115- fix CVE: CVE-2026-106454123- fix CVE: CVE-2026-106454
116- Backport upstream fix to escape IMAP wildcards and metacharacters124- Backport upstream fix to escape IMAP wildcards and metacharacters
Rtwisted-26.4.0.tar.gz→twisted-26.10.0.tar.gz+0-0
Binary files do not support preview