Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C267EC624DE for ; Fri, 4 Sep 2026 09:46:30 +0000 (UTC) Subject: Re: [wrynose][PATCH 2/4] python3-git: fix CVE-2026-42215 To: openembedded-core@lists.openembedded.org From: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Originating-Location: Mumbai, Maharashtra, IN (151.186.177.21) X-Originating-Platform: Windows Edge 152 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Fri, 04 Sep 2026 02:46:26 -0700 References: <20260819050808.3986732-1-dkelaiya@cisco.com> <20260819050808.3986732-2-dkelaiya@cisco.com> In-Reply-To: Message-ID: <7884.1788515186007356272@lists.openembedded.org> Content-Type: multipart/alternative; boundary="Y4blBG0ury722bFKG3h5" List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 04 Sep 2026 09:46:30 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/245086 --Y4blBG0ury722bFKG3h5 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Wed, Sep 2, 2026 at 06:31 PM, Yoann Congal wrote: >=20 > On Wed Aug 19, 2026 at 7:08 AM CEST, Darsh Kelaiya -X (dkelaiya - E > INFOCHIPS PRIVATE LIMITED at Cisco) via lists.openembedded.org wrote: >=20 >> From: Darsh Kelaiya >>=20 >> This patch applies the upstream fix as referenced in [4], using all the >> backported commits shown in [1], [2], and [3]. >>=20 >> [1] https://github.com/gitpython-developers/GitPython/commit/142195888e7= 13542189533a52cdfc333f05c3af6 >>=20 >> [2] https://github.com/gitpython-developers/GitPython/commit/9aed7cf8c20= f69effcfcf7ebef09f312f73ab826 >>=20 >> [3] https://github.com/gitpython-developers/GitPython/commit/43d92dec468= 3568d11495956dd556161f17c3ea8 >>=20 >> [4] https://github.com/gitpython-developers/GitPython/security/advisorie= s/GHSA-rpm5-65cw-6hj4 >>=20 >>=20 >> Signed-off-by: Darsh Kelaiya >> --- >> .../python3-git/CVE-2026-42215_p1.patch | 60 +++++++++++++++++++ >> .../python3-git/CVE-2026-42215_p2.patch | 29 +++++++++ >> .../python3-git/CVE-2026-42215_p3.patch | 45 ++++++++++++++ >> .../python/python3-git_3.1.43.bb | 3 + >> 4 files changed, 137 insertions(+) >> create mode 100644 >> meta/recipes-devtools/python/python3-git/CVE-2026-42215_p1.patch >> create mode 100644 >> meta/recipes-devtools/python/python3-git/CVE-2026-42215_p2.patch >> create mode 100644 >> meta/recipes-devtools/python/python3-git/CVE-2026-42215_p3.patch >>=20 >> diff --git >> a/meta/recipes-devtools/python/python3-git/CVE-2026-42215_p1.patch >> b/meta/recipes-devtools/python/python3-git/CVE-2026-42215_p1.patch >> new file mode 100644 >> index 0000000000..0129250fdf >> --- /dev/null >> +++ b/meta/recipes-devtools/python/python3-git/CVE-2026-42215_p1.patch >> @@ -0,0 +1,60 @@ >> +From dd5d1c4ddcc5d44faf4e71bcfa338f09db2022d6 Mon Sep 17 00:00:00 2001 >> +From: w >> +Date: Mon, 20 Apr 2026 23:29:50 -0400 >> +Subject: [PATCH] Block unsafe underscored git kwargs / Fix for >> + GHSA-rpm5-65cw-6hj4 >> + >> +CVE: CVE-2026-42215 >> +Upstream-Status: Backport [ https://github.com/gitpython-developers/Git= Python/commit/142195888e713542189533a52cdfc333f05c3af6 >> ] >> + >> +Backport Changes: >> +- Omitted test/test_clone.py, test/test_git.py, and >> + test/test_remote.py because the PyPI 3.1.43 source used by the >> + recipe does not ship the upstream test tree. >> + >> +(cherry picked from commit 142195888e713542189533a52cdfc333f05c3af6) >> +Signed-off-by: Darsh Kelaiya >> +--- >> + git/cmd.py | 21 +++++++++++++-------- >> + 1 file changed, 13 insertions(+), 8 deletions(-) >> + >> [...] >> diff --git >> a/meta/recipes-devtools/python/python3-git/CVE-2026-42215_p2.patch >> b/meta/recipes-devtools/python/python3-git/CVE-2026-42215_p2.patch >> new file mode 100644 >> index 0000000000..4326bede07 >> --- /dev/null >> +++ b/meta/recipes-devtools/python/python3-git/CVE-2026-42215_p2.patch >> @@ -0,0 +1,29 @@ >> +From e77461e6953a67f17ecd1808c352e6613a17345b Mon Sep 17 00:00:00 2001 >> +From: w >> +Date: Mon, 20 Apr 2026 23:43:59 -0400 >> +Subject: [PATCH] linter fix >> + >> +CVE: CVE-2026-42215 >> +Upstream-Status: Backport [ https://github.com/gitpython-developers/Git= Python/commit/9aed7cf8c20f69effcfcf7ebef09f312f73ab826 >> ] >> + >> +(cherry picked from commit 9aed7cf8c20f69effcfcf7ebef09f312f73ab826) >> +Signed-off-by: Darsh Kelaiya >> +--- >> + git/cmd.py | 4 +--- >> + 1 file changed, 1 insertion(+), 3 deletions(-) >> + >> +diff --git a/git/cmd.py b/git/cmd.py >> +index 2ecb8e66..372eac28 100644 >> +--- a/git/cmd.py >> ++++ b/git/cmd.py >> +@@ -729,9 +729,7 @@ class Git(metaclass=3D_GitMeta): >> + for option in options: >> + unsafe_option =3D >> canonical_unsafe_options.get(cls._canonicalize_option_name(option)) >> + if unsafe_option is not None: >> +- raise UnsafeOptionError( >> +- f"{unsafe_option} is not allowed, use `allow_unsafe_options=3DTrue` t= o >> allow it." >> +- ) >> ++ raise UnsafeOptionError(f"{unsafe_option} is not allowed, use >> `allow_unsafe_options=3DTrue` to allow it.") >> + >> + class AutoInterrupt: >> + """Process wrapper that terminates the wrapped process on finalization= . >=20 > Hello, >=20 > I don't think we need this "linter fix" _p2 patch. If that works, can you > send a v2 without it? >=20 > Same for the scarthgap patch. >=20 > Thanks! > -- > Yoann Congal > Smile ECS Hi Yoann, Thanks for the review. I've sent v2 patches for Wrynose [1] and Scarthgap [2] as requested. [1] https://lists.openembedded.org/g/openembedded-core/topic/wrynose_patch_= v2_2_4/121083416 [2] https://lists.openembedded.org/g/openembedded-core/topic/scarthgap_patc= h_v2_2_4/121083408 Regards, Darsh Kelaiya --Y4blBG0ury722bFKG3h5 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
On Wed, Sep 2, 2026 at 06:31 PM, Yoann Congal wrote:
On Wed Aug 19, 2026 at 7:08 AM CEST, Darsh Kelaiya -X (dkelaiya= - E INFOCHIPS PRIVATE LIMITED at Cisco) via lists.openembedded.org wrote:<= br />
From: Darsh Kelaiya <dkelaiya@cisco.com>

This = patch applies the upstream fix as referenced in [4], using all the
bac= kported commits shown in [1], [2], and [3].

[1] https://github.com/gi= tpython-developers/GitPython/commit/142195888e713542189533a52cdfc333f05c3af= 6
[2] https://github.com/gitpython-developers/GitPython/commit/9aed7cf8= c20f69effcfcf7ebef09f312f73ab826
[3] https://github.com/gitpython-devel= opers/GitPython/commit/43d92dec4683568d11495956dd556161f17c3ea8
[4= ] https://git= hub.com/gitpython-developers/GitPython/security/advisories/GHSA-rpm5-65cw-6= hj4

Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com><= br />---
.../python3-git/CVE-2026-42215_p1.patch | 60 ++++++++++++++++= +++
.../python3-git/CVE-2026-42215_p2.patch | 29 +++++++++
.../py= thon3-git/CVE-2026-42215_p3.patch | 45 ++++++++++++++
.../python/pytho= n3-git_3.1.43.bb | 3 +
4 files changed, 137 insertions(+)
create = mode 100644 meta/recipes-devtools/python/python3-git/CVE-2026-42215_p1.patc= h
create mode 100644 meta/recipes-devtools/python/python3-git/CVE-2026= -42215_p2.patch
create mode 100644 meta/recipes-devtools/python/python= 3-git/CVE-2026-42215_p3.patch

diff --git a/meta/recipes-devtools= /python/python3-git/CVE-2026-42215_p1.patch b/meta/recipes-devtools/python/= python3-git/CVE-2026-42215_p1.patch
new file mode 100644
index 00= 00000000..0129250fdf
--- /dev/null
+++ b/meta/recipes-devtools/py= thon/python3-git/CVE-2026-42215_p1.patch
@@ -0,0 +1,60 @@
+From d= d5d1c4ddcc5d44faf4e71bcfa338f09db2022d6 Mon Sep 17 00:00:00 2001
+From= : w <w@mac.lan>
+Date: Mon, 20 Apr 2026 23:29:50 -0400
+Sub= ject: [PATCH] Block unsafe underscored git kwargs / Fix for
+ GHSA-rpm= 5-65cw-6hj4
+
+CVE: CVE-2026-42215
+Upstream-Status: Backpor= t [ht= tps://github.com/gitpython-developers/GitPython/commit/142195888e7135421895= 33a52cdfc333f05c3af6]
+
+Backport Changes:
+- Omitted te= st/test_clone.py, test/test_git.py, and
+ test/test_remote.py because = the PyPI 3.1.43 source used by the
+ recipe does not ship the upstream= test tree.
+
+(cherry picked from commit 142195888e713542189533a= 52cdfc333f05c3af6)
+Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.co= m>
+---
+ git/cmd.py | 21 +++++++++++++--------
+ 1 file = changed, 13 insertions(+), 8 deletions(-)
+
[...]
diff --git= a/meta/recipes-devtools/python/python3-git/CVE-2026-42215_p2.patch b/meta/= recipes-devtools/python/python3-git/CVE-2026-42215_p2.patch
new file m= ode 100644
index 0000000000..4326bede07
--- /dev/null
+++ b/= meta/recipes-devtools/python/python3-git/CVE-2026-42215_p2.patch
@@ -0= ,0 +1,29 @@
+From e77461e6953a67f17ecd1808c352e6613a17345b Mon Sep 17 = 00:00:00 2001
+From: w <w@mac.lan>
+Date: Mon, 20 Apr 2026 = 23:43:59 -0400
+Subject: [PATCH] linter fix
+
+CVE: CVE-2026= -42215
+Upstream-Status: Backport [https://github.com/gitpython-developers/= GitPython/commit/9aed7cf8c20f69effcfcf7ebef09f312f73ab826]
+
= +(cherry picked from commit 9aed7cf8c20f69effcfcf7ebef09f312f73ab826)
= +Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
+---
+ g= it/cmd.py | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)+
+diff --git a/git/cmd.py b/git/cmd.py
+index 2ecb8e66..372ea= c28 100644
+--- a/git/cmd.py
++++ b/git/cmd.py
+@@ -729,9 +7= 29,7 @@ class Git(metaclass=3D_GitMeta):
+ for option in options:
+ unsafe_option =3D canonical_unsafe_options.get(cls._canonicalize_option_= name(option))
+ if unsafe_option is not None:
+- raise UnsafeOpti= onError(
+- f"{unsafe_option} is not allowed, use `allow_unsafe_option= s=3DTrue` to allow it."
+- )
++ raise UnsafeOptionError(f"{unsafe= _option} is not allowed, use `allow_unsafe_options=3DTrue` to allow it.")+
+ class AutoInterrupt:
+ """Process wrapper that terminate= s the wrapped process on finalization.
Hello,

I don't think we need this "linter fix" _p2 patch. If tha= t works, can you
send a v2 without it?

Same for the scarthg= ap patch.

Thanks!
--
Yoann Congal
Smile ECS Hi Yoann,

Thanks for the review.

I've sent v2 patches= for Wrynose [1] and Scarthgap [2] as requested.

[1] https://lists.openembedded= .org/g/openembedded-core/topic/wrynose_patch_v2_2_4/121083416
[2] = https://lists= .openembedded.org/g/openembedded-core/topic/scarthgap_patch_v2_2_4/12108340= 8

Regards,
Darsh Kelaiya
--Y4blBG0ury722bFKG3h5--