mirror of
https://abf.rosa.ru/djam/pcre2.git
synced 2025-02-23 19:12:55 +00:00
Fix CVE-2022-41409
This commit is contained in:
parent
04ecbb8ba1
commit
0198d505cf
2 changed files with 58 additions and 1 deletions
56
CVE-2022-41409.patch
Normal file
56
CVE-2022-41409.patch
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
From 94e1c001761373b7d9450768aa15d04c25547a35 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Philip Hazel <Philip.Hazel@gmail.com>
|
||||||
|
Date: Tue, 16 Aug 2022 17:00:45 +0100
|
||||||
|
Subject: [PATCH] Diagnose negative repeat value in pcre2test subject line
|
||||||
|
|
||||||
|
---
|
||||||
|
src/pcre2test.c | 4 ++--
|
||||||
|
testdata/testinput2 | 3 +++
|
||||||
|
testdata/testoutput2 | 4 ++++
|
||||||
|
4 files changed, 12 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/pcre2test.c b/src/pcre2test.c
|
||||||
|
index 08f86096..f6f5d66c 100644
|
||||||
|
--- a/src/pcre2test.c
|
||||||
|
+++ b/src/pcre2test.c
|
||||||
|
@@ -6844,9 +6844,9 @@ while ((c = *p++) != 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
i = (int32_t)li;
|
||||||
|
- if (i-- == 0)
|
||||||
|
+ if (i-- <= 0)
|
||||||
|
{
|
||||||
|
- fprintf(outfile, "** Zero repeat not allowed\n");
|
||||||
|
+ fprintf(outfile, "** Zero or negative repeat not allowed\n");
|
||||||
|
return PR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/testdata/testinput2 b/testdata/testinput2
|
||||||
|
index d37d8f30..717ba2ae 100644
|
||||||
|
--- a/testdata/testinput2
|
||||||
|
+++ b/testdata/testinput2
|
||||||
|
@@ -5880,6 +5880,9 @@
|
||||||
|
/^abc(?<!b\Kq)d/
|
||||||
|
abcd
|
||||||
|
|
||||||
|
+--
|
||||||
|
+ \[X]{-10}
|
||||||
|
+
|
||||||
|
# ---------
|
||||||
|
|
||||||
|
# End of testinput2
|
||||||
|
diff --git a/testdata/testoutput2 b/testdata/testoutput2
|
||||||
|
index ce090f8c..d2188d3c 100644
|
||||||
|
--- a/testdata/testoutput2
|
||||||
|
+++ b/testdata/testoutput2
|
||||||
|
@@ -17642,6 +17642,10 @@
|
||||||
|
abcd
|
||||||
|
0: abcd
|
||||||
|
|
||||||
|
+--
|
||||||
|
+ \[X]{-10}
|
||||||
|
+** Zero or negative repeat not allowed
|
||||||
|
+
|
||||||
|
# ---------
|
||||||
|
|
||||||
|
# End of testinput2
|
|
@ -9,7 +9,7 @@
|
||||||
Summary: Perl-compatible regular expression library
|
Summary: Perl-compatible regular expression library
|
||||||
Name: pcre2
|
Name: pcre2
|
||||||
Version: 10.36
|
Version: 10.36
|
||||||
Release: 3
|
Release: 4
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Url: http://www.pcre.org/
|
Url: http://www.pcre.org/
|
||||||
|
@ -19,6 +19,7 @@ Patch0: pcre2-10.10-Fix-multilib.patch
|
||||||
# CVE-2022-1586 CVE-2022-1587
|
# CVE-2022-1586 CVE-2022-1587
|
||||||
Patch1: pcre2_jit_compile.c.diff
|
Patch1: pcre2_jit_compile.c.diff
|
||||||
Patch2: pcre2_jit_test.c.diff
|
Patch2: pcre2_jit_test.c.diff
|
||||||
|
Patch3: CVE-2022-41409.patch
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
Loading…
Add table
Reference in a new issue