Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
696f99b9ff
!31 [sync] PR-28: fix CVE-2023-26112
From: @openeuler-sync-bot 
Reviewed-by: @swf504 
Signed-off-by: @swf504
2024-09-19 06:30:56 +00:00
Wang_M
dd19378d57 fix CVE-2023-26112
(cherry picked from commit c54d966a0f017bee5106bf7d22a5bc3d1109f6c9)
2024-09-19 08:44:24 +08:00
openeuler-ci-bot
e2f14a40dc
!23 Upgrade to version 5.0.8
From: @swf504 
Reviewed-by: @louhongxiang 
Signed-off-by: @louhongxiang
2024-02-07 12:57:07 +00:00
swf504
f01699c210 Upgrade to 5.0.8
Signed-off-by: swf504 <suweifeng1@huawei.com>
2024-02-07 19:36:15 +08:00
openeuler-ci-bot
33ca7edebc
!17 update the introduction web link
From: @fjt42 
Reviewed-by: @swf504 
Signed-off-by: @swf504
2023-05-13 01:41:37 +00:00
Jiangtian Feng
ec9194389b update the introduction web link
Signed-off-by: Jiangtian Feng <fengjiangtian@huawei.com>
2023-05-08 16:38:12 +08:00
openeuler-ci-bot
e24712b181
!14 add the missing date in spec file changelog
From: @liubo254 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-10-21 07:49:29 +00:00
liubo
7edf25e580 python-configobj: add the missing date in spec file
Signed-off-by: liubo <liubo254@huawei.com>
2022-10-21 15:29:53 +08:00
openeuler-ci-bot
01ec04ef96
!11 rebuild the version to 5.0.6 - 18
From: @liubo254 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-10-21 06:55:55 +00:00
liubo
06408cc435 python-configobj: rebuild the version to 5.0.6 - 18
Signed-off-by: liubo <liubo254@huawei.com>
2022-10-20 17:16:35 +08:00
4 changed files with 76 additions and 3 deletions

View File

@ -0,0 +1,53 @@
From a82ea8fb0338f2bd46cf627c4b763094448e6bd7 Mon Sep 17 00:00:00 2001
From: cdcadman <mythirty@gmail.com>
Date: Wed, 17 May 2023 03:57:08 -0700
Subject: [PATCH] Address CVE-2023-26112 ReDoS
Reference: https://src.fedoraproject.org/rpms/python-configobj/blob/rawhide/f/0001-Address-CVE-2023-26112-ReDoS.patch
---
src/configobj/validate.py | 2 +-
src/tests/test_validate_errors.py | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/configobj/validate.py b/src/configobj/validate.py
index 9267a3f..98d879f 100644
--- a/src/configobj/validate.py
+++ b/src/configobj/validate.py
@@ -541,7 +541,7 @@ class Validator(object):
"""
# this regex does the initial parsing of the checks
- _func_re = re.compile(r'(.+?)\((.*)\)', re.DOTALL)
+ _func_re = re.compile(r'([^\(\)]+?)\((.*)\)', re.DOTALL)
# this regex takes apart keyword arguments
_key_arg = re.compile(r'^([a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*)$', re.DOTALL)
diff --git a/src/tests/test_validate_errors.py b/src/tests/test_validate_errors.py
index 399daa8..f7d6c27 100644
--- a/src/tests/test_validate_errors.py
+++ b/src/tests/test_validate_errors.py
@@ -3,7 +3,7 @@ import os
import pytest
from configobj import ConfigObj, get_extra_values, ParseError, NestingError
-from configobj.validate import Validator
+from configobj.validate import Validator, VdtUnknownCheckError
@pytest.fixture()
def thisdir():
@@ -77,3 +77,11 @@ def test_no_parent(tmpdir, specpath):
ini.write('[[haha]]')
with pytest.raises(NestingError):
conf = ConfigObj(str(ini), configspec=specpath, file_error=True)
+
+
+def test_re_dos(val):
+ value = "aaa"
+ i = 165100
+ attack = '\x00'*i + ')' + '('*i
+ with pytest.raises(VdtUnknownCheckError):
+ val.check(attack, value)
--
2.40.1

View File

@ -1,13 +1,15 @@
%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Name: python-configobj
Version: 5.0.6
Release: 17
Version: 5.0.8
Release: 2
Summary: ConfigObj is a simple but powerful config file reader and writer
License: BSD
URL: http://configobj.readthedocs.org/
Source0: https://github.com/DiffSK/configobj/archive/v%{version}.tar.gz
Patch0: 0001-Address-CVE-2023-26112-ReDoS.patch
BuildRequires:python3-devel python3-pytest python3-setuptools python3-six
BuildArch: noarch
@ -48,7 +50,10 @@ config file reader and writer
%check
export PYTHONWARNINGS=always
%{__python3} test_configobj.py
export PYTHONPATH=$(pwd)/build/lib
%{__python3} src/tests/configobj_doctests.py
%{__python3} -m configobj.validate
pytest -c setup.cfg --color=yes
%files -n python3-configobj
%doc README.md
@ -56,6 +61,21 @@ export PYTHONWARNINGS=always
%{python3_sitelib}/*
%changelog
* Sat Sep 14 2024 Wangmian <wangmian19@h-partners.com> - 5.0.8-2
- fix CVE-2023-26112
* Wed Feb 7 2024 Weifeng Su <suweifeng1@huawei.com> - 5.0.8-1
- upgrade to 5.0.8
-fix a regression error in 5.0.7
-update testing to validate against python version 2.7 and 3.5-3.11
-update broken links / no-existent services and references
* Mon May 8 2023 Jiangtian Feng <fengjiangtian@huawei.com> - 5.0.6-19
- update the introduction web link
* Fri Oct 21 2022 liubo <liubo254@huawei.com> - 5.0.6-18
- rebuild the version to 5.0.6-18
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 5.0.6-17
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git

Binary file not shown.

BIN
v5.0.8.tar.gz Normal file

Binary file not shown.