已关闭
[bundle] 修复CVE-2026-17084 CVE-2026-15806 CVE-2026-19672 CVE-2026-18503 #258
hongjinghao创建于  9月7日关闭于  9月14日
hongjinghao
9月7日 创建

请修复CVE-2026-17084 CVE-2026-15806 CVE-2026-19672 CVE-2026-18503

likedislike
openeuler-ci-botopeneuler-ci-bot成员
9月7日 将 licihua、dillon_chen、overweight、zhujianwei001、xujing99、hongjinghao、shenyangyang 设为负责人
openeuler-ci-botopeneuler-ci-bot成员
9月7日 添加了label:sig/Base-service
openeuler-ci-bot
openeuler-ci-bot成员
9月7日 评论:

Welcome To openEuler Community

Hey @hongjinghao , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: Base-service ,
and any of the maintainers: @dillon_chen, @licihua, @overweight, @shenyangyang, @xujing99, @zhujianwei001 ,
and any of the committers: @yangyuan32, @zhuchunyi .

likedislike
hongjinghao
9月7日 评论:

/branches master openEuler-22.03-LTS-SP4 /name hongjinghao /email hongjinghao@h-partners.com

likedislike
xiaoo_robot
xiaoo_robot
9月7日 评论:

正在自动化处理任务,任务编号:TASK-gitcode__python3-258-20260907154257-0,指定分支:master

✅ 任务结束 (用时: 116分钟)

likedislike
xiaoo_robot
xiaoo_robot
9月7日 评论:

正在自动化处理任务,任务编号:TASK-gitcode__python3-258-20260907154258-1,指定分支:openEuler-22.03-LTS-SP4

✅ 任务结束 (用时: 314分钟)

likedislike
xiaoo_robotxiaoo_robot
9月7日 关联了pull request:fix: bundle CVE-2026-17084+CVE-2026-15806+CVE-2026-19672+CVE-2026-18503 - master
xiaoo_robot
xiaoo_robot
9月7日 评论:

─── CVE-2026-17084 ───
是否需要修复:否
是否存在适配:否
上游社区补丁:无

分支修复情况:
1.master: 未找到补丁

PR:无
适配情况:无

─── CVE-2026-15806 ───
是否需要修复:否
是否存在适配:否
上游社区补丁:无

分支修复情况:
1.master: 未找到补丁

PR:无
适配情况:无

─── CVE-2026-19672 ───
是否需要修复:是
是否存在适配:否
上游社区补丁:https://github.com/python/cpython/pull/156000

分支修复情况:
1.master: 已修复

PR:- master: https://gitcode.com/src-openeuler/python3/merge_requests/734
适配情况:无

─── CVE-2026-18503 ───
是否需要修复:是
是否存在适配:否
上游社区补丁:https://github.com/python/cpython/commit/063d4555c94ef412c731527dbf30193327f2ee82.patch

分支修复情况:
1.master: 已修复

PR:- master: https://gitcode.com/src-openeuler/python3/merge_requests/734
适配情况:无

likedislike
xiaoo_robot
xiaoo_robot
9月7日 评论:

补丁适配报告 (CVE-2026-18503)

1. backport-CVE-2026-18503.patch

  • 状态: 适配成功 (status=adapted)
  • 置信度: high

适配冲突说明

# 文件 适配类型 原因
1 Lib/test/test_csv.py 上下文调整 上游 3.11 分支 TestSniffer 末尾含 test_sniff_space_delimiter(原 hunk 前置上下文锚点 1357 行),3.11.13 baseline 中该测试不存在,且 class NUL: 前只有一个空行(上游为两个)。因此将 hunk 重锚定到 baseline 1314-1319 行:前置上下文取 test_doublequote 尾两行与空行,后置上下文取 class NUL:/def write/pass('class NUL:' 全文件唯一,锚定无歧义)。新方法插入于 TestSniffer 最后一个方法之后、class NUL 之前,与原补丁意图语义一致;7 行核心变更逐字节保真,仅 hunk 头行号与上下文行调整,无任何连锁修改。
完整代码 diff(适配前 → 适配后)

1. Lib/test/test_csv.py — 上下文调整

--- 适配前
+++ 适配后
@@ -1,6 +1,6 @@
-@@ -1357,6 +1357,13 @@ def test_sniff_space_delimiter(self):
-         self.assertEqual(dialect.delimiter, ' ')
-         self.assertIs(dialect.doublequote, False)
+@@ -1314,6 +1314,13 @@ def test_doublequote(self):
+         dialect = sniffer.sniff(self.sample9)
+         self.assertTrue(dialect.doublequote)
 
     def test_sniff_quoted_single_column(self):
         # gh-98820: this sample used to take minutes.
@@ -9,6 +9,6 @@
         with self.assertRaisesRegex(csv.Error, "Could not determine delimiter"):
             sniffer.sniff(sample, delimiters=',:|\t')
 
-
 class NUL:
      def write(s, *args):
+         pass
likedislike
xiaoo_robotxiaoo_robot
9月7日 关联了pull request:fix: bundle CVE-2026-17084+CVE-2026-15806+CVE-2026-19672+CVE-2026-18503 - openEuler-22.03-LTS-SP4
xiaoo_robot
xiaoo_robot
9月7日 评论:

─── CVE-2026-17084 ───
是否需要修复:是
是否存在适配:否
上游社区补丁:https://github.com/python/cpython/commit/1e54caa096678a38afcabecabb1ff72400dd6bae.patch

分支修复情况:
1.openEuler-22.03-LTS-SP4: 已修复

PR:- openEuler-22.03-LTS-SP4: https://gitcode.com/src-openeuler/python3/merge_requests/735
适配情况:无

─── CVE-2026-15806 ───
是否需要修复:否
是否存在适配:否
上游社区补丁:无

分支修复情况:
1.openEuler-22.03-LTS-SP4: 未找到补丁

PR:无
适配情况:无

─── CVE-2026-19672 ───
是否需要修复:是
是否存在适配:否
上游社区补丁:https://github.com/python/cpython/pull/156000

分支修复情况:
1.openEuler-22.03-LTS-SP4: 已修复

PR:- openEuler-22.03-LTS-SP4: https://gitcode.com/src-openeuler/python3/merge_requests/735
适配情况:无

─── CVE-2026-18503 ───
是否需要修复:是
是否存在适配:否
上游社区补丁:https://github.com/python/cpython/commit/063d4555c94ef412c731527dbf30193327f2ee82.patch

分支修复情况:
1.openEuler-22.03-LTS-SP4: 已修复

PR:- openEuler-22.03-LTS-SP4: https://gitcode.com/src-openeuler/python3/merge_requests/735
适配情况:无

likedislike
xiaoo_robot
xiaoo_robot
9月7日 评论:

补丁适配报告 (CVE-2026-17084)

1. backport-CVE-2026-17084.patch

  • 状态: 适配成功 (status=adapted)
  • 置信度: high

适配冲突说明

适配说明

  • 原补丁(Python 3.14/Unicode 16.0.0 上游 commit 1e54caa0,27 hunks)在 Python 3.9.9(Unicode 13.0.0)上 2 个 hunk git apply 失败(Lib/test/test_codecs.py:1622 —— 插入点上下文 test_builtin_encode_invalid 在 3.9.9 不存在
  • Tools/unicode/makeunicodedata.py:711 —— makeunicodename 结尾结构不同),另有 2 个 hunk 虽 apply 通过但逐字落地在 3.9.9 运行时必然失败(Lib/stringprep.py 版本断言 '16.0.0' vs 目标 '13.0.0',会导致 import stringprep 抛 AssertionError、encodings.idna 全坏
  • Lib/test/test_unicodedata.py 使用 3.9.9 不存在的 self.old 属性)
  • 共 4 处适配,其余 23 个 hunk(含 b3_exceptions 重生成表 1360 条、mkstringprep.py 生成器改造 93 行、makestringprep() 函数体、NEWS 文件)逐字保留
  • 适配后补丁在干净 baseline worktree 上 git apply 成功,源码树真实提交 706665d:6 文件 348 insertions/96 deletions,与原补丁统计一致
完整代码 diff(原补丁 → 适配补丁)

Lib/stringprep.py

--- 原补丁/Lib/stringprep.py
+++ 适配补丁/Lib/stringprep.py
@@ -1,4 +1,4 @@
-@@ -5,12 +5,18 @@
+@@ -5,12 +5,18 @@ There are two kinds of tables: sets, for which a member test is provided,
  and mappings, for which a mapping function is provided.
  """
  
@@ -8,7 +8,7 @@
 +import unicodedata
  
 -assert unicodedata.unidata_version == '3.2.0'
-+assert unicodedata.unidata_version == '16.0.0'
++assert unicodedata.unidata_version == '13.0.0'
 +
 +from unicodedata import ucd_3_2_0 as unicodedata_320
 +
@@ -298,7 +298,7 @@
  0x1d402:'c', 0x1d403:'d', 0x1d404:'e', 0x1d405:'f',
  0x1d406:'g', 0x1d407:'h', 0x1d408:'i', 0x1d409:'j',
  0x1d40a:'k', 0x1d40b:'l', 0x1d40c:'m', 0x1d40d:'n',
-@@ -184,7 +359,16 @@ def in_table_b1(code):
+@@ -184,7 +359,16 @@ b3_exceptions = {
  0x1d79c:'\u03bd', 0x1d79d:'\u03be', 0x1d79e:'\u03bf', 0x1d79f:'\u03c0',
  0x1d7a0:'\u03c1', 0x1d7a1:'\u03b8', 0x1d7a2:'\u03c3', 0x1d7a3:'\u03c4',
  0x1d7a4:'\u03c5', 0x1d7a5:'\u03c6', 0x1d7a6:'\u03c7', 0x1d7a7:'\u03c8',

Lib/test/test_codecs.py

--- 原补丁/Lib/test/test_codecs.py
+++ 适配补丁/Lib/test/test_codecs.py
@@ -1,16 +1,17 @@
-@@ -1622,6 +1622,15 @@ def test_builtin_encode(self):
+@@ -1544,6 +1544,16 @@ class IDNACodecTest(unittest.TestCase):
          self.assertEqual("pyth\xf6n.org".encode("idna"), b"xn--pythn-mua.org")
          self.assertEqual("pyth\xf6n.org.".encode("idna"), b"xn--pythn-mua.org.")
  
-+    @support.subTests(['unicode', 'encoded'], [
-+        ('\N{CHEROKEE LETTER A}\N{CHEROKEE LETTER A}', b"xn--58da"),
-+        ('\N{GEORGIAN CAPITAL LETTER AN}.', b"xn--7md."),
-+        ('\N{CYRILLIC LETTER PALOCHKA}.example', b"xn--d5a.example"),
-+        ('\N{ROMAN NUMERAL REVERSED ONE HUNDRED}.example.', b"xn--q5g.example."),
-+    ])
-+    def test_new_unicode_case_folding(self, unicode, encoded):
-+        self.assertEqual(unicode.encode("idna"), encoded)
++    def test_new_unicode_case_folding(self):
++        for unicode, encoded in [
++            ('\N{CHEROKEE LETTER A}\N{CHEROKEE LETTER A}', b"xn--58da"),
++            ('\N{GEORGIAN CAPITAL LETTER AN}.', b"xn--7md."),
++            ('\N{CYRILLIC LETTER PALOCHKA}.example', b"xn--d5a.example"),
++            ('\N{ROMAN NUMERAL REVERSED ONE HUNDRED}.example.', b"xn--q5g.example."),
++        ]:
++            with self.subTest(unicode=unicode, encoded=encoded):
++                self.assertEqual(unicode.encode("idna"), encoded)
 +
-     def test_builtin_encode_invalid(self):
-         for case, expected in self.invalid_encode_testcases:
-             with self.subTest(case=case, expected=expected):
+     def test_builtin_decode_length_limit(self):
+         with self.assertRaisesRegex(UnicodeError, "too long"):
+             (b"xn--016c"+b"a"*1100).decode("idna")

Lib/test/test_unicodedata.py

--- 原补丁/Lib/test/test_unicodedata.py
+++ 适配补丁/Lib/test/test_unicodedata.py
@@ -1,15 +1,15 @@
-@@ -328,6 +328,15 @@ def test_bidirectional(self):
+@@ -150,6 +150,15 @@ class UnicodeFunctionsTest(UnicodeDatabaseTest):
          self.assertRaises(TypeError, self.db.bidirectional)
          self.assertRaises(TypeError, self.db.bidirectional, 'xx')
  
 +    def test_bidirectional_unassigned(self):
 +        self.assertEqual(self.db.bidirectional('\u0378'), '')
-+        self.assertEqual(self.db.bidirectional('\u077F'), '' if self.old else 'AL')
++        self.assertEqual(self.db.bidirectional('\u077F'), 'AL')
 +        self.assertEqual(self.db.bidirectional('\u20CF'), '')
 +        self.assertEqual(self.db.bidirectional('\u0590'), '')
 +        self.assertEqual(self.db.bidirectional('\uFFFF'), '')
 +        self.assertEqual(self.db.bidirectional('\U0001FFFE'), '')
-+        self.assertEqual(self.db.bidirectional('\U00010D01'), '' if self.old else 'AL')
++        self.assertEqual(self.db.bidirectional('\U00010D01'), 'AL')
 +
      def test_decomposition(self):
          self.assertEqual(self.db.decomposition('\uFFFE'),'')

Tools/unicode/makeunicodedata.py

--- 原补丁/Tools/unicode/makeunicodedata.py
+++ 适配补丁/Tools/unicode/makeunicodedata.py
@@ -6,7 +6,7 @@
  import sys
  import zipfile
  
-@@ -126,6 +127,7 @@ def maketables(trace=0):
+@@ -128,6 +129,7 @@ def maketables(trace=0):
      makeunicodename(unicode, trace)
      makeunicodedata(unicode, trace)
      makeunicodetype(unicode, trace)
@@ -14,11 +14,10 @@
  
  
  # --------------------------------------------------------------------
-@@ -711,6 +713,19 @@ def makeunicodename(unicode, trace):
-             fprint('    "%s",' % prefix)
+@@ -792,6 +794,18 @@ def makeunicodename(unicode, trace):
          fprint('};')
  
-+
+ 
 +def makestringprep():
 +    FILE = "Lib/stringprep.py"
 +

Tools/unicode/mkstringprep.py

--- 原补丁/Tools/unicode/mkstringprep.py
+++ 适配补丁/Tools/unicode/mkstringprep.py
@@ -43,7 +43,7 @@
  
  tables = []
  curname = None
-@@ -116,10 +129,18 @@ def compact_set(l):
+@@ -116,10 +129,18 @@ There are two kinds of tables: sets, for which a member test is provided,
  and mappings, for which a mapping function is provided.
  \"\"\"
  
@@ -64,7 +64,7 @@
  
  # A.1 is the table of unassigned characters
  # XXX Plane 15 PUA is listed as unassigned in Python.
-@@ -139,7 +160,7 @@ def compact_set(l):
+@@ -139,7 +160,7 @@ Cn -= set(range(0xFFFF, 0x110000, 0x10000))
  
  print("""
  def in_table_a1(code):
@@ -73,7 +73,7 @@
      c = ord(code)
      if 0xFDD0 <= c < 0xFDF0: return False
      return (c & 0xFFFF) not in (0xFFFE, 0xFFFF)
-@@ -172,21 +193,33 @@ def in_table_b1(code):
+@@ -172,21 +193,33 @@ assert name == "B.3"
  
  # B.3 is mostly Python's .lower, except for a number
  # of special cases, e.g. considering canonical forms.
@@ -122,7 +122,7 @@
      if b != c:
          return c
      else:
-@@ -226,9 +259,9 @@ def map_table_b2(a):
+@@ -226,9 +259,9 @@ assert specials == {}
  print("""
  def map_table_b2(a):
      al = map_table_b3(a)
@@ -134,7 +134,7 @@
      if b != c:
          return c
      else:
-@@ -251,16 +284,16 @@ def in_table_c11(code):
+@@ -251,16 +284,16 @@ name, table = tables[0]
  del tables[0]
  assert name == "C.1.2"
  
@@ -156,7 +156,7 @@
  """)
  
  # C.2.1 ASCII control characters
-@@ -275,7 +308,7 @@ def in_table_c11_c12(code):
+@@ -275,7 +308,7 @@ assert Cc_ascii == table_c21
  
  print("""
  def in_table_c21(code):
@@ -165,7 +165,7 @@
  """)
  
  # C.2.2 Non-ASCII control characters. It also includes
-@@ -295,11 +328,11 @@ def in_table_c21(code):
+@@ -295,11 +328,11 @@ print("""c22_specials = """ + compact_set(specials) + """
  def in_table_c22(code):
      c = ord(code)
      if c < 128: return False
@@ -179,7 +179,7 @@
             ord(code) in c22_specials
  """)
  
-@@ -313,7 +346,7 @@ def in_table_c21_c22(code):
+@@ -313,7 +346,7 @@ assert set(table.keys()) == Co
  
  print("""
  def in_table_c3(code):
@@ -188,7 +188,7 @@
  """)
  
  # C.4 Non-character code points, xFFFE, xFFFF
-@@ -346,7 +379,7 @@ def in_table_c4(code):
+@@ -346,7 +379,7 @@ assert set(table.keys()) == Cs
  
  print("""
  def in_table_c5(code):
@@ -197,7 +197,7 @@
  """)
  
  # C.6 Inappropriate for plain text
-@@ -411,7 +444,7 @@ def in_table_c9(code):
+@@ -411,7 +444,7 @@ assert set(table.keys()) == RandAL
  
  print("""
  def in_table_d1(code):
@@ -206,7 +206,7 @@
  """)
  
  # D.2 Characters with bidirectional property "L"
-@@ -424,5 +457,5 @@ def in_table_d1(code):
+@@ -424,5 +457,5 @@ assert set(table.keys()) == L
  
  print("""
  def in_table_d2(code):

2. backport-CVE-2026-18503.patch

  • 状态: 适配成功 (status=adapted)
  • 置信度: high

适配冲突说明

适配说明

  • 原补丁(上游 cpython 3.10 分支 fd78b565,修复 csv.Sniffer 引号字段二次方耗时 gh-98820)共 3 个 hunk:Lib/csv.py、Misc/NEWS.d 新文件 2 个 hunk git apply --check 直接通过,原样保留(核心 +/- 行与原补丁逐字节一致,csv.py 仅 hunk 头行号固化 offset -2)
  • 唯一冲突 hunk 为 Lib/test/test_csv.py(@@ -1232,6 +1232,13 @@):其上下文引用 test_sniff_space_delimiter 方法结尾(Python 3.10 后上游新增,3.9.9 全源码树 grep 0 匹配,已验证)
  • 适配方式:将新测试 test_sniff_quoted_single_column 语义等价插入 TestSniffer 类末尾(test_doublequote 之后、class NUL: 之前),7 个新增行与原补丁逐字节一致(含注释、引号、\n/\t 转义、缩进),仅按 3.9.9 真实结构(1 空行分隔风格)调整上下文行与 hunk 头行号(@@ -1104,6 +1104,13 @@)
  • 适配改动已应用到 source_dir 并提交(commit bf0bcbd,父提交 706665d),git diff --stat = 3 files changed, 20 insertions(+), 5 deletions(-)
  • 适配补丁在 baseline 706665d 上 git apply --check 通过
  • test_csv.py/csv.py 通过 ast.parse 语法校验
  • 无结构性偏离(未改继承/签名/类结构/定义位置),偏离度 0
完整代码 diff(原补丁 → 适配补丁)

Lib/csv.py

--- 原补丁/Lib/csv.py
+++ 适配补丁/Lib/csv.py
@@ -1,4 +1,4 @@
-@@ -215,12 +215,18 @@ def _guess_quote_and_delimiter(self, data, delimiters):
+@@ -213,12 +213,18 @@ class Sniffer:
          this way.
          """
  

Lib/test/test_csv.py

--- 原补丁/Lib/test/test_csv.py
+++ 适配补丁/Lib/test/test_csv.py
@@ -1,6 +1,6 @@
-@@ -1232,6 +1232,13 @@ def test_sniff_space_delimiter(self):
-         self.assertEqual(dialect.delimiter, ' ')
-         self.assertIs(dialect.doublequote, False)
+@@ -1104,6 +1104,13 @@ Stonecutters Seafood and Chop House+ Lemont+ IL+ 12/19/02+ Week Back
+         dialect = sniffer.sniff(self.sample9)
+         self.assertTrue(dialect.doublequote)
  
 +    def test_sniff_quoted_single_column(self):
 +        # gh-98820: this sample used to take minutes.
@@ -9,6 +9,6 @@
 +        with self.assertRaisesRegex(csv.Error, "Could not determine delimiter"):
 +            sniffer.sniff(sample, delimiters=',:|\t')
 +
- 
  class NUL:
      def write(s, *args):
+         pass
likedislike
hongjinghao
9月14日 评论:

/close

likedislike
openeuler-ci-botopeneuler-ci-bot成员
9月14日 issue状态由 待办的 改变为 已完成
openeuler-ci-botopeneuler-ci-bot成员
9月14日 关闭了 issue