Re: [oe-core][kirkstone][PATCH 1/1] libpcre2: fix CVE-2022-41409

2023-08-03 Thread Russ Dill
Related to this, as the fix is in openembedded-core-contrib but not poky yet, 
is there a quick rundown somewhere of how openembedded-core-contrib feeds into 
https://git.yoctoproject.org/poky/

From: openembedded-core@lists.openembedded.org 
 on behalf of Peter Marko via 
lists.openembedded.org 
Sent: Thursday, August 3, 2023 3:00 AM
To: archana.polampa...@windriver.com ; 
openembedded-core@lists.openembedded.org 

Subject: Re: [oe-core][kirkstone][PATCH 1/1] libpcre2: fix CVE-2022-41409

This is already fixed, see
https://lists.openembedded.org/g/openembedded-core/message/185053
https://git.openembedded.org/openembedded-core-contrib/commit/?h=stable/kirkstone-nut&id=410cdbc70cfba709ec5bef508e772f52514ba28a

Peter

-Original Message-
From: openembedded-core@lists.openembedded.org 
 On Behalf Of Polampalli, Archana via 
lists.openembedded.org
Sent: Thursday, August 3, 2023 10:39
To: openembedded-core@lists.openembedded.org
Subject: [oe-core][kirkstone][PATCH 1/1] libpcre2: fix CVE-2022-41409

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185504): 
https://lists.openembedded.org/g/openembedded-core/message/185504
Mute This Topic: https://lists.openembedded.org/mt/100522389/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [oe-core][kirkstone][PATCH 1/1] libpcre2: fix CVE-2022-41409

2023-08-03 Thread Peter Marko via lists.openembedded.org
This is already fixed, see
https://lists.openembedded.org/g/openembedded-core/message/185053
https://git.openembedded.org/openembedded-core-contrib/commit/?h=stable/kirkstone-nut&id=410cdbc70cfba709ec5bef508e772f52514ba28a

Peter

-Original Message-
From: openembedded-core@lists.openembedded.org 
 On Behalf Of Polampalli, Archana via 
lists.openembedded.org
Sent: Thursday, August 3, 2023 10:39
To: openembedded-core@lists.openembedded.org
Subject: [oe-core][kirkstone][PATCH 1/1] libpcre2: fix CVE-2022-41409

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185469): 
https://lists.openembedded.org/g/openembedded-core/message/185469
Mute This Topic: https://lists.openembedded.org/mt/100522389/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe-core][kirkstone][PATCH 1/1] libpcre2: fix CVE-2022-41409

2023-08-03 Thread Polampalli, Archana via lists.openembedded.org
Integer overflow vulnerability in pcre2test before 10.41 allows attackers
to cause a denial of service or other unspecified impacts via negative input.

References:
https://nvd.nist.gov/vuln/detail/CVE-2022-41409

Upstream patches:
https://github.com/PCRE2Project/pcre2/commit/94e1c001761373b7d9450768aa15d04c25547a35

Signed-off-by: Archana Polampalli 
---
 .../libpcre/libpcre2/CVE-2022-41409.patch | 63 +++
 .../recipes-support/libpcre/libpcre2_10.40.bb |  1 +
 2 files changed, 64 insertions(+)
 create mode 100644 meta/recipes-support/libpcre/libpcre2/CVE-2022-41409.patch

diff --git a/meta/recipes-support/libpcre/libpcre2/CVE-2022-41409.patch 
b/meta/recipes-support/libpcre/libpcre2/CVE-2022-41409.patch
new file mode 100644
index 00..45b6492fcb
--- /dev/null
+++ b/meta/recipes-support/libpcre/libpcre2/CVE-2022-41409.patch
@@ -0,0 +1,63 @@
+From: 94e1c001761373b7d9450768aa15d04c25547a3
+From: Philip Hazel 
+Date: Tue Aug 16 17:00:45 2022 +0100
+Subject: [PATCH] Diagnose negative repeat value in pcre2test subject line
+
+drop change in ChangeLog
+
+Upstream-Status: Backport 
[https://github.com/PCRE2Project/pcre2/commit/94e1c001761373b7d9450768aa15d04c25547a35]
+
+CVE: CVE-2022-41916
+
+Signed-off-by: Archana Polampalli 
+---
+ src/pcre2test.c  | 4 ++--
+ testdata/testinput2  | 3 +++
+ testdata/testoutput2 | 4 
+ 3 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/src/pcre2test.c b/src/pcre2test.c
+index ea52a20..378529a 100644
+--- a/src/pcre2test.c
 b/src/pcre2test.c
+@@ -6781,9 +6781,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 d37d8f3..717ba2a 100644
+--- a/testdata/testinput2
 b/testdata/testinput2
+@@ -5932,4 +5932,7 @@ a)"xI
+ /[Aa]{2,3}/BI
+ aabcd
+
++--
++\[X]{-10}
++
+ # End of testinput2
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index ce090f8..d2188d3 100644
+--- a/testdata/testoutput2
 b/testdata/testoutput2
+@@ -17746,6 +17746,10 @@ Subject length lower bound = 2
+ aabcd
+  0: aa
+
++--
++\[X]{-10}
++** Zero or negative repeat not allowed
++
+ # End of testinput2
+ Error -70: PCRE2_ERROR_BADDATA (unknown error number)
+ Error -62: bad serialized data
+--
+2.40.0
diff --git a/meta/recipes-support/libpcre/libpcre2_10.40.bb 
b/meta/recipes-support/libpcre/libpcre2_10.40.bb
index 3843d43b69..e88b9196a0 100644
--- a/meta/recipes-support/libpcre/libpcre2_10.40.bb
+++ b/meta/recipes-support/libpcre/libpcre2_10.40.bb
@@ -11,6 +11,7 @@ LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENCE;md5=41bfb977e4933c506588724ce69bf5d2"
 
 SRC_URI = 
"https://github.com/PhilipHazel/pcre2/releases/download/pcre2-${PV}/pcre2-${PV}.tar.bz2
 \
+   file://CVE-2022-41409.patch \
 "
 UPSTREAM_CHECK_URI = "https://github.com/PhilipHazel/pcre2/releases";
 
-- 
2.40.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#185466): 
https://lists.openembedded.org/g/openembedded-core/message/185466
Mute This Topic: https://lists.openembedded.org/mt/100522389/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-