From patchwork Thu Nov 19 04:22:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogita Urade X-Patchwork-Id: 104844 Received: from aer-iport-5.cisco.com (aer-iport-5.cisco.com [173.38.203.67]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.8253.1795062174003313092 for ; Wed, 18 Nov 2026 20:22:54 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: message contains an insecure body length tag" header.i=@cisco.com header.s=iport01 header.b=EIun5DrE; spf=pass (domain: cisco.com, ip: 173.38.203.67, mailfrom: yurade@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=5371; q=dns/txt; s=iport01; t=1795062174; x=1796271774; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=qr32RwkiQfjiusZyEYPKISyHQGip2s1BJ7AB3T5dt+Y=; b=EIun5DrEgG1MZHLU5ewP86YBbvwokvJLoMBnMKcDPXvYwRIniXy+NgUo Oz+wuRM8a4AU2xcaKBJB4cAJExv5hScyvJyCqhXalFaBvHWZ2ifLxkpe8 Li4/17MOYjnjYzQ4kWsmsZBMJmR1a+XotGGvBcDXLUuUK5fHPvTtveaiN jrScaVbrR43pHRRoxAyG0GeTWIVFnQo0cAnNorq4DcqGxWlqLVAmk2z1n xN/XYTsS55lCj/nrrG18JPggesNnz6ixJuj0e73jM1kdq2lfqaRIMRsK9 YgI4EnKWujvst7HtaD8HS98l8LhLeFLsEVHHOhsz8sxwg2PW4cHuPR1o8 Q==; X-CSE-ConnectionGUID: U78K4HGYQbO8fiws4vuWnA== X-CSE-MsgGUID: CfPHuERUQnyb61B6PlZP3A== X-IPAS-Result: A0BIAgAlef5q/9FK/pBaHgEBCxIMggULgld1YENJA5QngiEDnimBfg8BAQEPRA0EAQGEP0YCjiACJjQJDgECBAMCAwEBAQEBAQEBAQEBAQoBAQUBAQECAQcFgQ4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gcWFe3rPX8gUmkVvpbK lcI4WwptaU0+UmhQ9XxUhH+p2SL1iPwQPJZHvd/7ESGzbDZpl7JQGMFVTVGLtchsafaWAAX6 7NApPuxbRQHjVFfYSz1Gmu8xd9qBRUoEA== IronPort-HdrOrdr: A9a23:XZW7pqmMiuKubSEuaFWeXMS7FizpDfIA3DAbv31ZSRFFG/Fw8P re+MjzuiWbtN98YhwdcJW7Scq9qBDnhPtICPcqXItKNTOO0ADDEGgh1/qB/9SKIULDH4BmuZ uIC5IfNPTASX5nkM39/A60V/wkwNWB7eSUoN229QYLcemvAJsQljuQzW2gYytLeDU= X-Talos-CUID: 9a23:NMIciG3k3IwfKOfgMurwebxfJ591USH940bpKWjoB2d2U+GLVGCW0fYx X-Talos-MUID: 9a23:5aEW2wmCwZZX+1hyXq4GdnpJOv9I/omUNXkLgJ9Y4uPaDShCA2y02WE= X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,220,1787011200"; d="scan'208";a="59346646" Received: from aer-l-core-08.cisco.com ([144.254.74.209]) by aer-iport-5.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 19 Nov 2026 04:22:47 +0000 Received: from sjc-ads-7871.cisco.com (sjc-ads-7871.cisco.com [10.30.222.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aer-l-core-08.cisco.com (Postfix) with ESMTPS id 6D64618000277 for ; Thu, 19 Nov 2026 04:22:47 +0000 (GMT) Received: by sjc-ads-7871.cisco.com (Postfix, from userid 1889728) id 88C7BCC8C92; Wed, 18 Nov 2026 20:22:43 -0800 (PST) From: Yogita Urade To: openembedded-core@lists.openembedded.org Subject: [OE-core][wrynose][v3 PATCH 21/27] python3-git: fix CVE-2026-78677 Date: Wed, 18 Nov 2026 20:22:36 -0800 Message-Id: <20261119042242.1640611-22-yurade@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261119042242.1640611-1-yurade@cisco.com> References: <20261106144331.3354811-1-yurade@cisco.com> <20261119042242.1640611-1-yurade@cisco.com> MIME-Version: 1.0 X-Outbound-Client-TLS: ANONYMOUS;sjc-ads-7871.cisco.com [10.30.222.158];TLSv1.3;TLS_AES_256_GCM_SHA384;256 X-Outbound-SMTP-Client: 10.30.222.158, sjc-ads-7871.cisco.com X-Outbound-Node: aer-l-core-08.cisco.com List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 19 Nov 2026 04:22:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250636 This patch applies the upstream fix as referenced in [2], using the commit shown in [1]. [1] https://github.com/gitpython-developers/GitPython/commit/b68afff45af0f49e79a3e2d2162018986b37ad5d [2] https://security-tracker.debian.org/tracker/CVE-2026-78677 Signed-off-by: Yogita Urade --- Changes in v2: - Changed the advisory reference from NVD to Debian Security Tracker. Clarified the --bundle-uri comment and changed the unsafe-clone-options docstring to cover unsafe command execution or I/O. The --separate-git-dir guard is unchanged. --- .../python/python3-git/CVE-2026-78677.patch | 87 +++++++++++++++++++ .../python/python3-git_3.1.43.bb | 1 + 2 files changed, 88 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-git/CVE-2026-78677.patch diff --git a/meta/recipes-devtools/python/python3-git/CVE-2026-78677.patch b/meta/recipes-devtools/python/python3-git/CVE-2026-78677.patch new file mode 100644 index 0000000000..2f7714e6cc --- /dev/null +++ b/meta/recipes-devtools/python/python3-git/CVE-2026-78677.patch @@ -0,0 +1,87 @@ +From 03baa6374b8769a9544292d84040b323c5f1437a Mon Sep 17 00:00:00 2001 +From: Byron +Date: Mon, 10 Aug 2026 11:20:03 +0200 +Subject: [PATCH] Block separate git directories during clone + + +Repo.clone() and Repo.clone_from() did not reject the clone option that +redirects repository metadata to a caller-controlled path (GHSA-8mcc-hrx5-hvxc). +Regression coverage exercises both keyword and multi-option input through both +public clone APIs. + +Add the option to the existing clone denylist, matching Repo.init() +and the documented allow_unsafe_options contract. Git itself registers + +The Python package and Alpine test workflows failed across the submodule suite +because GitPython internally supplies --separate-git-dir when creating modern +submodule layouts. The new public clone guard correctly rejected that option, +but could not distinguish the library-generated path from caller input. + +Validate caller-provided keyword and multi-options before adding the +library-controlled metadata path, then explicitly allow the resulting trusted +clone invocation. This preserves rejection of unsafe clone_multi_options while +restoring normal submodule creation. Update the one test that intentionally +invokes Repo.clone_from() with its own separate git directory to opt in +explicitly. + +CVE: CVE-2026-78677 +Upstream-Status: Backport [https://github.com/gitpython-developers/GitPython/commit/b68afff45af0f49e79a3e2d2162018986b37ad5d] + +Backport Changes: +- Omitted test/test_clone.py, test/test_submodule.py because the current PyPI + source archive does not include the test suite and the python3-git recipe + does not run it. + +Assisted-by: GPT 5.6 +Co-authored-by: GPT 5.6 +Assisted-by: GPT 5.6 +Co-authored-by: GPT 5.6 +(cherry picked from commit b68afff45af0f49e79a3e2d2162018986b37ad5d) +Signed-off-by: Yogita Urade +--- + git/objects/submodule/base.py | 10 ++++++++++ + git/repo/base.py | 2 ++ + 2 files changed, 12 insertions(+) + +diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py +index d25df367..410f41e2 100644 +--- a/git/objects/submodule/base.py ++++ b/git/objects/submodule/base.py +@@ -9,6 +9,7 @@ import logging + import ntpath + import os + import os.path as osp ++import shlex + import stat + import sys + import uuid +@@ -360,6 +361,15 @@ class Submodule(IndexObject, TraversableIterableObj): + module_abspath = cls._module_abspath(repo, path, name) + module_checkout_path = module_abspath + if cls._need_gitfile_submodules(repo.git): ++ if not allow_unsafe_options: ++ Git.check_unsafe_options(Git._option_candidates([], kwargs), repo.unsafe_git_clone_options) ++ multi_options = kwargs.get("multi_options") ++ if multi_options: ++ Git.check_unsafe_options( ++ shlex.split(" ".join(cast("Sequence[str]", multi_options))), ++ repo.unsafe_git_clone_options, ++ ) ++ allow_unsafe_options = True + kwargs["separate_git_dir"] = module_abspath + module_abspath_dir = osp.dirname(module_abspath) + if not osp.isdir(module_abspath_dir): +diff --git a/git/repo/base.py b/git/repo/base.py +index fd6d660d..56a19dc5 100644 +--- a/git/repo/base.py ++++ b/git/repo/base.py +@@ -158,7 +158,9 @@ class Repo: + "-c", + # Can install hooks that execute during clone: + "--template", ++ # Redirects the repository metadata to a caller-controlled path: ++ "--separate-git-dir", + # Fetches from an additional caller-controlled URI: + "--bundle-uri", + ] + """Options to :manpage:`git-clone(1)` that permit unsafe command execution or I/O. diff --git a/meta/recipes-devtools/python/python3-git_3.1.43.bb b/meta/recipes-devtools/python/python3-git_3.1.43.bb index dc7694f593..fbb1553778 100644 --- a/meta/recipes-devtools/python/python3-git_3.1.43.bb +++ b/meta/recipes-devtools/python/python3-git_3.1.43.bb @@ -45,6 +45,7 @@ SRC_URI += "file://CVE-2026-42284.patch \ file://CVE-2026-76222-regression.patch \ file://CVE-2026-76222_p2.patch \ file://CVE-2026-78678_CVE-2026-78679.patch \ + file://CVE-2026-78677.patch \ " SRC_URI[sha256sum] = "35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c"