From patchwork Wed Nov 25 05:23:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 105533 Received: from aer-iport-5.cisco.com (aer-iport-5.cisco.com [173.38.203.67]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.36256.1795584234448348191 for ; Tue, 24 Nov 2026 21:23:55 -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=XZvI+VYG; spf=pass (domain: cisco.com, ip: 173.38.203.67, mailfrom: asparmar@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=12252; q=dns/txt; s=iport01; t=1795584234; x=1796793834; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=w36+hakRM+BNthM81BlhDffhwyov3xmFOnhMdS5Xsm8=; b=XZvI+VYGzUPmve+b7ar2XXIbDi9dScVXie9Q1VJZujRVayrpyFf5K0V6 V6AHA7br4ihrfL+ZeJCLvUAKjZXt+qhisCipOL7H6fYUxrWrDzyLFpjKN vVofit9lh0iJqaoWbtL5l82Smmu+OIKrf7AKoxVq/XGAsLlN82YKT7dix Pr908YdfSvhQ1oOs4ZLgSVyCmCWYkdpg+uvH4MLzDkD7T7ap1GK3Vhopd MwEOrB+PoyYrSNF0ZiLax8xaW1wFVWWNLt3+HKMnRwNLWFE1KtqhEVJcs R88nYSTvYmETebGTNtPVqmTAsYeQToSgZBnh5GDTjiP645Nz2yg5mOnn0 g==; X-CSE-ConnectionGUID: ayoVHgLbRdyTA6Gg2tWr2Q== X-CSE-MsgGUID: Zx24FwxvQAWo1Q0fvPbGsA== X-IPAS-Result: A0BFAgCQbgZr/8pK/pBaglmCV3VhQkkDlCeBNWyeLIF+DwEBAQ9EDQQBAZMpAiY0CQ4BAgQDAgMBAQEBAQEBAQEBAQEKAQEFAQEBAgEHBYEOE4ZPDZASAS0LARgBWQMBAlojIYMCAYJ0AgERugWBeTOBAYMpAd0HAQsUAYE4hUKIJV0YAUSEOicbG4FygRWDaoEFgVwCgTiGbgSCDRWBDIFUHjEzgiCJcQKBSYhSSIEeA1ksAVUTDQoLBwWBaAM1EioVbjIdgSM7F4EHGwYFgRyBHoESgQNdgSsoXiGBCIF1AoJRggACAUlBDgdFUwklQxJHJCIIEgkBExosCoEaNTwJJj8VDGcLGgVhCAINDHQ5EDAcJC8FGSY8GwqBDCcdHhkOAikGFiELNBgNSBEsNxUZBD5uB5QTgxs9UQErBHsGG4EMDw+TIZI2oREKKIN5jCSVOhozhVulFwuYfYs3glOWUYRqgWg8gVlwFTuCZwlKGQ+OKwQKCxyDRIVkyHcjNQIJAy8BAQcCBw4DC4FokAGBfQEB IronPort-Data: A9a23:yrtHMaN4jJpNkiDvrR3ylsFynXyQoLVcMsEvi/4bfWQNrUoi1mRSz 2AZDzjQO/mOZmf0f4pxboTlp0MO68XQx9BlHHM5pCpnJ55oRWUpJjg4wmPYZX76whjrFRo/h ykmQoCeap1yFjmM/ErF3oHJ9RFUzbuPSqf3FNnKMyVwQR4MYCo6gHqPocZh6mJTqYb/WVzlV e/a+ZWFZgb8gWMsawr41orawP9RlKWq0N8nlgRWicBj5Df2i3QTBZQDEqC9R1OQapVUBOOzW 9HYx7i/+G7Dlz91Yj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnBaPpIACRYpQRw/ZwNlMDxG4 I4lWZSYEW/FN0BX8QgXe0Ew/ypWZcWq9FJbSJSymZT78qHIT5fj6/x/C38WMqkSwOpmPUgQ2 vNCNA8XNCnW0opawJrjIgVtrs0uNozveYgYoHwllWifBvc9SpeFSKLPjTNa9G5s2oYUQKqYO JZfM2I1BPjDS0Un1lM/AYkmlf2tj2PXeDxDo1XTrq0yi4TW5FIpi+O8aYqKEjCMbfdFxBq2u XLYxk3GBUgjbNKB8TCq6Vv504cjmgu+Aur+DoaQ8eZnhlCWzGEfBBAaEFe2v/S9okq/QM5Eb UsM9ywjqKI/+ECmQp/6RRLQnZKflhcRQZ9UVuY98gzIkvOS6AeCDW9CRTlEADA7iPILqfUR/ gfht7vU6fZH6dV5lVr1Gm+okA6P IronPort-HdrOrdr: A9a23:vbpMPqhv6aR02pJf0uT8hXIMNnBQXuoji2hC6mlwRA09TyX+rb HNoB1173HJYVoqNU3I+urwW5VoP0m8yXcd2+B4Vt2ftWLd11dAQrsP0WKb+V3dMhy70PJB3q F9dKU7ItjxAV9myfve2mCDYrMdKB3tytHOuQ8YpE0dKT1XVw== X-Talos-CUID: 9a23:jR+DAmhBRodhdvcuEb1rEtazMjJue2za8lffB0WCBXdVYeO6RgWMx7k+qp87 X-Talos-MUID: 9a23:JxUGewZPqMHW/+BThS+22B99JNlRypupUXlVn4s+seafHHkl X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,232,1787011200"; d="scan'208";a="60339187" Received: from aer-l-core-01.cisco.com ([144.254.74.202]) by aer-iport-5.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 25 Nov 2026 05:23:50 +0000 Received: from sjc-ads-20495.cisco.com (sjc-ads-20495.cisco.com [171.70.188.248]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ciscoit-managed-infra-smtp-auth.cisco.com", Issuer "Internal Private TLS SubCA" (verified OK)) by aer-l-core-01.cisco.com (Postfix) with ESMTPS id 3F454794E7 for ; Wed, 25 Nov 2026 05:23:50 +0000 (GMT) Received: by sjc-ads-20495.cisco.com (Postfix, from userid 1877012) id E624ACC1634; Tue, 24 Nov 2026 21:23:48 -0800 (PST) From: "Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-devel@lists.openembedded.org Subject: [meta-networking][wrynose][PATCH 1/2] python3-scapy: fix CVE-2026-128237 and CVE-2026-128238 Date: Tue, 24 Nov 2026 21:23:44 -0800 Message-Id: <20261125052345.3120371-1-asparmar@cisco.com> X-Mailer: git-send-email 2.35.6 MIME-Version: 1.0 X-Outbound-Client-TLS: VERIFIED;sjc-ads-20495.cisco.com [171.70.188.248];TLSv1.3;TLS_AES_256_GCM_SHA384;256;ciscoit-managed-infra-smtp-auth.cisco.com X-Outbound-SMTP-Client: 171.70.188.248, sjc-ads-20495.cisco.com X-Outbound-Node: aer-l-core-01.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 ; Wed, 25 Nov 2026 05:24:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/132987 From: Ashishkumar Parmar This patch backports the shared upstream BER fix to the current version of Scapy. The fix bounds numeric decoding and recursive ASN.1/BER decoding. Both CVEs are addressed by the same upstream commit, referenced in [1]. Their public advisories are referenced in [2] and [3]. The CBOR files do not exist in the current version and are omitted. Applicable ASN.1/BER source and regression test changes are retained together. [1] https://github.com/secdev/scapy/commit/36239645cf0b9408eb0821d9ed94f02e7b3c6dc6 [2] https://github.com/secdev/scapy/security/advisories/GHSA-xx44-g48m-mjp6 [3] https://github.com/secdev/scapy/security/advisories/GHSA-456h-w4v7-hvpr Signed-off-by: Ashishkumar Parmar --- .../CVE-2026-128237_CVE-2026-128238.patch | 269 ++++++++++++++++++ .../python/python3-scapy_2.6.1.bb | 1 + 2 files changed, 270 insertions(+) create mode 100644 meta-networking/recipes-devtools/python/python3-scapy/CVE-2026-128237_CVE-2026-128238.patch diff --git a/meta-networking/recipes-devtools/python/python3-scapy/CVE-2026-128237_CVE-2026-128238.patch b/meta-networking/recipes-devtools/python/python3-scapy/CVE-2026-128237_CVE-2026-128238.patch new file mode 100644 index 0000000..a8c0821 --- /dev/null +++ b/meta-networking/recipes-devtools/python/python3-scapy/CVE-2026-128237_CVE-2026-128238.patch @@ -0,0 +1,269 @@ +From 46557d0e8fa42e93b82c09c78134ceb03ff52d9f Mon Sep 17 00:00:00 2001 +From: Gabriel <10530980+gpotter2@users.noreply.github.com> +Date: Fri, 31 Jul 2026 18:24:22 +0200 +Subject: [PATCH] Improve BER handling of integer boundaries (#5063) + +CVE: CVE-2026-128237 CVE-2026-128238 +Upstream-Status: Backport [https://github.com/secdev/scapy/commit/36239645cf0b9408eb0821d9ed94f02e7b3c6dc6] + +Backport Changes: +- Omit scapy/cbor/cbor.py and scapy/cbor/cborcodec.py because these + files do not exist in the current version. + +Signed-off-by: Ashishkumar Parmar +--- + scapy/asn1/asn1.py | 12 +++++----- + scapy/asn1/ber.py | 57 ++++++++++++++++++++++++++++++++++----------- + test/regression.uts | 28 +++++++++++++++++----- + 3 files changed, 71 insertions(+), 26 deletions(-) + +diff --git a/scapy/asn1/asn1.py b/scapy/asn1/asn1.py +index 0783a3b3..44588b6f 100644 +--- a/scapy/asn1/asn1.py ++++ b/scapy/asn1/asn1.py +@@ -126,13 +126,13 @@ class ASN1Codec(EnumElement): + # type: (Type[BERcodec_Object[Any]]) -> None + cls._stem = stem + +- def dec(cls, s, context=None): +- # type: (bytes, Optional[Type[ASN1_Class]]) -> ASN1_Object[Any] +- return cls._stem.dec(s, context=context) # type: ignore ++ def dec(cls, s, context=None, _depth=0): ++ # type: (bytes, Optional[Type[ASN1_Class]], int) -> ASN1_Object[Any] ++ return cls._stem.dec(s, context=context, _depth=_depth) # type: ignore + +- def safedec(cls, s, context=None): +- # type: (bytes, Optional[Type[ASN1_Class]]) -> ASN1_Object[Any] +- return cls._stem.safedec(s, context=context) # type: ignore ++ def safedec(cls, s, context=None, _depth=0): ++ # type: (bytes, Optional[Type[ASN1_Class]], int) -> ASN1_Object[Any] ++ return cls._stem.safedec(s, context=context, _depth=_depth) # type: ignore + + def get_stem(cls): + # type: () -> type +diff --git a/scapy/asn1/ber.py b/scapy/asn1/ber.py +index 23899274..b5ffc425 100644 +--- a/scapy/asn1/ber.py ++++ b/scapy/asn1/ber.py +@@ -50,6 +50,8 @@ from typing import ( + + # [ BER tools ] # + ++MAX_BER_DEPTH = 32 ++ + + class BER_Exception(Exception): + pass +@@ -155,8 +157,8 @@ def BER_num_enc(ll, size=1): + return b"".join(chb(k) for k in x) + + +-def BER_num_dec(s, cls_id=0): +- # type: (bytes, int) -> Tuple[int, bytes] ++def BER_num_dec(s, cls_id=0, max_pow=32): ++ # type: (bytes, int, int) -> Tuple[int, bytes] + if len(s) == 0: + raise BER_Decoding_Error("BER_num_dec: got empty string", remaining=s) + x = cls_id +@@ -166,6 +168,9 @@ def BER_num_dec(s, cls_id=0): + x |= c & 0x7f + if not c & 0x80: + break ++ if i > max_pow: ++ raise BER_Decoding_Error("BER_num_dec: maximum value reached (2^32-1)", ++ remaining=s) + if c & 0x80: + raise BER_Decoding_Error("BER_num_dec: unfinished number description", + remaining=s) +@@ -338,7 +343,8 @@ class BERcodec_Object(Generic[_K], metaclass=BERcodec_metaclass): + def do_dec(cls, + s, # type: bytes + context=None, # type: Optional[Type[ASN1_Class]] +- safe=False # type: bool ++ safe=False, # type: bool ++ _depth=0, # type: int + ): + # type: (...) -> Tuple[ASN1_Object[Any], bytes] + if context is not None: +@@ -360,22 +366,28 @@ class BERcodec_Object(Generic[_K], metaclass=BERcodec_metaclass): + # Value type defined as Unknown + l, s = BER_num_dec(remainder) + return ASN1_BADTAG(s[:l]), s[l:] +- return codec.dec(s, _context, safe) ++ return codec.dec(s, _context, safe, _depth=_depth) + + @classmethod + def dec(cls, + s, # type: bytes + context=None, # type: Optional[Type[ASN1_Class]] + safe=False, # type: bool ++ _depth=0, # type: int + ): + # type: (...) -> Tuple[Union[_ASN1_ERROR, ASN1_Object[_K]], bytes] ++ if _depth > MAX_BER_DEPTH: ++ raise BER_Exception("Reached maximum BER recursion limit") + if not safe: +- return cls.do_dec(s, context, safe) ++ return cls.do_dec(s, context, safe, _depth=_depth) + try: +- return cls.do_dec(s, context, safe) ++ return cls.do_dec(s, context, safe, _depth=_depth) + except BER_BadTag_Decoding_Error as e: + o, remain = BERcodec_Object.dec( +- e.remaining, context, safe ++ e.remaining, ++ context=context, ++ safe=safe, ++ _depth=_depth + 1, + ) # type: Tuple[ASN1_Object[Any], bytes] + return ASN1_BADTAG(o), remain + except BER_Decoding_Error as e: +@@ -387,9 +399,10 @@ class BERcodec_Object(Generic[_K], metaclass=BERcodec_metaclass): + def safedec(cls, + s, # type: bytes + context=None, # type: Optional[Type[ASN1_Class]] ++ _depth=0, # type: int + ): + # type: (...) -> Tuple[Union[_ASN1_ERROR, ASN1_Object[_K]], bytes] +- return cls.dec(s, context, safe=True) ++ return cls.dec(s, context, safe=True, _depth=_depth) + + @classmethod + def enc(cls, s, size_len=0): +@@ -437,6 +450,7 @@ class BERcodec_INTEGER(BERcodec_Object[int]): + s, # type: bytes + context=None, # type: Optional[Type[ASN1_Class]] + safe=False, # type: bool ++ _depth=0, # type: int + ): + # type: (...) -> Tuple[ASN1_Object[int], bytes] + l, s, t = cls.check_type_check_len(s) +@@ -461,7 +475,8 @@ class BERcodec_BIT_STRING(BERcodec_Object[str]): + def do_dec(cls, + s, # type: bytes + context=None, # type: Optional[Type[ASN1_Class]] +- safe=False # type: bool ++ safe=False, # type: bool ++ _depth=0, # type: int + ): + # type: (...) -> Tuple[ASN1_Object[str], bytes] + # /!\ the unused_bits information is lost after this decoding +@@ -515,6 +530,7 @@ class BERcodec_STRING(BERcodec_Object[str]): + s, # type: bytes + context=None, # type: Optional[Type[ASN1_Class]] + safe=False, # type: bool ++ _depth=0, # type: int + ): + # type: (...) -> Tuple[ASN1_Object[Any], bytes] + l, s, t = cls.check_type_check_len(s) +@@ -555,6 +571,7 @@ class BERcodec_OID(BERcodec_Object[bytes]): + s, # type: bytes + context=None, # type: Optional[Type[ASN1_Class]] + safe=False, # type: bool ++ _depth=0, # type: int + ): + # type: (...) -> Tuple[ASN1_Object[bytes], bytes] + l, s, t = cls.check_type_check_len(s) +@@ -562,7 +579,8 @@ class BERcodec_OID(BERcodec_Object[bytes]): + while s: + l, s = BER_num_dec(s) + lst.append(l) +- if (len(lst) > 0): ++ if lst: ++ # X.690 sect 8.19.4 + lst.insert(0, lst[0] // 40) + lst[1] %= 40 + return ( +@@ -639,18 +657,24 @@ class BERcodec_SEQUENCE(BERcodec_Object[Union[bytes, List[BERcodec_Object[Any]]] + def do_dec(cls, + s, # type: bytes + context=None, # type: Optional[Type[ASN1_Class]] +- safe=False # type: bool ++ safe=False, # type: bool ++ _depth=0, # type: int + ): + # type: (...) -> Tuple[ASN1_Object[Union[bytes, List[Any]]], bytes] + if context is None: + context = cls.tag.context ++ if _depth > MAX_BER_DEPTH: ++ raise BER_Exception("Reached maximum BER recursion limit") + ll, st = cls.check_type_get_len(s) # we may have len(s) < ll + s, t = st[:ll], st[ll:] + obj = [] + while s: + try: + o, remain = BERcodec_Object.dec( +- s, context, safe ++ s, ++ context=context, ++ safe=safe, ++ _depth=_depth + 1, + ) # type: Tuple[ASN1_Object[Any], bytes] + s = remain + except BER_Decoding_Error as err: +@@ -683,8 +707,13 @@ class BERcodec_IPADDRESS(BERcodec_STRING): + return chb(int(cls.tag)) + BER_len_enc(len(s), size=size_len) + s + + @classmethod +- def do_dec(cls, s, context=None, safe=False): +- # type: (bytes, Optional[Any], bool) -> Tuple[ASN1_Object[str], bytes] ++ def do_dec(cls, ++ s, # type: bytes ++ context=None, # type: Optional[Any] ++ safe=False, # type: bool ++ _depth=0, # type: int ++ ): ++ # type: (...) -> Tuple[ASN1_Object[str], bytes] + l, s, t = cls.check_type_check_len(s) + try: + ipaddr_ascii = inet_ntoa(s) +diff --git a/test/regression.uts b/test/regression.uts +index 9b53fa36..67cd2870 100644 +--- a/test/regression.uts ++++ b/test/regression.uts +@@ -4150,16 +4150,21 @@ r1 == b'@\x04\x08\x08\x08\x08' + r2 = b.dec(r1)[0] + r2.val == '8.8.8.8' + +-a = b'\x1f\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\x01\x01\x00C\x02\x01U0\x0f0\r\x06\x08+\x06\x01\x02\x01\x02\x01\x00\x02\x01!' +-ret = False ++a = b'\x1f\xfe\xfe\xfe\xfe\xfe\x01\x01\x00C\x02\x01U0\x0f0\r\x06\x08+\x06\x01\x02\x01\x02\x01\x00\x02\x01!' + try: + BERcodec_Object.check_type(a) +-except BER_BadTag_Decoding_Error: +- ret = True ++except BER_BadTag_Decoding_Error as ex: ++ assert "Got tag" in str(ex) + else: +- ret = False ++ assert False + +-assert ret ++a = b'\x1f\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe\x01\x01\x00C\x02\x01U0\x0f0\r\x06\x08+\x06\x01\x02\x01\x02\x01\x00\x02\x01!' ++try: ++ BERcodec_Object.check_type(a) ++except BER_Decoding_Error as ex: ++ assert "maximum value" in str(ex) ++else: ++ assert False + + = BER trigger failures + +@@ -4170,6 +4175,17 @@ except BER_Decoding_Error: + pass + + ++= BER tests - 2 ++ ++a = b'0c\x02\x01\x01\x04\x06public\xa2V\x02\x01\x01\x02\x01\x00\x02\x01\x000K0I\x06\x03+\x06\x010B0@0>0<0:08060402000.0,0*0(0&0$0"0 0\x1e0\x1c0\x1a0\x180\x160\x140\x120\x100\x0e0\x0c0\n0\x080\x060\x040\x020\x00' ++try: ++ SNMP(a) ++except BER_Exception as ex: ++ assert "recursion limit" in str(ex) ++else: ++ assert False ++ ++ + ############ + ############ + + Fields diff --git a/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb b/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb index 678aec0..8dcca1f 100644 --- a/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +++ b/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb @@ -19,6 +19,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRCREV = "8e08cbf759de6709a5b4af6bea3655d293129bb4" SRC_URI = "git://github.com/secdev/scapy.git;branch=master;protocol=https;tag=v${PV} \ file://0001-python3-scapy-skip-ICMP-regression-tests-in-ptest.patch \ + file://CVE-2026-128237_CVE-2026-128238.patch \ file://run-ptest" UPSTREAM_CHECK_COMMITS = "1" From patchwork Wed Nov 25 05:23:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 105532 Received: from aer-iport-4.cisco.com (aer-iport-4.cisco.com [173.38.203.54]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.36257.1795584234598110102 for ; Tue, 24 Nov 2026 21:23:55 -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=WQXs+A1v; spf=pass (domain: cisco.com, ip: 173.38.203.54, mailfrom: asparmar@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=20500; q=dns/txt; s=iport01; t=1795584234; x=1796793834; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=vpjznsB4CPJ5qPc7z/l/aVlENtN+KfefP4mk/FLJmh4=; b=WQXs+A1v6tNu99DsJ+oz/1fqZPGniJrLrU4I9rgmdtT+qNAE76vi2UWI d9smqC0xYFFdYOCOTUIa0km6hbstJeBZstRWV/Bx/DYgzdC0eF8vksHwt lO+SlJjoJz2nzQtfGKIZzWjG48jx2W23pZVP3lgU+cGofHAjm0xFJNbVN hPdq764Xt/aX8WcbjiScwHNcbd4denAevl5+Ol0NmU8vp1ubm+MqMmZUh U9Dkg6ac2YBaxrrAJ4YF/SxUz6Buz2TnPtdpVMuQjqfVRdlBwvtcN0+eJ u99KiGyMIdcDONCpeIacQoIK0F4RIGDWCrHp2Ukw0GQbulQ1OPw0nZF6e A==; X-CSE-ConnectionGUID: QZ44vJR/SzattoF9y4EVLA== X-CSE-MsgGUID: wd0E2pDmTAObbGhl1bH+yQ== X-IPAS-Result: A0BVAAAGbgZr/85K/pBaHQEBAQEJARIBBQUBgX0HAQsBAYJVdWFCSQOUJ4IhA4ETkD2MWRSBag8BAQEPRA0EAQGFBQKOIgImNQgOAQIEAwIDAQEBAQEBAQEBAQEBCgEBBQEBAQIBBwWBDhOGFQczDUkBiUgBhX8BAgEDJyICAT0cAwECLysdAQUIGYMCAYJ0AgERugGBeTOBAYMpAYFU2zMBCxQBgTgBhUGIJV0YAUSEOicbG4FygRWCdHaBBYFcAoE3D4ZgBIIigQyBVB5khTiGWQKBSYhSSIEeA1ksAVUTDQoLBwWBaAM1EioVbjIdgSM7F4EHGwYFgRyBHoESgQNdgSsoXiGBCIF1AoJRggACAUlBDgdFUwklQxJHJCIIEgkBExosCoEaNTwJJj8VDGcLGgVhCAINDHQ5EDAcJC8FGSY8GwqBDCcdHhkOAikGFiELNBgNSBEsNxUZBD5uB5QTgm4tMQwPLxMBKwQFDjYBAQclFgcIOg8UER4HBxAtkmwIkjahEQoog3mMJJU6GjOEBIFXpRcLmH2CWYheglOHXY4MCyY3hGqBagE5gVlwFTuCZwlKGQ9XiH+EY4NrhWTIVSIjNQIJAy8BAQcCBw4DC4FoiSGGXyyBUgEB IronPort-Data: A9a23:okFHxK7HCdGjRx6JM++mPgxRtG/GchMFZxGqfqrLsTDasY5as4F+v jYcWGrTaf2KZ2P9etF/btvjpx5U7JXSn9Y1TgdvrSthZn8b8sCt6fZ1gavT04J+CuWZESqLO u1HMoGowPgcFyGa+1H1dOi78BGQ7InQLpLkEunIJyttcgFtTSYlmHpLlvUw6mJSqYDR7zil5 5Wo/KUzBHf/g2QqaztOtvrawP9SlK2aVA0w7wRWic9j5Dcyp1FNZLoDKKe4KWfPQ4U8NoaSW +bZwbilyXjS9hErB8nNuu6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTaJLwXXxqZwChxLid/ jniWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I0DuKxPRL/tS4E4eBL9EpvhVOyZ15 /UENDcjPwHfqtyS6efuIgVsrpxLwMjDNY4F/3UlxjbDALN+HNbIQr7B4plT2zJYasJmRKqCI ZBENXwwMFKaO0Mn1lQ/UPrSmM+hnWH2aThRsnqepLE85C7YywkZPL3FboCEIozVFZQ9ckCwu W6e0j7hLhQmHfuVwxWF9iumpqzepHauMG4VPPjinhJwu3WU3mEVBRgcWFe3rPX8hkOgVtZ3L 00P5jFoqrA/8kGuRNTxUxC05nmesXYht8F4GuAgrQXIwa3O7kPBWy4PTyVKb5ots8peqSEW6 2JlVujBXVRH2IB5g1rEnltIhVte4RQoEFI= IronPort-HdrOrdr: A9a23:1qwa6K3DDn+kF5OwbKBCswqjBJ4kLtp133Aq2lEZdPUzSL39qy nAppomPHPP5Qr5HUtQ+uxoW5PwJE80i6QV3WB5B97LN2PbUSmTXeNfBODZrAEIdReTygck78 ddWpk7LsHsBl5nisu/ygy5H9E8hOSjysmT9IDjJ7MHd3ASV0mmhD0JbDqmLg== X-Talos-CUID: 9a23:13ER52q49dEpzp1YbJSjeejmUfkXLiHD7k2XGF2xFXpuZuyEFXKu3Ioxxg== X-Talos-MUID: 9a23:EQv8ow2tXobWMZyW0NoEvZWzXDUj/Kj2JRoVvZA6ku6OPwNwP26XrHeme9py X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,232,1787011200"; d="scan'208";a="62908789" Received: from aer-l-core-05.cisco.com ([144.254.74.206]) by aer-iport-4.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 25 Nov 2026 05:23:50 +0000 Received: from sjc-ads-20495.cisco.com (sjc-ads-20495.cisco.com [171.70.188.248]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ciscoit-managed-infra-smtp-auth.cisco.com", Issuer "Internal Private TLS SubCA" (verified OK)) by aer-l-core-05.cisco.com (Postfix) with ESMTPS id 40844180008D3 for ; Wed, 25 Nov 2026 05:23:50 +0000 (GMT) Received: by sjc-ads-20495.cisco.com (Postfix, from userid 1877012) id E9FF1CC2EF1; Tue, 24 Nov 2026 21:23:48 -0800 (PST) From: "Ashishkumar Parmar X (asparmar - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-devel@lists.openembedded.org Subject: [meta-networking][wrynose][PATCH 2/2] python3-scapy: fix CVE-2025-71463 Date: Tue, 24 Nov 2026 21:23:45 -0800 Message-Id: <20261125052345.3120371-2-asparmar@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261125052345.3120371-1-asparmar@cisco.com> References: <20261125052345.3120371-1-asparmar@cisco.com> MIME-Version: 1.0 X-Outbound-Client-TLS: VERIFIED;sjc-ads-20495.cisco.com [171.70.188.248];TLSv1.3;TLS_AES_256_GCM_SHA384;256;ciscoit-managed-infra-smtp-auth.cisco.com X-Outbound-SMTP-Client: 171.70.188.248, sjc-ads-20495.cisco.com X-Outbound-Node: aer-l-core-05.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 ; Wed, 25 Nov 2026 05:24:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/132986 From: Ashishkumar Parmar This patch applies the upstream backport for CVE-2025-71463 to the current version. The upstream fix merge or commit is referenced in [1], and the public CVE advisory is referenced in [2]. The individual backported commit links are recorded in the embedded patch headers when the fix expands to multiple commits. This patch also removes stale session persistence examples and obsolete man-page limitations. The introduction cleanup is taken from [3]. [1] https://github.com/secdev/scapy/commit/13621d1145b3435e9d03caf20997107a84435c0b [2] https://github.com/secdev/scapy/security/advisories/GHSA-cq46-m9x9-j8w2 [3] https://github.com/secdev/scapy/commit/5376fcc86aaba7c516fb4aa19576b03b387d217a Signed-off-by: Ashishkumar Parmar --- .../python/python3-scapy/CVE-2025-71463.patch | 468 ++++++++++++++++++ .../python/python3-scapy_2.6.1.bb | 1 + 2 files changed, 469 insertions(+) create mode 100644 meta-networking/recipes-devtools/python/python3-scapy/CVE-2025-71463.patch diff --git a/meta-networking/recipes-devtools/python/python3-scapy/CVE-2025-71463.patch b/meta-networking/recipes-devtools/python/python3-scapy/CVE-2025-71463.patch new file mode 100644 index 0000000..e1277c9 --- /dev/null +++ b/meta-networking/recipes-devtools/python/python3-scapy/CVE-2025-71463.patch @@ -0,0 +1,468 @@ +From 8df000ba71082f90902ef8f971b0ca1f881edf17 Mon Sep 17 00:00:00 2001 +From: Guillaume Valadon +Date: Wed, 1 Oct 2025 21:58:56 +0200 +Subject: [PATCH] Sessions removed + +CVE: CVE-2025-71463 +Upstream-Status: Backport [https://github.com/secdev/scapy/commit/13621d1145b3435e9d03caf20997107a84435c0b] + +Backport Changes: +- The removed temporary-file test uses the current version's + AppVeyor-specific Windows path assertion instead of the newer upstream + assertion. +- Include only the introduction documentation cleanup from upstream + https://github.com/secdev/scapy/commit/5376fcc86aaba7c516fb4aa19576b03b387d217a + to remove obsolete session save/reload examples. Its unrelated autorun + and session bookkeeping changes are omitted. +- Remove the obsolete session-saving limitation from doc/scapy.1 because + session persistence is removed by this fix. + +Signed-off-by: Ashishkumar Parmar +--- + doc/scapy.1 | 12 +-- + doc/scapy/introduction.rst | 14 +--- + doc/scapy/usage.rst | 18 ---- + scapy/main.py | 166 ++----------------------------------- + test/regression.uts | 67 +-------------- + 5 files changed, 11 insertions(+), 266 deletions(-) + +diff --git a/doc/scapy.1 b/doc/scapy.1 +index 395871a8..1e8d6d4f 100644 +--- a/doc/scapy.1 ++++ b/doc/scapy.1 +@@ -17,10 +17,7 @@ arping, tcpdump, tshark, p0f, ... + .PP + \fBScapy\fP uses the Python interpreter as a command board. That means that + you can use directly Python language (assign variables, use loops, +-define functions, etc.) If you give a file a parameter when you run +-\fBScapy\fP, your session (variables, functions, instances, ...) will be saved +-when you leave the interpreter and restored the next time you launch +-\fBScapy\fP. ++define functions, etc.) + .PP + The idea is simple. Those kinds of tools do two things : sending packets + and receiving answers. That's what \fBScapy\fP does : you define a set of +@@ -48,9 +45,6 @@ header-less mode, also reduces verbosity. + \fB\-d\fR + increase log verbosity. Can be used many times. + .TP +-\fB\-s\fR FILE +-use FILE to save/load session values (variables, functions, instances, ...) +-.TP + \fB\-p\fR PRESTART_FILE + use PRESTART_FILE instead of $HOME/.config/scapy/prestart.py as pre-startup file + .TP +@@ -194,10 +188,6 @@ Does not give the right source IP for routes that use interface aliases. + + May miss packets under heavy load. This is a restriction from python itself + +-Session saving is limited by Python ability to marshal objects. As a +-consequence, lambda functions and generators can't be saved, which seriously +-reduce the usefulness of this feature. +- + BPF filters don't work on Point-to-point interfaces. + + +diff --git a/doc/scapy/introduction.rst b/doc/scapy/introduction.rst +index ab8b97cf..b308755c 100644 +--- a/doc/scapy/introduction.rst ++++ b/doc/scapy/introduction.rst +@@ -62,10 +62,9 @@ Interpreting results can help users that don't know what a port scan is, but it + Quick demo + ========== + +-First, we play a bit and create four IP packets at once. Let's see how it works. We first instantiate the IP class. Then, we instantiate it again and we provide a destination that is worth four IP addresses (/30 gives the netmask). Using a Python idiom, we develop this implicit packet in a set of explicit packets. Then, we quit the interpreter. As we provided a session file, the variables we were working on are saved, then reloaded:: ++First, we play a bit and create four IP packets at once. Let's see how it works. We first instantiate the IP class. Then, we instantiate it again and we provide a destination that is worth four IP addresses (/30 gives the netmask). Using a Python idiom, we develop this implicit packet in a set of explicit packets:: + +- # ./run_scapy -s mysession +- New session [mysession] ++ # ./run_scapy + Welcome to Scapy (2.4.0) + >>> IP() + +@@ -76,15 +75,6 @@ First, we play a bit and create four IP packets at once. Let's see how it works. + >>> [p for p in ip] + [, , + , ] +- >>> ^D +- +-:: +- +- # ./run_scapy -s mysession +- Using session [mysession] +- Welcome to Scapy (2.4.0) +- >>> ip +- |> + + Now, let's manipulate some packets:: + +diff --git a/doc/scapy/usage.rst b/doc/scapy/usage.rst +index a32792db..990aa5f4 100644 +--- a/doc/scapy/usage.rst ++++ b/doc/scapy/usage.rst +@@ -1019,24 +1019,6 @@ The output above can be reimported back into Scapy using ``import_object()``:: + \x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f + !"#$%&\'()*+,-./01234567' |>>>> + +-Sessions +-^^^^^^^^ +- +-At last Scapy is capable of saving all session variables using the ``save_session()`` function: +- +->>> dir() +-['__builtins__', 'conf', 'new_pkt', 'pkt', 'pkt_export', 'pkt_hex', 'pkt_raw', 'pkts'] +->>> save_session("session.scapy") +- +-Next time you start Scapy you can load the previous saved session using the ``load_session()`` command:: +- +- >>> dir() +- ['__builtins__', 'conf'] +- >>> load_session("session.scapy") +- >>> dir() +- ['__builtins__', 'conf', 'new_pkt', 'pkt', 'pkt_export', 'pkt_hex', 'pkt_raw', 'pkts'] +- +- + Making tables + ------------- + +diff --git a/scapy/main.py b/scapy/main.py +index c5ad0c74..c7ef726b 100644 +--- a/scapy/main.py ++++ b/scapy/main.py +@@ -14,14 +14,11 @@ import sys + import os + import getopt + import code +-import gzip + import glob + import importlib + import io + from itertools import zip_longest + import logging +-import pickle +-import types + import warnings + from random import choice + +@@ -230,7 +227,7 @@ conf.color_theme = DefaultTheme() + def _usage(): + # type: () -> None + print( +- "Usage: scapy.py [-s sessionfile] [-c new_startup_file] " ++ "Usage: scapy.py [-c new_startup_file] " + "[-p new_prestart_file] [-C] [-P] [-H]\n" + "Args:\n" + "\t-H: header-less start\n" +@@ -439,116 +436,8 @@ def _scapy_exts(): + return res + + +-def save_session(fname="", session=None, pickleProto=-1): +- # type: (str, Optional[Dict[str, Any]], int) -> None +- """Save current Scapy session to the file specified in the fname arg. +- +- params: +- - fname: file to save the scapy session in +- - session: scapy session to use. If None, the console one will be used +- - pickleProto: pickle proto version (default: -1 = latest)""" +- from scapy import utils +- from scapy.config import conf, ConfClass +- if not fname: +- fname = conf.session +- if not fname: +- conf.session = fname = utils.get_temp_file(keep=True) +- log_interactive.info("Saving session into [%s]", fname) +- +- if not session: +- if conf.interactive_shell in ["ipython", "ptipython"]: +- from IPython import get_ipython +- session = get_ipython().user_ns +- else: +- session = builtins.__dict__["scapy_session"] +- +- if not session: +- log_interactive.error("No session found ?!") +- return +- +- ignore = session.get("_scpybuiltins", []) +- hard_ignore = ["scapy_session", "In", "Out", "open"] +- to_be_saved = session.copy() +- +- for k in list(to_be_saved): +- i = to_be_saved[k] +- if k[0] == "_": +- del to_be_saved[k] +- elif hasattr(i, "__module__") and i.__module__.startswith("IPython"): +- del to_be_saved[k] +- elif isinstance(i, ConfClass): +- del to_be_saved[k] +- elif k in ignore or k in hard_ignore: +- del to_be_saved[k] +- elif isinstance(i, (type, types.ModuleType, types.FunctionType)): +- if k[0] != "_": +- log_interactive.warning("[%s] (%s) can't be saved.", k, type(i)) +- del to_be_saved[k] +- else: +- try: +- pickle.dumps(i) +- except Exception: +- log_interactive.warning("[%s] (%s) can't be saved.", k, type(i)) +- +- try: +- os.rename(fname, fname + ".bak") +- except OSError: +- pass +- +- f = gzip.open(fname, "wb") +- pickle.dump(to_be_saved, f, pickleProto) +- f.close() +- +- +-def load_session(fname=None): +- # type: (Optional[Union[str, None]]) -> None +- """Load current Scapy session from the file specified in the fname arg. +- This will erase any existing session. +- +- params: +- - fname: file to load the scapy session from""" +- from scapy.config import conf +- if fname is None: +- fname = conf.session +- try: +- s = pickle.load(gzip.open(fname, "rb")) +- except IOError: +- try: +- s = pickle.load(open(fname, "rb")) +- except IOError: +- # Raise "No such file exception" +- raise +- +- scapy_session = builtins.__dict__["scapy_session"] +- s.update({k: scapy_session[k] for k in scapy_session["_scpybuiltins"]}) +- scapy_session.clear() +- scapy_session.update(s) +- update_ipython_session(scapy_session) +- +- log_loading.info("Loaded session [%s]", fname) +- +- +-def update_session(fname=None): +- # type: (Optional[Union[str, None]]) -> None +- """Update current Scapy session from the file specified in the fname arg. +- +- params: +- - fname: file to load the scapy session from""" +- from scapy.config import conf +- if fname is None: +- fname = conf.session +- try: +- s = pickle.load(gzip.open(fname, "rb")) +- except IOError: +- s = pickle.load(open(fname, "rb")) +- scapy_session = builtins.__dict__["scapy_session"] +- scapy_session.update(s) +- update_ipython_session(scapy_session) +- +- + @overload +-def init_session(session_name, # type: Optional[Union[str, None]] +- mydict, # type: Optional[Union[Dict[str, Any], None]] ++def init_session(mydict, # type: Optional[Union[Dict[str, Any], None]] + ret, # type: Literal[True] + ): + # type: (...) -> Dict[str, Any] +@@ -556,21 +445,18 @@ def init_session(session_name, # type: Optional[Union[str, None]] + + + @overload +-def init_session(session_name, # type: Optional[Union[str, None]] +- mydict=None, # type: Optional[Union[Dict[str, Any], None]] ++def init_session(mydict=None, # type: Optional[Union[Dict[str, Any], None]] + ret=False, # type: Literal[False] + ): + # type: (...) -> None + pass + + +-def init_session(session_name, # type: Optional[Union[str, None]] +- mydict=None, # type: Optional[Union[Dict[str, Any], None]] ++def init_session(mydict=None, # type: Optional[Union[Dict[str, Any], None]] + ret=False, # type: bool + ): + # type: (...) -> Union[Dict[str, Any], None] + from scapy.config import conf +- SESSION = {} # type: Optional[Dict[str, Any]] + + # Load Scapy + scapy_builtins = _scapy_builtins() +@@ -578,39 +464,7 @@ def init_session(session_name, # type: Optional[Union[str, None]] + # Load exts + scapy_builtins.update(_scapy_exts()) + +- if session_name: +- try: +- os.stat(session_name) +- except OSError: +- log_loading.info("New session [%s]", session_name) +- else: +- try: +- try: +- SESSION = pickle.load(gzip.open(session_name, "rb")) +- except IOError: +- SESSION = pickle.load(open(session_name, "rb")) +- log_loading.info("Using existing session [%s]", session_name) +- except ValueError: +- msg = "Error opening Python3 pickled session on Python2 [%s]" +- log_loading.error(msg, session_name) +- except EOFError: +- log_loading.error("Error opening session [%s]", session_name) +- except AttributeError: +- log_loading.error("Error opening session [%s]. " +- "Attribute missing", session_name) +- +- if SESSION: +- if "conf" in SESSION: +- conf.configure(SESSION["conf"]) +- conf.session = session_name +- SESSION["conf"] = conf +- else: +- conf.session = session_name +- else: +- conf.session = session_name +- SESSION = {"conf": conf} +- else: +- SESSION = {"conf": conf} ++ SESSION = {"conf": conf} # type: Dict[str, Any] + + SESSION.update(scapy_builtins) + SESSION["_scpybuiltins"] = scapy_builtins.keys() +@@ -623,6 +477,7 @@ def init_session(session_name, # type: Optional[Union[str, None]] + return SESSION + return None + ++ + ################ + # Main # + ################ +@@ -751,8 +606,6 @@ def interact(mydict=None, argv=None, mybanner=None, loglevel=logging.INFO): + STARTUP_FILE = DEFAULT_STARTUP_FILE + PRESTART_FILE = DEFAULT_PRESTART_FILE + +- session_name = None +- + if argv is None: + argv = sys.argv + +@@ -765,8 +618,6 @@ def interact(mydict=None, argv=None, mybanner=None, loglevel=logging.INFO): + conf.fancy_banner = False + conf.verb = 1 + conf.logLevel = logging.WARNING +- elif opt == "-s": +- session_name = param + elif opt == "-c": + STARTUP_FILE = param + elif opt == "-C": +@@ -798,7 +649,7 @@ def interact(mydict=None, argv=None, mybanner=None, loglevel=logging.INFO): + default=DEFAULT_PRESTART, + ) + +- SESSION = init_session(session_name, mydict=mydict, ret=True) ++ SESSION = init_session(mydict=mydict, ret=True) + + if STARTUP_FILE: + _read_config_file( +@@ -1018,9 +869,6 @@ def interact(mydict=None, argv=None, mybanner=None, loglevel=logging.INFO): + else: + raise ValueError("Invalid conf.interactive_shell") + +- if conf.session: +- save_session(conf.session, SESSION) +- + + if __name__ == "__main__": + interact() +diff --git a/test/regression.uts b/test/regression.uts +index 67cd2870..ea01eb2d 100644 +--- a/test/regression.uts ++++ b/test/regression.uts +@@ -622,72 +622,6 @@ try: + except SystemExit: + assert True + +-= Session test +- +-import builtins +- +-# This is automatic when using the console +-def get_var(var): +- return builtins.__dict__["scapy_session"][var] +- +-def set_var(var, value): +- builtins.__dict__["scapy_session"][var] = value +- +-def del_var(var): +- del builtins.__dict__["scapy_session"][var] +- +-init_session(None, {"init_value": 123}) +-set_var("test_value", "8.8.8.8") # test_value = "8.8.8.8" +-save_session() +-del_var("test_value") +-load_session() +-update_session() +-assert get_var("test_value") == "8.8.8.8" #test_value == "8.8.8.8" +-assert get_var("init_value") == 123 +- +-= Session test with fname +- +-session_name = tempfile.mktemp() +-init_session(session_name) +-set_var("test_value", IP(dst="192.168.0.1")) # test_value = IP(dst="192.168.0.1") +-save_session(fname="%s.dat" % session_name) +-del_var("test_value") +- +-set_var("z", True) #z = True +-load_session(fname="%s.dat" % session_name) +-try: +- get_var("z") +- assert False +-except: +- pass +- +-set_var("z", False) #z = False +-update_session(fname="%s.dat" % session_name) +-assert get_var("test_value").dst == "192.168.0.1" #test_value.dst == "192.168.0.1" +-assert not get_var("z") +- +-= Clear session files +- +-os.remove("%s.dat" % session_name) +- +-= Test temporary file creation +-~ ci_only +- +-scapy_delete_temp_files() +- +-tmpfile = get_temp_file(autoext=".ut") +-tmpfile +-if WINDOWS: +- assert "scapy" in tmpfile and tmpfile.lower().startswith('c:\\users\\appveyor\\appdata\\local\\temp') +-else: +- import platform +- BYPASS_TMP = platform.python_implementation().lower() == "pypy" or DARWIN +- assert "scapy" in tmpfile and (BYPASS_TMP == True or "/tmp/" in tmpfile) +- +-assert conf.temp_files[0].endswith(".ut") +-scapy_delete_temp_files() +-assert len(conf.temp_files) == 0 +- + = Emulate interact() + ~ interact + +@@ -2186,6 +2120,7 @@ p.show() + + = Variable creations + from io import BytesIO ++import base64 + pcapfile = BytesIO(b'\xd4\xc3\xb2\xa1\x02\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00e\x00\x00\x00\xcf\xc5\xacVo*\n\x00(\x00\x00\x00(\x00\x00\x00E\x00\x00(\x00\x01\x00\x00@\x06|\xcd\x7f\x00\x00\x01\x7f\x00\x00\x01\x00\x14\x00P\x00\x00\x00\x00\x00\x00\x00\x00P\x02 \x00\x91|\x00\x00\xcf\xc5\xacV_-\n\x00\x1c\x00\x00\x00\x1c\x00\x00\x00E\x00\x00\x1c\x00\x01\x00\x00@\x11|\xce\x7f\x00\x00\x01\x7f\x00\x00\x01\x005\x005\x00\x08\x01r\xcf\xc5\xacV\xf90\n\x00\x1c\x00\x00\x00\x1c\x00\x00\x00E\x00\x00\x1c\x00\x01\x00\x00@\x01|\xde\x7f\x00\x00\x01\x7f\x00\x00\x01\x08\x00\xf7\xff\x00\x00\x00\x00') + pcapngfile = BytesIO(b'\n\r\r\n\\\x00\x00\x00M<+\x1a\x01\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00,\x00File created by merging: \nFile1: test.pcap \n\x04\x00\x08\x00mergecap\x00\x00\x00\x00\\\x00\x00\x00\x01\x00\x00\x00\\\x00\x00\x00e\x00\x00\x00\xff\xff\x00\x00\x02\x006\x00Unknown/not available in original file format(libpcap)\x00\x00\t\x00\x01\x00\x06\x00\x00\x00\x00\x00\x00\x00\\\x00\x00\x00\x06\x00\x00\x00H\x00\x00\x00\x00\x00\x00\x00\x8d*\x05\x00/\xfc[\xcd(\x00\x00\x00(\x00\x00\x00E\x00\x00(\x00\x01\x00\x00@\x06|\xcd\x7f\x00\x00\x01\x7f\x00\x00\x01\x00\x14\x00P\x00\x00\x00\x00\x00\x00\x00\x00P\x02 \x00\x91|\x00\x00H\x00\x00\x00\x06\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00\x8d*\x05\x00\x1f\xff[\xcd\x1c\x00\x00\x00\x1c\x00\x00\x00E\x00\x00\x1c\x00\x01\x00\x00@\x11|\xce\x7f\x00\x00\x01\x7f\x00\x00\x01\x005\x005\x00\x08\x01r<\x00\x00\x00\x06\x00\x00\x00<\x00\x00\x00\x00\x00\x00\x00\x8d*\x05\x00\xb9\x02\\\xcd\x1c\x00\x00\x00\x1c\x00\x00\x00E\x00\x00\x1c\x00\x01\x00\x00@\x01|\xde\x7f\x00\x00\x01\x7f\x00\x00\x01\x08\x00\xf7\xff\x00\x00\x00\x00<\x00\x00\x00') + pcapnanofile = BytesIO(b"M<\xb2\xa1\x02\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00e\x00\x00\x00\xcf\xc5\xacV\xc9\xc1\xb5'(\x00\x00\x00(\x00\x00\x00E\x00\x00(\x00\x01\x00\x00@\x06|\xcd\x7f\x00\x00\x01\x7f\x00\x00\x01\x00\x14\x00P\x00\x00\x00\x00\x00\x00\x00\x00P\x02 \x00\x91|\x00\x00\xcf\xc5\xacV-;\xc1'\x1c\x00\x00\x00\x1c\x00\x00\x00E\x00\x00\x1c\x00\x01\x00\x00@\x11|\xce\x7f\x00\x00\x01\x7f\x00\x00\x01\x005\x005\x00\x08\x01r\xcf\xc5\xacV\x9aL\xcf'\x1c\x00\x00\x00\x1c\x00\x00\x00E\x00\x00\x1c\x00\x01\x00\x00@\x01|\xde\x7f\x00\x00\x01\x7f\x00\x00\x01\x08\x00\xf7\xff\x00\x00\x00\x00") diff --git a/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb b/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb index 8dcca1f..8cc4002 100644 --- a/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb +++ b/meta-networking/recipes-devtools/python/python3-scapy_2.6.1.bb @@ -20,6 +20,7 @@ SRCREV = "8e08cbf759de6709a5b4af6bea3655d293129bb4" SRC_URI = "git://github.com/secdev/scapy.git;branch=master;protocol=https;tag=v${PV} \ file://0001-python3-scapy-skip-ICMP-regression-tests-in-ptest.patch \ file://CVE-2026-128237_CVE-2026-128238.patch \ + file://CVE-2025-71463.patch \ file://run-ptest" UPSTREAM_CHECK_COMMITS = "1"