From patchwork Tue Nov 25 20:54:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 75377 X-Patchwork-Delegate: steve@sakoman.com 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 F133FD0EE1C for ; Tue, 25 Nov 2025 20:55:09 +0000 (UTC) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.4182.1764104102837158080 for ; Tue, 25 Nov 2025 12:55:02 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=eFDVyT06; spf=softfail (domain: sakoman.com, ip: 209.85.210.182, mailfrom: steve@sakoman.com) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-7b852bb31d9so6841442b3a.0 for ; Tue, 25 Nov 2025 12:55:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1764104102; x=1764708902; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=5lSq44lIqKxDrTuHacwNV2IQTWdF4UXiexpClWLgpNA=; b=eFDVyT06IsGDza2Jp+uWNlOo9i7f9R9Jik+gJrskSqFd262IJCU4rfqO+qK3QYU3Kh /QHwcu5/IbVzU27K1qvUwbQ2JvyAlkkeMoJxetzOOccdeOWhEM1CrsjrV2jRJ2sVKyF7 5gX7hGfcJDUHdoQtZ0oQX/cdwetuNH0dU0OkLmR3101CtEu8gJtRraDqBSNWBsmOZpmv kBYnNQLhjZAUSlGgutQIPovbEqkKh7AmqMcxeycyeY22FQVhWv4XRuP/1oTxgXUjBsHo JTaBQ9bzZqJj+e8C5oyHyIZI3qNQQb11HrH8ag/ZTFaS+wgad9JnzerU3T3ZLOILBvka PO0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764104102; x=1764708902; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=5lSq44lIqKxDrTuHacwNV2IQTWdF4UXiexpClWLgpNA=; b=JCOa92oHyGuTfHkGxs7E+xzhDHiEh8L9nuuiV4xtGxwn4hWaWIw18UpEreLIANYy2a oLigwSIK2imVJNEpGcLoFQBr9UcKtO1J/J0HDDHlJw+LX73KWVlmp9yymEVQAMLzvpVy B/5QE6Rw15CxOac6qUYnukf9dl/aOqUgNJNQjJhdI4dTtnNU+4Gb9iHYqKaUtPNB/si1 0g9Ib6hMqwOCHhoj94w1sSjK/ndTNCUfPU9N1UTnAMRd1Gung+6pTFPsHbWFZyPqW8ms SPdRKY37qEcN/0sRaaZUI8a4ELmgrR9NKhkHM30IXMBrtzvHxBIzvc2wNCFw1U9sKLXe Q3PA== X-Gm-Message-State: AOJu0Yw/JZh362EUa2YAGFsZuzKqDblbZI5dl45MCo3c3M26h/5yVPX7 Nhve8bl53K12Gop48x8kqQuGt4Ct+QWHLmwHjuMC4lLb9djznfYqGfGwZvT5AEwy/ayftoNwUxA gKs+A X-Gm-Gg: ASbGncuNtvevfmxol1k/k4+HGkazuqr+bofP8BbhXHDVMcWVq6A4IjTOZSTgvJFJLBc FTyDn81qytZL8uwBnjZ2RvsLZ+7rBNXMs1hKJNI55S6N4IYuIDJMhnNJOrCfvMnyc2Z02z5Pu1n ltUEN5Ntj+N1Lk2P66Gxj98KuvZ0UFjLvLfDmC03GovzLaCpGy0F2lA+QXjbZW71KgGgF43oPet GRRsEiFLe+yczO6WAIkvOc/pdgRRPkJSpfzvJ3YTMg0sFuEPTSUpfXhXh8SRs/g6fSD3Oo204sl F1fpyVd55jBWqXUqFGgag2bextJPNz4IPS0Pi4tuVafT9yn/gJ0tWglDq5mQgxypBakBNZQGcmn 5V4XVNRj1JIsfiUT8Cj5yjvFAgLXsVSiQVWWJGtkH4ku1XBxa3TrT481gx2cVOov9WVm7nDAZz1 OGmQ== X-Google-Smtp-Source: AGHT+IEyMCwnMXJkiY6tVmbwa26icT4/HzlUSa7ywWPLdzllhbf1W1NAMAjm7mF1E9G0BYGup7ls0w== X-Received: by 2002:a05:6a20:7f8e:b0:355:1add:c298 with SMTP id adf61e73a8af0-36150e8f01bmr18681055637.21.1764104101095; Tue, 25 Nov 2025 12:55:01 -0800 (PST) Received: from hexa.. ([2602:feb4:3b:2100:5e34:462b:e2f0:5898]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3476a5a3099sm322602a91.11.2025.11.25.12.55.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 12:55:00 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 1/9] python3-idna: Fix CVE-2024-3651 Date: Tue, 25 Nov 2025 12:54:44 -0800 Message-ID: <7359d3cdf2210e81a26d8712769f7e23bfbc1bb7.1764103986.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 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 ; Tue, 25 Nov 2025 20:55:09 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/226776 From: Vijay Anusuri import patch from debian to fix CVE-2024-3651 Upstream-Status: Backport [import from debian 3.3-1+deb12u1 Upstream commit https://github.com/kjd/idna/commit/5beb28b9dd77912c0dd656d8b0fdba3eb80222e7] Signed-off-by: Vijay Anusuri Signed-off-by: Steve Sakoman --- .../python/python3-idna/CVE-2024-3651.patch | 2484 +++++++++++++++++ .../python/python3-idna_3.3.bb | 2 + 2 files changed, 2486 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-idna/CVE-2024-3651.patch diff --git a/meta/recipes-devtools/python/python3-idna/CVE-2024-3651.patch b/meta/recipes-devtools/python/python3-idna/CVE-2024-3651.patch new file mode 100644 index 0000000000..c96e13b35b --- /dev/null +++ b/meta/recipes-devtools/python/python3-idna/CVE-2024-3651.patch @@ -0,0 +1,2484 @@ +From: Kim Davies +Date: Mon, 1 Apr 2024 20:24:57 -0700 +Subject: More efficient resolution of joiner contexts + +In some pathological cases, this would out eligibility under +CONTEXTJ rules much faster. + +Generated idna/idnadata.py (and idna/uts46data.py) files were updated +with `tools/idna-data --dir idna --no-cache --version 14.0.0 make-libdata`. + +Origin: https://github.com/kjd/idna/commit/5beb28b9dd77912c0dd656d8b0fdba3eb80222e7 +Bug: https://github.com/kjd/idna/security/advisories/GHSA-jjg7-2v4v-x38h +Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2274779 +Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2024-3651 +Bug-Debian: https://bugs.debian.org/1069127 + +Upstream-Status: Backport [import from debian 3.3-1+deb12u1 +Upstream commit https://github.com/kjd/idna/commit/5beb28b9dd77912c0dd656d8b0fdba3eb80222e7] +CVE: CVE-2024-3651 +Signed-off-by: Vijay Anusuri +--- + idna/core.py | 16 +- + idna/idnadata.py | 2162 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- + tools/idna-data | 13 +- + 3 files changed, 2124 insertions(+), 67 deletions(-) + +diff --git a/idna/core.py b/idna/core.py +index 55ab967..c6aa30a 100644 +--- a/idna/core.py ++++ b/idna/core.py +@@ -150,9 +150,11 @@ def valid_contextj(label: str, pos: int) -> bool: + joining_type = idnadata.joining_types.get(ord(label[i])) + if joining_type == ord('T'): + continue +- if joining_type in [ord('L'), ord('D')]: ++ elif joining_type in [ord('L'), ord('D')]: + ok = True + break ++ else: ++ break + + if not ok: + return False +@@ -162,9 +164,11 @@ def valid_contextj(label: str, pos: int) -> bool: + joining_type = idnadata.joining_types.get(ord(label[i])) + if joining_type == ord('T'): + continue +- if joining_type in [ord('R'), ord('D')]: ++ elif joining_type in [ord('R'), ord('D')]: + ok = True + break ++ else: ++ break + return ok + + if cp_value == 0x200d: +@@ -236,12 +240,8 @@ def check_label(label: Union[str, bytes, bytearray]) -> None: + if intranges_contain(cp_value, idnadata.codepoint_classes['PVALID']): + continue + elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTJ']): +- try: +- if not valid_contextj(label, pos): +- raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format( +- _unot(cp_value), pos+1, repr(label))) +- except ValueError: +- raise IDNAError('Unknown codepoint adjacent to joiner {} at position {} in {}'.format( ++ if not valid_contextj(label, pos): ++ raise InvalidCodepointContext('Joiner {} not allowed at position {} in {}'.format( + _unot(cp_value), pos+1, repr(label))) + elif intranges_contain(cp_value, idnadata.codepoint_classes['CONTEXTO']): + if not valid_contexto(label, pos): +diff --git a/idna/idnadata.py b/idna/idnadata.py +index 1b5805d..ab77625 100644 +--- a/idna/idnadata.py ++++ b/idna/idnadata.py +@@ -97,16 +97,190 @@ scripts = { + ), + } + joining_types = { +- 0x600: 85, +- 0x601: 85, +- 0x602: 85, +- 0x603: 85, +- 0x604: 85, +- 0x605: 85, +- 0x608: 85, +- 0x60b: 85, ++ 0xad: 84, ++ 0x300: 84, ++ 0x301: 84, ++ 0x302: 84, ++ 0x303: 84, ++ 0x304: 84, ++ 0x305: 84, ++ 0x306: 84, ++ 0x307: 84, ++ 0x308: 84, ++ 0x309: 84, ++ 0x30a: 84, ++ 0x30b: 84, ++ 0x30c: 84, ++ 0x30d: 84, ++ 0x30e: 84, ++ 0x30f: 84, ++ 0x310: 84, ++ 0x311: 84, ++ 0x312: 84, ++ 0x313: 84, ++ 0x314: 84, ++ 0x315: 84, ++ 0x316: 84, ++ 0x317: 84, ++ 0x318: 84, ++ 0x319: 84, ++ 0x31a: 84, ++ 0x31b: 84, ++ 0x31c: 84, ++ 0x31d: 84, ++ 0x31e: 84, ++ 0x31f: 84, ++ 0x320: 84, ++ 0x321: 84, ++ 0x322: 84, ++ 0x323: 84, ++ 0x324: 84, ++ 0x325: 84, ++ 0x326: 84, ++ 0x327: 84, ++ 0x328: 84, ++ 0x329: 84, ++ 0x32a: 84, ++ 0x32b: 84, ++ 0x32c: 84, ++ 0x32d: 84, ++ 0x32e: 84, ++ 0x32f: 84, ++ 0x330: 84, ++ 0x331: 84, ++ 0x332: 84, ++ 0x333: 84, ++ 0x334: 84, ++ 0x335: 84, ++ 0x336: 84, ++ 0x337: 84, ++ 0x338: 84, ++ 0x339: 84, ++ 0x33a: 84, ++ 0x33b: 84, ++ 0x33c: 84, ++ 0x33d: 84, ++ 0x33e: 84, ++ 0x33f: 84, ++ 0x340: 84, ++ 0x341: 84, ++ 0x342: 84, ++ 0x343: 84, ++ 0x344: 84, ++ 0x345: 84, ++ 0x346: 84, ++ 0x347: 84, ++ 0x348: 84, ++ 0x349: 84, ++ 0x34a: 84, ++ 0x34b: 84, ++ 0x34c: 84, ++ 0x34d: 84, ++ 0x34e: 84, ++ 0x34f: 84, ++ 0x350: 84, ++ 0x351: 84, ++ 0x352: 84, ++ 0x353: 84, ++ 0x354: 84, ++ 0x355: 84, ++ 0x356: 84, ++ 0x357: 84, ++ 0x358: 84, ++ 0x359: 84, ++ 0x35a: 84, ++ 0x35b: 84, ++ 0x35c: 84, ++ 0x35d: 84, ++ 0x35e: 84, ++ 0x35f: 84, ++ 0x360: 84, ++ 0x361: 84, ++ 0x362: 84, ++ 0x363: 84, ++ 0x364: 84, ++ 0x365: 84, ++ 0x366: 84, ++ 0x367: 84, ++ 0x368: 84, ++ 0x369: 84, ++ 0x36a: 84, ++ 0x36b: 84, ++ 0x36c: 84, ++ 0x36d: 84, ++ 0x36e: 84, ++ 0x36f: 84, ++ 0x483: 84, ++ 0x484: 84, ++ 0x485: 84, ++ 0x486: 84, ++ 0x487: 84, ++ 0x488: 84, ++ 0x489: 84, ++ 0x591: 84, ++ 0x592: 84, ++ 0x593: 84, ++ 0x594: 84, ++ 0x595: 84, ++ 0x596: 84, ++ 0x597: 84, ++ 0x598: 84, ++ 0x599: 84, ++ 0x59a: 84, ++ 0x59b: 84, ++ 0x59c: 84, ++ 0x59d: 84, ++ 0x59e: 84, ++ 0x59f: 84, ++ 0x5a0: 84, ++ 0x5a1: 84, ++ 0x5a2: 84, ++ 0x5a3: 84, ++ 0x5a4: 84, ++ 0x5a5: 84, ++ 0x5a6: 84, ++ 0x5a7: 84, ++ 0x5a8: 84, ++ 0x5a9: 84, ++ 0x5aa: 84, ++ 0x5ab: 84, ++ 0x5ac: 84, ++ 0x5ad: 84, ++ 0x5ae: 84, ++ 0x5af: 84, ++ 0x5b0: 84, ++ 0x5b1: 84, ++ 0x5b2: 84, ++ 0x5b3: 84, ++ 0x5b4: 84, ++ 0x5b5: 84, ++ 0x5b6: 84, ++ 0x5b7: 84, ++ 0x5b8: 84, ++ 0x5b9: 84, ++ 0x5ba: 84, ++ 0x5bb: 84, ++ 0x5bc: 84, ++ 0x5bd: 84, ++ 0x5bf: 84, ++ 0x5c1: 84, ++ 0x5c2: 84, ++ 0x5c4: 84, ++ 0x5c5: 84, ++ 0x5c7: 84, ++ 0x610: 84, ++ 0x611: 84, ++ 0x612: 84, ++ 0x613: 84, ++ 0x614: 84, ++ 0x615: 84, ++ 0x616: 84, ++ 0x617: 84, ++ 0x618: 84, ++ 0x619: 84, ++ 0x61a: 84, ++ 0x61c: 84, + 0x620: 68, +- 0x621: 85, + 0x622: 82, + 0x623: 82, + 0x624: 82, +@@ -148,12 +322,33 @@ joining_types = { + 0x648: 82, + 0x649: 68, + 0x64a: 68, ++ 0x64b: 84, ++ 0x64c: 84, ++ 0x64d: 84, ++ 0x64e: 84, ++ 0x64f: 84, ++ 0x650: 84, ++ 0x651: 84, ++ 0x652: 84, ++ 0x653: 84, ++ 0x654: 84, ++ 0x655: 84, ++ 0x656: 84, ++ 0x657: 84, ++ 0x658: 84, ++ 0x659: 84, ++ 0x65a: 84, ++ 0x65b: 84, ++ 0x65c: 84, ++ 0x65d: 84, ++ 0x65e: 84, ++ 0x65f: 84, + 0x66e: 68, + 0x66f: 68, ++ 0x670: 84, + 0x671: 82, + 0x672: 82, + 0x673: 82, +- 0x674: 85, + 0x675: 82, + 0x676: 82, + 0x677: 82, +@@ -250,7 +445,25 @@ joining_types = { + 0x6d2: 82, + 0x6d3: 82, + 0x6d5: 82, +- 0x6dd: 85, ++ 0x6d6: 84, ++ 0x6d7: 84, ++ 0x6d8: 84, ++ 0x6d9: 84, ++ 0x6da: 84, ++ 0x6db: 84, ++ 0x6dc: 84, ++ 0x6df: 84, ++ 0x6e0: 84, ++ 0x6e1: 84, ++ 0x6e2: 84, ++ 0x6e3: 84, ++ 0x6e4: 84, ++ 0x6e7: 84, ++ 0x6e8: 84, ++ 0x6ea: 84, ++ 0x6eb: 84, ++ 0x6ec: 84, ++ 0x6ed: 84, + 0x6ee: 82, + 0x6ef: 82, + 0x6fa: 68, +@@ -259,6 +472,7 @@ joining_types = { + 0x6ff: 68, + 0x70f: 84, + 0x710: 82, ++ 0x711: 84, + 0x712: 68, + 0x713: 68, + 0x714: 68, +@@ -289,6 +503,33 @@ joining_types = { + 0x72d: 68, + 0x72e: 68, + 0x72f: 82, ++ 0x730: 84, ++ 0x731: 84, ++ 0x732: 84, ++ 0x733: 84, ++ 0x734: 84, ++ 0x735: 84, ++ 0x736: 84, ++ 0x737: 84, ++ 0x738: 84, ++ 0x739: 84, ++ 0x73a: 84, ++ 0x73b: 84, ++ 0x73c: 84, ++ 0x73d: 84, ++ 0x73e: 84, ++ 0x73f: 84, ++ 0x740: 84, ++ 0x741: 84, ++ 0x742: 84, ++ 0x743: 84, ++ 0x744: 84, ++ 0x745: 84, ++ 0x746: 84, ++ 0x747: 84, ++ 0x748: 84, ++ 0x749: 84, ++ 0x74a: 84, + 0x74d: 82, + 0x74e: 68, + 0x74f: 68, +@@ -340,6 +581,17 @@ joining_types = { + 0x77d: 68, + 0x77e: 68, + 0x77f: 68, ++ 0x7a6: 84, ++ 0x7a7: 84, ++ 0x7a8: 84, ++ 0x7a9: 84, ++ 0x7aa: 84, ++ 0x7ab: 84, ++ 0x7ac: 84, ++ 0x7ad: 84, ++ 0x7ae: 84, ++ 0x7af: 84, ++ 0x7b0: 84, + 0x7ca: 68, + 0x7cb: 68, + 0x7cc: 68, +@@ -373,7 +625,38 @@ joining_types = { + 0x7e8: 68, + 0x7e9: 68, + 0x7ea: 68, ++ 0x7eb: 84, ++ 0x7ec: 84, ++ 0x7ed: 84, ++ 0x7ee: 84, ++ 0x7ef: 84, ++ 0x7f0: 84, ++ 0x7f1: 84, ++ 0x7f2: 84, ++ 0x7f3: 84, + 0x7fa: 67, ++ 0x7fd: 84, ++ 0x816: 84, ++ 0x817: 84, ++ 0x818: 84, ++ 0x819: 84, ++ 0x81b: 84, ++ 0x81c: 84, ++ 0x81d: 84, ++ 0x81e: 84, ++ 0x81f: 84, ++ 0x820: 84, ++ 0x821: 84, ++ 0x822: 84, ++ 0x823: 84, ++ 0x825: 84, ++ 0x826: 84, ++ 0x827: 84, ++ 0x829: 84, ++ 0x82a: 84, ++ 0x82b: 84, ++ 0x82c: 84, ++ 0x82d: 84, + 0x840: 82, + 0x841: 68, + 0x842: 68, +@@ -399,13 +682,14 @@ joining_types = { + 0x856: 82, + 0x857: 82, + 0x858: 82, ++ 0x859: 84, ++ 0x85a: 84, ++ 0x85b: 84, + 0x860: 68, +- 0x861: 85, + 0x862: 68, + 0x863: 68, + 0x864: 68, + 0x865: 68, +- 0x866: 85, + 0x867: 82, + 0x868: 68, + 0x869: 82, +@@ -433,16 +717,20 @@ joining_types = { + 0x884: 67, + 0x885: 67, + 0x886: 68, +- 0x887: 85, +- 0x888: 85, + 0x889: 68, + 0x88a: 68, + 0x88b: 68, + 0x88c: 68, + 0x88d: 68, + 0x88e: 82, +- 0x890: 85, +- 0x891: 85, ++ 0x898: 84, ++ 0x899: 84, ++ 0x89a: 84, ++ 0x89b: 84, ++ 0x89c: 84, ++ 0x89d: 84, ++ 0x89e: 84, ++ 0x89f: 84, + 0x8a0: 68, + 0x8a1: 68, + 0x8a2: 68, +@@ -456,7 +744,6 @@ joining_types = { + 0x8aa: 82, + 0x8ab: 82, + 0x8ac: 82, +- 0x8ad: 85, + 0x8ae: 82, + 0x8af: 68, + 0x8b0: 68, +@@ -484,11 +771,356 @@ joining_types = { + 0x8c6: 68, + 0x8c7: 68, + 0x8c8: 68, +- 0x8e2: 85, +- 0x1806: 85, ++ 0x8ca: 84, ++ 0x8cb: 84, ++ 0x8cc: 84, ++ 0x8cd: 84, ++ 0x8ce: 84, ++ 0x8cf: 84, ++ 0x8d0: 84, ++ 0x8d1: 84, ++ 0x8d2: 84, ++ 0x8d3: 84, ++ 0x8d4: 84, ++ 0x8d5: 84, ++ 0x8d6: 84, ++ 0x8d7: 84, ++ 0x8d8: 84, ++ 0x8d9: 84, ++ 0x8da: 84, ++ 0x8db: 84, ++ 0x8dc: 84, ++ 0x8dd: 84, ++ 0x8de: 84, ++ 0x8df: 84, ++ 0x8e0: 84, ++ 0x8e1: 84, ++ 0x8e3: 84, ++ 0x8e4: 84, ++ 0x8e5: 84, ++ 0x8e6: 84, ++ 0x8e7: 84, ++ 0x8e8: 84, ++ 0x8e9: 84, ++ 0x8ea: 84, ++ 0x8eb: 84, ++ 0x8ec: 84, ++ 0x8ed: 84, ++ 0x8ee: 84, ++ 0x8ef: 84, ++ 0x8f0: 84, ++ 0x8f1: 84, ++ 0x8f2: 84, ++ 0x8f3: 84, ++ 0x8f4: 84, ++ 0x8f5: 84, ++ 0x8f6: 84, ++ 0x8f7: 84, ++ 0x8f8: 84, ++ 0x8f9: 84, ++ 0x8fa: 84, ++ 0x8fb: 84, ++ 0x8fc: 84, ++ 0x8fd: 84, ++ 0x8fe: 84, ++ 0x8ff: 84, ++ 0x900: 84, ++ 0x901: 84, ++ 0x902: 84, ++ 0x93a: 84, ++ 0x93c: 84, ++ 0x941: 84, ++ 0x942: 84, ++ 0x943: 84, ++ 0x944: 84, ++ 0x945: 84, ++ 0x946: 84, ++ 0x947: 84, ++ 0x948: 84, ++ 0x94d: 84, ++ 0x951: 84, ++ 0x952: 84, ++ 0x953: 84, ++ 0x954: 84, ++ 0x955: 84, ++ 0x956: 84, ++ 0x957: 84, ++ 0x962: 84, ++ 0x963: 84, ++ 0x981: 84, ++ 0x9bc: 84, ++ 0x9c1: 84, ++ 0x9c2: 84, ++ 0x9c3: 84, ++ 0x9c4: 84, ++ 0x9cd: 84, ++ 0x9e2: 84, ++ 0x9e3: 84, ++ 0x9fe: 84, ++ 0xa01: 84, ++ 0xa02: 84, ++ 0xa3c: 84, ++ 0xa41: 84, ++ 0xa42: 84, ++ 0xa47: 84, ++ 0xa48: 84, ++ 0xa4b: 84, ++ 0xa4c: 84, ++ 0xa4d: 84, ++ 0xa51: 84, ++ 0xa70: 84, ++ 0xa71: 84, ++ 0xa75: 84, ++ 0xa81: 84, ++ 0xa82: 84, ++ 0xabc: 84, ++ 0xac1: 84, ++ 0xac2: 84, ++ 0xac3: 84, ++ 0xac4: 84, ++ 0xac5: 84, ++ 0xac7: 84, ++ 0xac8: 84, ++ 0xacd: 84, ++ 0xae2: 84, ++ 0xae3: 84, ++ 0xafa: 84, ++ 0xafb: 84, ++ 0xafc: 84, ++ 0xafd: 84, ++ 0xafe: 84, ++ 0xaff: 84, ++ 0xb01: 84, ++ 0xb3c: 84, ++ 0xb3f: 84, ++ 0xb41: 84, ++ 0xb42: 84, ++ 0xb43: 84, ++ 0xb44: 84, ++ 0xb4d: 84, ++ 0xb55: 84, ++ 0xb56: 84, ++ 0xb62: 84, ++ 0xb63: 84, ++ 0xb82: 84, ++ 0xbc0: 84, ++ 0xbcd: 84, ++ 0xc00: 84, ++ 0xc04: 84, ++ 0xc3c: 84, ++ 0xc3e: 84, ++ 0xc3f: 84, ++ 0xc40: 84, ++ 0xc46: 84, ++ 0xc47: 84, ++ 0xc48: 84, ++ 0xc4a: 84, ++ 0xc4b: 84, ++ 0xc4c: 84, ++ 0xc4d: 84, ++ 0xc55: 84, ++ 0xc56: 84, ++ 0xc62: 84, ++ 0xc63: 84, ++ 0xc81: 84, ++ 0xcbc: 84, ++ 0xcbf: 84, ++ 0xcc6: 84, ++ 0xccc: 84, ++ 0xccd: 84, ++ 0xce2: 84, ++ 0xce3: 84, ++ 0xd00: 84, ++ 0xd01: 84, ++ 0xd3b: 84, ++ 0xd3c: 84, ++ 0xd41: 84, ++ 0xd42: 84, ++ 0xd43: 84, ++ 0xd44: 84, ++ 0xd4d: 84, ++ 0xd62: 84, ++ 0xd63: 84, ++ 0xd81: 84, ++ 0xdca: 84, ++ 0xdd2: 84, ++ 0xdd3: 84, ++ 0xdd4: 84, ++ 0xdd6: 84, ++ 0xe31: 84, ++ 0xe34: 84, ++ 0xe35: 84, ++ 0xe36: 84, ++ 0xe37: 84, ++ 0xe38: 84, ++ 0xe39: 84, ++ 0xe3a: 84, ++ 0xe47: 84, ++ 0xe48: 84, ++ 0xe49: 84, ++ 0xe4a: 84, ++ 0xe4b: 84, ++ 0xe4c: 84, ++ 0xe4d: 84, ++ 0xe4e: 84, ++ 0xeb1: 84, ++ 0xeb4: 84, ++ 0xeb5: 84, ++ 0xeb6: 84, ++ 0xeb7: 84, ++ 0xeb8: 84, ++ 0xeb9: 84, ++ 0xeba: 84, ++ 0xebb: 84, ++ 0xebc: 84, ++ 0xec8: 84, ++ 0xec9: 84, ++ 0xeca: 84, ++ 0xecb: 84, ++ 0xecc: 84, ++ 0xecd: 84, ++ 0xf18: 84, ++ 0xf19: 84, ++ 0xf35: 84, ++ 0xf37: 84, ++ 0xf39: 84, ++ 0xf71: 84, ++ 0xf72: 84, ++ 0xf73: 84, ++ 0xf74: 84, ++ 0xf75: 84, ++ 0xf76: 84, ++ 0xf77: 84, ++ 0xf78: 84, ++ 0xf79: 84, ++ 0xf7a: 84, ++ 0xf7b: 84, ++ 0xf7c: 84, ++ 0xf7d: 84, ++ 0xf7e: 84, ++ 0xf80: 84, ++ 0xf81: 84, ++ 0xf82: 84, ++ 0xf83: 84, ++ 0xf84: 84, ++ 0xf86: 84, ++ 0xf87: 84, ++ 0xf8d: 84, ++ 0xf8e: 84, ++ 0xf8f: 84, ++ 0xf90: 84, ++ 0xf91: 84, ++ 0xf92: 84, ++ 0xf93: 84, ++ 0xf94: 84, ++ 0xf95: 84, ++ 0xf96: 84, ++ 0xf97: 84, ++ 0xf99: 84, ++ 0xf9a: 84, ++ 0xf9b: 84, ++ 0xf9c: 84, ++ 0xf9d: 84, ++ 0xf9e: 84, ++ 0xf9f: 84, ++ 0xfa0: 84, ++ 0xfa1: 84, ++ 0xfa2: 84, ++ 0xfa3: 84, ++ 0xfa4: 84, ++ 0xfa5: 84, ++ 0xfa6: 84, ++ 0xfa7: 84, ++ 0xfa8: 84, ++ 0xfa9: 84, ++ 0xfaa: 84, ++ 0xfab: 84, ++ 0xfac: 84, ++ 0xfad: 84, ++ 0xfae: 84, ++ 0xfaf: 84, ++ 0xfb0: 84, ++ 0xfb1: 84, ++ 0xfb2: 84, ++ 0xfb3: 84, ++ 0xfb4: 84, ++ 0xfb5: 84, ++ 0xfb6: 84, ++ 0xfb7: 84, ++ 0xfb8: 84, ++ 0xfb9: 84, ++ 0xfba: 84, ++ 0xfbb: 84, ++ 0xfbc: 84, ++ 0xfc6: 84, ++ 0x102d: 84, ++ 0x102e: 84, ++ 0x102f: 84, ++ 0x1030: 84, ++ 0x1032: 84, ++ 0x1033: 84, ++ 0x1034: 84, ++ 0x1035: 84, ++ 0x1036: 84, ++ 0x1037: 84, ++ 0x1039: 84, ++ 0x103a: 84, ++ 0x103d: 84, ++ 0x103e: 84, ++ 0x1058: 84, ++ 0x1059: 84, ++ 0x105e: 84, ++ 0x105f: 84, ++ 0x1060: 84, ++ 0x1071: 84, ++ 0x1072: 84, ++ 0x1073: 84, ++ 0x1074: 84, ++ 0x1082: 84, ++ 0x1085: 84, ++ 0x1086: 84, ++ 0x108d: 84, ++ 0x109d: 84, ++ 0x135d: 84, ++ 0x135e: 84, ++ 0x135f: 84, ++ 0x1712: 84, ++ 0x1713: 84, ++ 0x1714: 84, ++ 0x1732: 84, ++ 0x1733: 84, ++ 0x1752: 84, ++ 0x1753: 84, ++ 0x1772: 84, ++ 0x1773: 84, ++ 0x17b4: 84, ++ 0x17b5: 84, ++ 0x17b7: 84, ++ 0x17b8: 84, ++ 0x17b9: 84, ++ 0x17ba: 84, ++ 0x17bb: 84, ++ 0x17bc: 84, ++ 0x17bd: 84, ++ 0x17c6: 84, ++ 0x17c9: 84, ++ 0x17ca: 84, ++ 0x17cb: 84, ++ 0x17cc: 84, ++ 0x17cd: 84, ++ 0x17ce: 84, ++ 0x17cf: 84, ++ 0x17d0: 84, ++ 0x17d1: 84, ++ 0x17d2: 84, ++ 0x17d3: 84, ++ 0x17dd: 84, + 0x1807: 68, + 0x180a: 67, +- 0x180e: 85, ++ 0x180b: 84, ++ 0x180c: 84, ++ 0x180d: 84, ++ 0x180f: 84, + 0x1820: 68, + 0x1821: 68, + 0x1822: 68, +@@ -578,11 +1210,6 @@ joining_types = { + 0x1876: 68, + 0x1877: 68, + 0x1878: 68, +- 0x1880: 85, +- 0x1881: 85, +- 0x1882: 85, +- 0x1883: 85, +- 0x1884: 85, + 0x1885: 84, + 0x1886: 84, + 0x1887: 68, +@@ -619,14 +1246,339 @@ joining_types = { + 0x18a6: 68, + 0x18a7: 68, + 0x18a8: 68, ++ 0x18a9: 84, + 0x18aa: 68, +- 0x200c: 85, ++ 0x1920: 84, ++ 0x1921: 84, ++ 0x1922: 84, ++ 0x1927: 84, ++ 0x1928: 84, ++ 0x1932: 84, ++ 0x1939: 84, ++ 0x193a: 84, ++ 0x193b: 84, ++ 0x1a17: 84, ++ 0x1a18: 84, ++ 0x1a1b: 84, ++ 0x1a56: 84, ++ 0x1a58: 84, ++ 0x1a59: 84, ++ 0x1a5a: 84, ++ 0x1a5b: 84, ++ 0x1a5c: 84, ++ 0x1a5d: 84, ++ 0x1a5e: 84, ++ 0x1a60: 84, ++ 0x1a62: 84, ++ 0x1a65: 84, ++ 0x1a66: 84, ++ 0x1a67: 84, ++ 0x1a68: 84, ++ 0x1a69: 84, ++ 0x1a6a: 84, ++ 0x1a6b: 84, ++ 0x1a6c: 84, ++ 0x1a73: 84, ++ 0x1a74: 84, ++ 0x1a75: 84, ++ 0x1a76: 84, ++ 0x1a77: 84, ++ 0x1a78: 84, ++ 0x1a79: 84, ++ 0x1a7a: 84, ++ 0x1a7b: 84, ++ 0x1a7c: 84, ++ 0x1a7f: 84, ++ 0x1ab0: 84, ++ 0x1ab1: 84, ++ 0x1ab2: 84, ++ 0x1ab3: 84, ++ 0x1ab4: 84, ++ 0x1ab5: 84, ++ 0x1ab6: 84, ++ 0x1ab7: 84, ++ 0x1ab8: 84, ++ 0x1ab9: 84, ++ 0x1aba: 84, ++ 0x1abb: 84, ++ 0x1abc: 84, ++ 0x1abd: 84, ++ 0x1abe: 84, ++ 0x1abf: 84, ++ 0x1ac0: 84, ++ 0x1ac1: 84, ++ 0x1ac2: 84, ++ 0x1ac3: 84, ++ 0x1ac4: 84, ++ 0x1ac5: 84, ++ 0x1ac6: 84, ++ 0x1ac7: 84, ++ 0x1ac8: 84, ++ 0x1ac9: 84, ++ 0x1aca: 84, ++ 0x1acb: 84, ++ 0x1acc: 84, ++ 0x1acd: 84, ++ 0x1ace: 84, ++ 0x1b00: 84, ++ 0x1b01: 84, ++ 0x1b02: 84, ++ 0x1b03: 84, ++ 0x1b34: 84, ++ 0x1b36: 84, ++ 0x1b37: 84, ++ 0x1b38: 84, ++ 0x1b39: 84, ++ 0x1b3a: 84, ++ 0x1b3c: 84, ++ 0x1b42: 84, ++ 0x1b6b: 84, ++ 0x1b6c: 84, ++ 0x1b6d: 84, ++ 0x1b6e: 84, ++ 0x1b6f: 84, ++ 0x1b70: 84, ++ 0x1b71: 84, ++ 0x1b72: 84, ++ 0x1b73: 84, ++ 0x1b80: 84, ++ 0x1b81: 84, ++ 0x1ba2: 84, ++ 0x1ba3: 84, ++ 0x1ba4: 84, ++ 0x1ba5: 84, ++ 0x1ba8: 84, ++ 0x1ba9: 84, ++ 0x1bab: 84, ++ 0x1bac: 84, ++ 0x1bad: 84, ++ 0x1be6: 84, ++ 0x1be8: 84, ++ 0x1be9: 84, ++ 0x1bed: 84, ++ 0x1bef: 84, ++ 0x1bf0: 84, ++ 0x1bf1: 84, ++ 0x1c2c: 84, ++ 0x1c2d: 84, ++ 0x1c2e: 84, ++ 0x1c2f: 84, ++ 0x1c30: 84, ++ 0x1c31: 84, ++ 0x1c32: 84, ++ 0x1c33: 84, ++ 0x1c36: 84, ++ 0x1c37: 84, ++ 0x1cd0: 84, ++ 0x1cd1: 84, ++ 0x1cd2: 84, ++ 0x1cd4: 84, ++ 0x1cd5: 84, ++ 0x1cd6: 84, ++ 0x1cd7: 84, ++ 0x1cd8: 84, ++ 0x1cd9: 84, ++ 0x1cda: 84, ++ 0x1cdb: 84, ++ 0x1cdc: 84, ++ 0x1cdd: 84, ++ 0x1cde: 84, ++ 0x1cdf: 84, ++ 0x1ce0: 84, ++ 0x1ce2: 84, ++ 0x1ce3: 84, ++ 0x1ce4: 84, ++ 0x1ce5: 84, ++ 0x1ce6: 84, ++ 0x1ce7: 84, ++ 0x1ce8: 84, ++ 0x1ced: 84, ++ 0x1cf4: 84, ++ 0x1cf8: 84, ++ 0x1cf9: 84, ++ 0x1dc0: 84, ++ 0x1dc1: 84, ++ 0x1dc2: 84, ++ 0x1dc3: 84, ++ 0x1dc4: 84, ++ 0x1dc5: 84, ++ 0x1dc6: 84, ++ 0x1dc7: 84, ++ 0x1dc8: 84, ++ 0x1dc9: 84, ++ 0x1dca: 84, ++ 0x1dcb: 84, ++ 0x1dcc: 84, ++ 0x1dcd: 84, ++ 0x1dce: 84, ++ 0x1dcf: 84, ++ 0x1dd0: 84, ++ 0x1dd1: 84, ++ 0x1dd2: 84, ++ 0x1dd3: 84, ++ 0x1dd4: 84, ++ 0x1dd5: 84, ++ 0x1dd6: 84, ++ 0x1dd7: 84, ++ 0x1dd8: 84, ++ 0x1dd9: 84, ++ 0x1dda: 84, ++ 0x1ddb: 84, ++ 0x1ddc: 84, ++ 0x1ddd: 84, ++ 0x1dde: 84, ++ 0x1ddf: 84, ++ 0x1de0: 84, ++ 0x1de1: 84, ++ 0x1de2: 84, ++ 0x1de3: 84, ++ 0x1de4: 84, ++ 0x1de5: 84, ++ 0x1de6: 84, ++ 0x1de7: 84, ++ 0x1de8: 84, ++ 0x1de9: 84, ++ 0x1dea: 84, ++ 0x1deb: 84, ++ 0x1dec: 84, ++ 0x1ded: 84, ++ 0x1dee: 84, ++ 0x1def: 84, ++ 0x1df0: 84, ++ 0x1df1: 84, ++ 0x1df2: 84, ++ 0x1df3: 84, ++ 0x1df4: 84, ++ 0x1df5: 84, ++ 0x1df6: 84, ++ 0x1df7: 84, ++ 0x1df8: 84, ++ 0x1df9: 84, ++ 0x1dfa: 84, ++ 0x1dfb: 84, ++ 0x1dfc: 84, ++ 0x1dfd: 84, ++ 0x1dfe: 84, ++ 0x1dff: 84, ++ 0x200b: 84, + 0x200d: 67, +- 0x202f: 85, +- 0x2066: 85, +- 0x2067: 85, +- 0x2068: 85, +- 0x2069: 85, ++ 0x200e: 84, ++ 0x200f: 84, ++ 0x202a: 84, ++ 0x202b: 84, ++ 0x202c: 84, ++ 0x202d: 84, ++ 0x202e: 84, ++ 0x2060: 84, ++ 0x2061: 84, ++ 0x2062: 84, ++ 0x2063: 84, ++ 0x2064: 84, ++ 0x206a: 84, ++ 0x206b: 84, ++ 0x206c: 84, ++ 0x206d: 84, ++ 0x206e: 84, ++ 0x206f: 84, ++ 0x20d0: 84, ++ 0x20d1: 84, ++ 0x20d2: 84, ++ 0x20d3: 84, ++ 0x20d4: 84, ++ 0x20d5: 84, ++ 0x20d6: 84, ++ 0x20d7: 84, ++ 0x20d8: 84, ++ 0x20d9: 84, ++ 0x20da: 84, ++ 0x20db: 84, ++ 0x20dc: 84, ++ 0x20dd: 84, ++ 0x20de: 84, ++ 0x20df: 84, ++ 0x20e0: 84, ++ 0x20e1: 84, ++ 0x20e2: 84, ++ 0x20e3: 84, ++ 0x20e4: 84, ++ 0x20e5: 84, ++ 0x20e6: 84, ++ 0x20e7: 84, ++ 0x20e8: 84, ++ 0x20e9: 84, ++ 0x20ea: 84, ++ 0x20eb: 84, ++ 0x20ec: 84, ++ 0x20ed: 84, ++ 0x20ee: 84, ++ 0x20ef: 84, ++ 0x20f0: 84, ++ 0x2cef: 84, ++ 0x2cf0: 84, ++ 0x2cf1: 84, ++ 0x2d7f: 84, ++ 0x2de0: 84, ++ 0x2de1: 84, ++ 0x2de2: 84, ++ 0x2de3: 84, ++ 0x2de4: 84, ++ 0x2de5: 84, ++ 0x2de6: 84, ++ 0x2de7: 84, ++ 0x2de8: 84, ++ 0x2de9: 84, ++ 0x2dea: 84, ++ 0x2deb: 84, ++ 0x2dec: 84, ++ 0x2ded: 84, ++ 0x2dee: 84, ++ 0x2def: 84, ++ 0x2df0: 84, ++ 0x2df1: 84, ++ 0x2df2: 84, ++ 0x2df3: 84, ++ 0x2df4: 84, ++ 0x2df5: 84, ++ 0x2df6: 84, ++ 0x2df7: 84, ++ 0x2df8: 84, ++ 0x2df9: 84, ++ 0x2dfa: 84, ++ 0x2dfb: 84, ++ 0x2dfc: 84, ++ 0x2dfd: 84, ++ 0x2dfe: 84, ++ 0x2dff: 84, ++ 0x302a: 84, ++ 0x302b: 84, ++ 0x302c: 84, ++ 0x302d: 84, ++ 0x3099: 84, ++ 0x309a: 84, ++ 0xa66f: 84, ++ 0xa670: 84, ++ 0xa671: 84, ++ 0xa672: 84, ++ 0xa674: 84, ++ 0xa675: 84, ++ 0xa676: 84, ++ 0xa677: 84, ++ 0xa678: 84, ++ 0xa679: 84, ++ 0xa67a: 84, ++ 0xa67b: 84, ++ 0xa67c: 84, ++ 0xa67d: 84, ++ 0xa69e: 84, ++ 0xa69f: 84, ++ 0xa6f0: 84, ++ 0xa6f1: 84, ++ 0xa802: 84, ++ 0xa806: 84, ++ 0xa80b: 84, ++ 0xa825: 84, ++ 0xa826: 84, ++ 0xa82c: 84, + 0xa840: 68, + 0xa841: 68, + 0xa842: 68, +@@ -678,20 +1630,151 @@ joining_types = { + 0xa870: 68, + 0xa871: 68, + 0xa872: 76, +- 0xa873: 85, ++ 0xa8c4: 84, ++ 0xa8c5: 84, ++ 0xa8e0: 84, ++ 0xa8e1: 84, ++ 0xa8e2: 84, ++ 0xa8e3: 84, ++ 0xa8e4: 84, ++ 0xa8e5: 84, ++ 0xa8e6: 84, ++ 0xa8e7: 84, ++ 0xa8e8: 84, ++ 0xa8e9: 84, ++ 0xa8ea: 84, ++ 0xa8eb: 84, ++ 0xa8ec: 84, ++ 0xa8ed: 84, ++ 0xa8ee: 84, ++ 0xa8ef: 84, ++ 0xa8f0: 84, ++ 0xa8f1: 84, ++ 0xa8ff: 84, ++ 0xa926: 84, ++ 0xa927: 84, ++ 0xa928: 84, ++ 0xa929: 84, ++ 0xa92a: 84, ++ 0xa92b: 84, ++ 0xa92c: 84, ++ 0xa92d: 84, ++ 0xa947: 84, ++ 0xa948: 84, ++ 0xa949: 84, ++ 0xa94a: 84, ++ 0xa94b: 84, ++ 0xa94c: 84, ++ 0xa94d: 84, ++ 0xa94e: 84, ++ 0xa94f: 84, ++ 0xa950: 84, ++ 0xa951: 84, ++ 0xa980: 84, ++ 0xa981: 84, ++ 0xa982: 84, ++ 0xa9b3: 84, ++ 0xa9b6: 84, ++ 0xa9b7: 84, ++ 0xa9b8: 84, ++ 0xa9b9: 84, ++ 0xa9bc: 84, ++ 0xa9bd: 84, ++ 0xa9e5: 84, ++ 0xaa29: 84, ++ 0xaa2a: 84, ++ 0xaa2b: 84, ++ 0xaa2c: 84, ++ 0xaa2d: 84, ++ 0xaa2e: 84, ++ 0xaa31: 84, ++ 0xaa32: 84, ++ 0xaa35: 84, ++ 0xaa36: 84, ++ 0xaa43: 84, ++ 0xaa4c: 84, ++ 0xaa7c: 84, ++ 0xaab0: 84, ++ 0xaab2: 84, ++ 0xaab3: 84, ++ 0xaab4: 84, ++ 0xaab7: 84, ++ 0xaab8: 84, ++ 0xaabe: 84, ++ 0xaabf: 84, ++ 0xaac1: 84, ++ 0xaaec: 84, ++ 0xaaed: 84, ++ 0xaaf6: 84, ++ 0xabe5: 84, ++ 0xabe8: 84, ++ 0xabed: 84, ++ 0xfb1e: 84, ++ 0xfe00: 84, ++ 0xfe01: 84, ++ 0xfe02: 84, ++ 0xfe03: 84, ++ 0xfe04: 84, ++ 0xfe05: 84, ++ 0xfe06: 84, ++ 0xfe07: 84, ++ 0xfe08: 84, ++ 0xfe09: 84, ++ 0xfe0a: 84, ++ 0xfe0b: 84, ++ 0xfe0c: 84, ++ 0xfe0d: 84, ++ 0xfe0e: 84, ++ 0xfe0f: 84, ++ 0xfe20: 84, ++ 0xfe21: 84, ++ 0xfe22: 84, ++ 0xfe23: 84, ++ 0xfe24: 84, ++ 0xfe25: 84, ++ 0xfe26: 84, ++ 0xfe27: 84, ++ 0xfe28: 84, ++ 0xfe29: 84, ++ 0xfe2a: 84, ++ 0xfe2b: 84, ++ 0xfe2c: 84, ++ 0xfe2d: 84, ++ 0xfe2e: 84, ++ 0xfe2f: 84, ++ 0xfeff: 84, ++ 0xfff9: 84, ++ 0xfffa: 84, ++ 0xfffb: 84, ++ 0x101fd: 84, ++ 0x102e0: 84, ++ 0x10376: 84, ++ 0x10377: 84, ++ 0x10378: 84, ++ 0x10379: 84, ++ 0x1037a: 84, ++ 0x10a01: 84, ++ 0x10a02: 84, ++ 0x10a03: 84, ++ 0x10a05: 84, ++ 0x10a06: 84, ++ 0x10a0c: 84, ++ 0x10a0d: 84, ++ 0x10a0e: 84, ++ 0x10a0f: 84, ++ 0x10a38: 84, ++ 0x10a39: 84, ++ 0x10a3a: 84, ++ 0x10a3f: 84, + 0x10ac0: 68, + 0x10ac1: 68, + 0x10ac2: 68, + 0x10ac3: 68, + 0x10ac4: 68, + 0x10ac5: 82, +- 0x10ac6: 85, + 0x10ac7: 82, +- 0x10ac8: 85, + 0x10ac9: 82, + 0x10aca: 82, +- 0x10acb: 85, +- 0x10acc: 85, + 0x10acd: 76, + 0x10ace: 82, + 0x10acf: 82, +@@ -713,9 +1796,9 @@ joining_types = { + 0x10adf: 68, + 0x10ae0: 68, + 0x10ae1: 82, +- 0x10ae2: 85, +- 0x10ae3: 85, + 0x10ae4: 82, ++ 0x10ae5: 84, ++ 0x10ae6: 84, + 0x10aeb: 68, + 0x10aec: 68, + 0x10aed: 68, +@@ -745,7 +1828,6 @@ joining_types = { + 0x10bac: 82, + 0x10bad: 68, + 0x10bae: 68, +- 0x10baf: 85, + 0x10d00: 76, + 0x10d01: 68, + 0x10d02: 68, +@@ -782,6 +1864,12 @@ joining_types = { + 0x10d21: 68, + 0x10d22: 82, + 0x10d23: 68, ++ 0x10d24: 84, ++ 0x10d25: 84, ++ 0x10d26: 84, ++ 0x10d27: 84, ++ 0x10eab: 84, ++ 0x10eac: 84, + 0x10f30: 68, + 0x10f31: 68, + 0x10f32: 68, +@@ -803,7 +1891,17 @@ joining_types = { + 0x10f42: 68, + 0x10f43: 68, + 0x10f44: 68, +- 0x10f45: 85, ++ 0x10f46: 84, ++ 0x10f47: 84, ++ 0x10f48: 84, ++ 0x10f49: 84, ++ 0x10f4a: 84, ++ 0x10f4b: 84, ++ 0x10f4c: 84, ++ 0x10f4d: 84, ++ 0x10f4e: 84, ++ 0x10f4f: 84, ++ 0x10f50: 84, + 0x10f51: 68, + 0x10f52: 68, + 0x10f53: 68, +@@ -826,14 +1924,16 @@ joining_types = { + 0x10f7f: 68, + 0x10f80: 68, + 0x10f81: 68, ++ 0x10f82: 84, ++ 0x10f83: 84, ++ 0x10f84: 84, ++ 0x10f85: 84, + 0x10fb0: 68, +- 0x10fb1: 85, + 0x10fb2: 68, + 0x10fb3: 68, + 0x10fb4: 82, + 0x10fb5: 82, + 0x10fb6: 82, +- 0x10fb7: 85, + 0x10fb8: 68, + 0x10fb9: 82, + 0x10fba: 82, +@@ -842,20 +1942,630 @@ joining_types = { + 0x10fbd: 82, + 0x10fbe: 68, + 0x10fbf: 68, +- 0x10fc0: 85, + 0x10fc1: 68, + 0x10fc2: 82, + 0x10fc3: 82, + 0x10fc4: 68, +- 0x10fc5: 85, +- 0x10fc6: 85, +- 0x10fc7: 85, +- 0x10fc8: 85, + 0x10fc9: 82, + 0x10fca: 68, + 0x10fcb: 76, +- 0x110bd: 85, +- 0x110cd: 85, ++ 0x11001: 84, ++ 0x11038: 84, ++ 0x11039: 84, ++ 0x1103a: 84, ++ 0x1103b: 84, ++ 0x1103c: 84, ++ 0x1103d: 84, ++ 0x1103e: 84, ++ 0x1103f: 84, ++ 0x11040: 84, ++ 0x11041: 84, ++ 0x11042: 84, ++ 0x11043: 84, ++ 0x11044: 84, ++ 0x11045: 84, ++ 0x11046: 84, ++ 0x11070: 84, ++ 0x11073: 84, ++ 0x11074: 84, ++ 0x1107f: 84, ++ 0x11080: 84, ++ 0x11081: 84, ++ 0x110b3: 84, ++ 0x110b4: 84, ++ 0x110b5: 84, ++ 0x110b6: 84, ++ 0x110b9: 84, ++ 0x110ba: 84, ++ 0x110c2: 84, ++ 0x11100: 84, ++ 0x11101: 84, ++ 0x11102: 84, ++ 0x11127: 84, ++ 0x11128: 84, ++ 0x11129: 84, ++ 0x1112a: 84, ++ 0x1112b: 84, ++ 0x1112d: 84, ++ 0x1112e: 84, ++ 0x1112f: 84, ++ 0x11130: 84, ++ 0x11131: 84, ++ 0x11132: 84, ++ 0x11133: 84, ++ 0x11134: 84, ++ 0x11173: 84, ++ 0x11180: 84, ++ 0x11181: 84, ++ 0x111b6: 84, ++ 0x111b7: 84, ++ 0x111b8: 84, ++ 0x111b9: 84, ++ 0x111ba: 84, ++ 0x111bb: 84, ++ 0x111bc: 84, ++ 0x111bd: 84, ++ 0x111be: 84, ++ 0x111c9: 84, ++ 0x111ca: 84, ++ 0x111cb: 84, ++ 0x111cc: 84, ++ 0x111cf: 84, ++ 0x1122f: 84, ++ 0x11230: 84, ++ 0x11231: 84, ++ 0x11234: 84, ++ 0x11236: 84, ++ 0x11237: 84, ++ 0x1123e: 84, ++ 0x112df: 84, ++ 0x112e3: 84, ++ 0x112e4: 84, ++ 0x112e5: 84, ++ 0x112e6: 84, ++ 0x112e7: 84, ++ 0x112e8: 84, ++ 0x112e9: 84, ++ 0x112ea: 84, ++ 0x11300: 84, ++ 0x11301: 84, ++ 0x1133b: 84, ++ 0x1133c: 84, ++ 0x11340: 84, ++ 0x11366: 84, ++ 0x11367: 84, ++ 0x11368: 84, ++ 0x11369: 84, ++ 0x1136a: 84, ++ 0x1136b: 84, ++ 0x1136c: 84, ++ 0x11370: 84, ++ 0x11371: 84, ++ 0x11372: 84, ++ 0x11373: 84, ++ 0x11374: 84, ++ 0x11438: 84, ++ 0x11439: 84, ++ 0x1143a: 84, ++ 0x1143b: 84, ++ 0x1143c: 84, ++ 0x1143d: 84, ++ 0x1143e: 84, ++ 0x1143f: 84, ++ 0x11442: 84, ++ 0x11443: 84, ++ 0x11444: 84, ++ 0x11446: 84, ++ 0x1145e: 84, ++ 0x114b3: 84, ++ 0x114b4: 84, ++ 0x114b5: 84, ++ 0x114b6: 84, ++ 0x114b7: 84, ++ 0x114b8: 84, ++ 0x114ba: 84, ++ 0x114bf: 84, ++ 0x114c0: 84, ++ 0x114c2: 84, ++ 0x114c3: 84, ++ 0x115b2: 84, ++ 0x115b3: 84, ++ 0x115b4: 84, ++ 0x115b5: 84, ++ 0x115bc: 84, ++ 0x115bd: 84, ++ 0x115bf: 84, ++ 0x115c0: 84, ++ 0x115dc: 84, ++ 0x115dd: 84, ++ 0x11633: 84, ++ 0x11634: 84, ++ 0x11635: 84, ++ 0x11636: 84, ++ 0x11637: 84, ++ 0x11638: 84, ++ 0x11639: 84, ++ 0x1163a: 84, ++ 0x1163d: 84, ++ 0x1163f: 84, ++ 0x11640: 84, ++ 0x116ab: 84, ++ 0x116ad: 84, ++ 0x116b0: 84, ++ 0x116b1: 84, ++ 0x116b2: 84, ++ 0x116b3: 84, ++ 0x116b4: 84, ++ 0x116b5: 84, ++ 0x116b7: 84, ++ 0x1171d: 84, ++ 0x1171e: 84, ++ 0x1171f: 84, ++ 0x11722: 84, ++ 0x11723: 84, ++ 0x11724: 84, ++ 0x11725: 84, ++ 0x11727: 84, ++ 0x11728: 84, ++ 0x11729: 84, ++ 0x1172a: 84, ++ 0x1172b: 84, ++ 0x1182f: 84, ++ 0x11830: 84, ++ 0x11831: 84, ++ 0x11832: 84, ++ 0x11833: 84, ++ 0x11834: 84, ++ 0x11835: 84, ++ 0x11836: 84, ++ 0x11837: 84, ++ 0x11839: 84, ++ 0x1183a: 84, ++ 0x1193b: 84, ++ 0x1193c: 84, ++ 0x1193e: 84, ++ 0x11943: 84, ++ 0x119d4: 84, ++ 0x119d5: 84, ++ 0x119d6: 84, ++ 0x119d7: 84, ++ 0x119da: 84, ++ 0x119db: 84, ++ 0x119e0: 84, ++ 0x11a01: 84, ++ 0x11a02: 84, ++ 0x11a03: 84, ++ 0x11a04: 84, ++ 0x11a05: 84, ++ 0x11a06: 84, ++ 0x11a07: 84, ++ 0x11a08: 84, ++ 0x11a09: 84, ++ 0x11a0a: 84, ++ 0x11a33: 84, ++ 0x11a34: 84, ++ 0x11a35: 84, ++ 0x11a36: 84, ++ 0x11a37: 84, ++ 0x11a38: 84, ++ 0x11a3b: 84, ++ 0x11a3c: 84, ++ 0x11a3d: 84, ++ 0x11a3e: 84, ++ 0x11a47: 84, ++ 0x11a51: 84, ++ 0x11a52: 84, ++ 0x11a53: 84, ++ 0x11a54: 84, ++ 0x11a55: 84, ++ 0x11a56: 84, ++ 0x11a59: 84, ++ 0x11a5a: 84, ++ 0x11a5b: 84, ++ 0x11a8a: 84, ++ 0x11a8b: 84, ++ 0x11a8c: 84, ++ 0x11a8d: 84, ++ 0x11a8e: 84, ++ 0x11a8f: 84, ++ 0x11a90: 84, ++ 0x11a91: 84, ++ 0x11a92: 84, ++ 0x11a93: 84, ++ 0x11a94: 84, ++ 0x11a95: 84, ++ 0x11a96: 84, ++ 0x11a98: 84, ++ 0x11a99: 84, ++ 0x11c30: 84, ++ 0x11c31: 84, ++ 0x11c32: 84, ++ 0x11c33: 84, ++ 0x11c34: 84, ++ 0x11c35: 84, ++ 0x11c36: 84, ++ 0x11c38: 84, ++ 0x11c39: 84, ++ 0x11c3a: 84, ++ 0x11c3b: 84, ++ 0x11c3c: 84, ++ 0x11c3d: 84, ++ 0x11c3f: 84, ++ 0x11c92: 84, ++ 0x11c93: 84, ++ 0x11c94: 84, ++ 0x11c95: 84, ++ 0x11c96: 84, ++ 0x11c97: 84, ++ 0x11c98: 84, ++ 0x11c99: 84, ++ 0x11c9a: 84, ++ 0x11c9b: 84, ++ 0x11c9c: 84, ++ 0x11c9d: 84, ++ 0x11c9e: 84, ++ 0x11c9f: 84, ++ 0x11ca0: 84, ++ 0x11ca1: 84, ++ 0x11ca2: 84, ++ 0x11ca3: 84, ++ 0x11ca4: 84, ++ 0x11ca5: 84, ++ 0x11ca6: 84, ++ 0x11ca7: 84, ++ 0x11caa: 84, ++ 0x11cab: 84, ++ 0x11cac: 84, ++ 0x11cad: 84, ++ 0x11cae: 84, ++ 0x11caf: 84, ++ 0x11cb0: 84, ++ 0x11cb2: 84, ++ 0x11cb3: 84, ++ 0x11cb5: 84, ++ 0x11cb6: 84, ++ 0x11d31: 84, ++ 0x11d32: 84, ++ 0x11d33: 84, ++ 0x11d34: 84, ++ 0x11d35: 84, ++ 0x11d36: 84, ++ 0x11d3a: 84, ++ 0x11d3c: 84, ++ 0x11d3d: 84, ++ 0x11d3f: 84, ++ 0x11d40: 84, ++ 0x11d41: 84, ++ 0x11d42: 84, ++ 0x11d43: 84, ++ 0x11d44: 84, ++ 0x11d45: 84, ++ 0x11d47: 84, ++ 0x11d90: 84, ++ 0x11d91: 84, ++ 0x11d95: 84, ++ 0x11d97: 84, ++ 0x11ef3: 84, ++ 0x11ef4: 84, ++ 0x13430: 84, ++ 0x13431: 84, ++ 0x13432: 84, ++ 0x13433: 84, ++ 0x13434: 84, ++ 0x13435: 84, ++ 0x13436: 84, ++ 0x13437: 84, ++ 0x13438: 84, ++ 0x16af0: 84, ++ 0x16af1: 84, ++ 0x16af2: 84, ++ 0x16af3: 84, ++ 0x16af4: 84, ++ 0x16b30: 84, ++ 0x16b31: 84, ++ 0x16b32: 84, ++ 0x16b33: 84, ++ 0x16b34: 84, ++ 0x16b35: 84, ++ 0x16b36: 84, ++ 0x16f4f: 84, ++ 0x16f8f: 84, ++ 0x16f90: 84, ++ 0x16f91: 84, ++ 0x16f92: 84, ++ 0x16fe4: 84, ++ 0x1bc9d: 84, ++ 0x1bc9e: 84, ++ 0x1bca0: 84, ++ 0x1bca1: 84, ++ 0x1bca2: 84, ++ 0x1bca3: 84, ++ 0x1cf00: 84, ++ 0x1cf01: 84, ++ 0x1cf02: 84, ++ 0x1cf03: 84, ++ 0x1cf04: 84, ++ 0x1cf05: 84, ++ 0x1cf06: 84, ++ 0x1cf07: 84, ++ 0x1cf08: 84, ++ 0x1cf09: 84, ++ 0x1cf0a: 84, ++ 0x1cf0b: 84, ++ 0x1cf0c: 84, ++ 0x1cf0d: 84, ++ 0x1cf0e: 84, ++ 0x1cf0f: 84, ++ 0x1cf10: 84, ++ 0x1cf11: 84, ++ 0x1cf12: 84, ++ 0x1cf13: 84, ++ 0x1cf14: 84, ++ 0x1cf15: 84, ++ 0x1cf16: 84, ++ 0x1cf17: 84, ++ 0x1cf18: 84, ++ 0x1cf19: 84, ++ 0x1cf1a: 84, ++ 0x1cf1b: 84, ++ 0x1cf1c: 84, ++ 0x1cf1d: 84, ++ 0x1cf1e: 84, ++ 0x1cf1f: 84, ++ 0x1cf20: 84, ++ 0x1cf21: 84, ++ 0x1cf22: 84, ++ 0x1cf23: 84, ++ 0x1cf24: 84, ++ 0x1cf25: 84, ++ 0x1cf26: 84, ++ 0x1cf27: 84, ++ 0x1cf28: 84, ++ 0x1cf29: 84, ++ 0x1cf2a: 84, ++ 0x1cf2b: 84, ++ 0x1cf2c: 84, ++ 0x1cf2d: 84, ++ 0x1cf30: 84, ++ 0x1cf31: 84, ++ 0x1cf32: 84, ++ 0x1cf33: 84, ++ 0x1cf34: 84, ++ 0x1cf35: 84, ++ 0x1cf36: 84, ++ 0x1cf37: 84, ++ 0x1cf38: 84, ++ 0x1cf39: 84, ++ 0x1cf3a: 84, ++ 0x1cf3b: 84, ++ 0x1cf3c: 84, ++ 0x1cf3d: 84, ++ 0x1cf3e: 84, ++ 0x1cf3f: 84, ++ 0x1cf40: 84, ++ 0x1cf41: 84, ++ 0x1cf42: 84, ++ 0x1cf43: 84, ++ 0x1cf44: 84, ++ 0x1cf45: 84, ++ 0x1cf46: 84, ++ 0x1d167: 84, ++ 0x1d168: 84, ++ 0x1d169: 84, ++ 0x1d173: 84, ++ 0x1d174: 84, ++ 0x1d175: 84, ++ 0x1d176: 84, ++ 0x1d177: 84, ++ 0x1d178: 84, ++ 0x1d179: 84, ++ 0x1d17a: 84, ++ 0x1d17b: 84, ++ 0x1d17c: 84, ++ 0x1d17d: 84, ++ 0x1d17e: 84, ++ 0x1d17f: 84, ++ 0x1d180: 84, ++ 0x1d181: 84, ++ 0x1d182: 84, ++ 0x1d185: 84, ++ 0x1d186: 84, ++ 0x1d187: 84, ++ 0x1d188: 84, ++ 0x1d189: 84, ++ 0x1d18a: 84, ++ 0x1d18b: 84, ++ 0x1d1aa: 84, ++ 0x1d1ab: 84, ++ 0x1d1ac: 84, ++ 0x1d1ad: 84, ++ 0x1d242: 84, ++ 0x1d243: 84, ++ 0x1d244: 84, ++ 0x1da00: 84, ++ 0x1da01: 84, ++ 0x1da02: 84, ++ 0x1da03: 84, ++ 0x1da04: 84, ++ 0x1da05: 84, ++ 0x1da06: 84, ++ 0x1da07: 84, ++ 0x1da08: 84, ++ 0x1da09: 84, ++ 0x1da0a: 84, ++ 0x1da0b: 84, ++ 0x1da0c: 84, ++ 0x1da0d: 84, ++ 0x1da0e: 84, ++ 0x1da0f: 84, ++ 0x1da10: 84, ++ 0x1da11: 84, ++ 0x1da12: 84, ++ 0x1da13: 84, ++ 0x1da14: 84, ++ 0x1da15: 84, ++ 0x1da16: 84, ++ 0x1da17: 84, ++ 0x1da18: 84, ++ 0x1da19: 84, ++ 0x1da1a: 84, ++ 0x1da1b: 84, ++ 0x1da1c: 84, ++ 0x1da1d: 84, ++ 0x1da1e: 84, ++ 0x1da1f: 84, ++ 0x1da20: 84, ++ 0x1da21: 84, ++ 0x1da22: 84, ++ 0x1da23: 84, ++ 0x1da24: 84, ++ 0x1da25: 84, ++ 0x1da26: 84, ++ 0x1da27: 84, ++ 0x1da28: 84, ++ 0x1da29: 84, ++ 0x1da2a: 84, ++ 0x1da2b: 84, ++ 0x1da2c: 84, ++ 0x1da2d: 84, ++ 0x1da2e: 84, ++ 0x1da2f: 84, ++ 0x1da30: 84, ++ 0x1da31: 84, ++ 0x1da32: 84, ++ 0x1da33: 84, ++ 0x1da34: 84, ++ 0x1da35: 84, ++ 0x1da36: 84, ++ 0x1da3b: 84, ++ 0x1da3c: 84, ++ 0x1da3d: 84, ++ 0x1da3e: 84, ++ 0x1da3f: 84, ++ 0x1da40: 84, ++ 0x1da41: 84, ++ 0x1da42: 84, ++ 0x1da43: 84, ++ 0x1da44: 84, ++ 0x1da45: 84, ++ 0x1da46: 84, ++ 0x1da47: 84, ++ 0x1da48: 84, ++ 0x1da49: 84, ++ 0x1da4a: 84, ++ 0x1da4b: 84, ++ 0x1da4c: 84, ++ 0x1da4d: 84, ++ 0x1da4e: 84, ++ 0x1da4f: 84, ++ 0x1da50: 84, ++ 0x1da51: 84, ++ 0x1da52: 84, ++ 0x1da53: 84, ++ 0x1da54: 84, ++ 0x1da55: 84, ++ 0x1da56: 84, ++ 0x1da57: 84, ++ 0x1da58: 84, ++ 0x1da59: 84, ++ 0x1da5a: 84, ++ 0x1da5b: 84, ++ 0x1da5c: 84, ++ 0x1da5d: 84, ++ 0x1da5e: 84, ++ 0x1da5f: 84, ++ 0x1da60: 84, ++ 0x1da61: 84, ++ 0x1da62: 84, ++ 0x1da63: 84, ++ 0x1da64: 84, ++ 0x1da65: 84, ++ 0x1da66: 84, ++ 0x1da67: 84, ++ 0x1da68: 84, ++ 0x1da69: 84, ++ 0x1da6a: 84, ++ 0x1da6b: 84, ++ 0x1da6c: 84, ++ 0x1da75: 84, ++ 0x1da84: 84, ++ 0x1da9b: 84, ++ 0x1da9c: 84, ++ 0x1da9d: 84, ++ 0x1da9e: 84, ++ 0x1da9f: 84, ++ 0x1daa1: 84, ++ 0x1daa2: 84, ++ 0x1daa3: 84, ++ 0x1daa4: 84, ++ 0x1daa5: 84, ++ 0x1daa6: 84, ++ 0x1daa7: 84, ++ 0x1daa8: 84, ++ 0x1daa9: 84, ++ 0x1daaa: 84, ++ 0x1daab: 84, ++ 0x1daac: 84, ++ 0x1daad: 84, ++ 0x1daae: 84, ++ 0x1daaf: 84, ++ 0x1e000: 84, ++ 0x1e001: 84, ++ 0x1e002: 84, ++ 0x1e003: 84, ++ 0x1e004: 84, ++ 0x1e005: 84, ++ 0x1e006: 84, ++ 0x1e008: 84, ++ 0x1e009: 84, ++ 0x1e00a: 84, ++ 0x1e00b: 84, ++ 0x1e00c: 84, ++ 0x1e00d: 84, ++ 0x1e00e: 84, ++ 0x1e00f: 84, ++ 0x1e010: 84, ++ 0x1e011: 84, ++ 0x1e012: 84, ++ 0x1e013: 84, ++ 0x1e014: 84, ++ 0x1e015: 84, ++ 0x1e016: 84, ++ 0x1e017: 84, ++ 0x1e018: 84, ++ 0x1e01b: 84, ++ 0x1e01c: 84, ++ 0x1e01d: 84, ++ 0x1e01e: 84, ++ 0x1e01f: 84, ++ 0x1e020: 84, ++ 0x1e021: 84, ++ 0x1e023: 84, ++ 0x1e024: 84, ++ 0x1e026: 84, ++ 0x1e027: 84, ++ 0x1e028: 84, ++ 0x1e029: 84, ++ 0x1e02a: 84, ++ 0x1e130: 84, ++ 0x1e131: 84, ++ 0x1e132: 84, ++ 0x1e133: 84, ++ 0x1e134: 84, ++ 0x1e135: 84, ++ 0x1e136: 84, ++ 0x1e2ae: 84, ++ 0x1e2ec: 84, ++ 0x1e2ed: 84, ++ 0x1e2ee: 84, ++ 0x1e2ef: 84, ++ 0x1e8d0: 84, ++ 0x1e8d1: 84, ++ 0x1e8d2: 84, ++ 0x1e8d3: 84, ++ 0x1e8d4: 84, ++ 0x1e8d5: 84, ++ 0x1e8d6: 84, + 0x1e900: 68, + 0x1e901: 68, + 0x1e902: 68, +@@ -924,7 +2634,351 @@ joining_types = { + 0x1e941: 68, + 0x1e942: 68, + 0x1e943: 68, ++ 0x1e944: 84, ++ 0x1e945: 84, ++ 0x1e946: 84, ++ 0x1e947: 84, ++ 0x1e948: 84, ++ 0x1e949: 84, ++ 0x1e94a: 84, + 0x1e94b: 84, ++ 0xe0001: 84, ++ 0xe0020: 84, ++ 0xe0021: 84, ++ 0xe0022: 84, ++ 0xe0023: 84, ++ 0xe0024: 84, ++ 0xe0025: 84, ++ 0xe0026: 84, ++ 0xe0027: 84, ++ 0xe0028: 84, ++ 0xe0029: 84, ++ 0xe002a: 84, ++ 0xe002b: 84, ++ 0xe002c: 84, ++ 0xe002d: 84, ++ 0xe002e: 84, ++ 0xe002f: 84, ++ 0xe0030: 84, ++ 0xe0031: 84, ++ 0xe0032: 84, ++ 0xe0033: 84, ++ 0xe0034: 84, ++ 0xe0035: 84, ++ 0xe0036: 84, ++ 0xe0037: 84, ++ 0xe0038: 84, ++ 0xe0039: 84, ++ 0xe003a: 84, ++ 0xe003b: 84, ++ 0xe003c: 84, ++ 0xe003d: 84, ++ 0xe003e: 84, ++ 0xe003f: 84, ++ 0xe0040: 84, ++ 0xe0041: 84, ++ 0xe0042: 84, ++ 0xe0043: 84, ++ 0xe0044: 84, ++ 0xe0045: 84, ++ 0xe0046: 84, ++ 0xe0047: 84, ++ 0xe0048: 84, ++ 0xe0049: 84, ++ 0xe004a: 84, ++ 0xe004b: 84, ++ 0xe004c: 84, ++ 0xe004d: 84, ++ 0xe004e: 84, ++ 0xe004f: 84, ++ 0xe0050: 84, ++ 0xe0051: 84, ++ 0xe0052: 84, ++ 0xe0053: 84, ++ 0xe0054: 84, ++ 0xe0055: 84, ++ 0xe0056: 84, ++ 0xe0057: 84, ++ 0xe0058: 84, ++ 0xe0059: 84, ++ 0xe005a: 84, ++ 0xe005b: 84, ++ 0xe005c: 84, ++ 0xe005d: 84, ++ 0xe005e: 84, ++ 0xe005f: 84, ++ 0xe0060: 84, ++ 0xe0061: 84, ++ 0xe0062: 84, ++ 0xe0063: 84, ++ 0xe0064: 84, ++ 0xe0065: 84, ++ 0xe0066: 84, ++ 0xe0067: 84, ++ 0xe0068: 84, ++ 0xe0069: 84, ++ 0xe006a: 84, ++ 0xe006b: 84, ++ 0xe006c: 84, ++ 0xe006d: 84, ++ 0xe006e: 84, ++ 0xe006f: 84, ++ 0xe0070: 84, ++ 0xe0071: 84, ++ 0xe0072: 84, ++ 0xe0073: 84, ++ 0xe0074: 84, ++ 0xe0075: 84, ++ 0xe0076: 84, ++ 0xe0077: 84, ++ 0xe0078: 84, ++ 0xe0079: 84, ++ 0xe007a: 84, ++ 0xe007b: 84, ++ 0xe007c: 84, ++ 0xe007d: 84, ++ 0xe007e: 84, ++ 0xe007f: 84, ++ 0xe0100: 84, ++ 0xe0101: 84, ++ 0xe0102: 84, ++ 0xe0103: 84, ++ 0xe0104: 84, ++ 0xe0105: 84, ++ 0xe0106: 84, ++ 0xe0107: 84, ++ 0xe0108: 84, ++ 0xe0109: 84, ++ 0xe010a: 84, ++ 0xe010b: 84, ++ 0xe010c: 84, ++ 0xe010d: 84, ++ 0xe010e: 84, ++ 0xe010f: 84, ++ 0xe0110: 84, ++ 0xe0111: 84, ++ 0xe0112: 84, ++ 0xe0113: 84, ++ 0xe0114: 84, ++ 0xe0115: 84, ++ 0xe0116: 84, ++ 0xe0117: 84, ++ 0xe0118: 84, ++ 0xe0119: 84, ++ 0xe011a: 84, ++ 0xe011b: 84, ++ 0xe011c: 84, ++ 0xe011d: 84, ++ 0xe011e: 84, ++ 0xe011f: 84, ++ 0xe0120: 84, ++ 0xe0121: 84, ++ 0xe0122: 84, ++ 0xe0123: 84, ++ 0xe0124: 84, ++ 0xe0125: 84, ++ 0xe0126: 84, ++ 0xe0127: 84, ++ 0xe0128: 84, ++ 0xe0129: 84, ++ 0xe012a: 84, ++ 0xe012b: 84, ++ 0xe012c: 84, ++ 0xe012d: 84, ++ 0xe012e: 84, ++ 0xe012f: 84, ++ 0xe0130: 84, ++ 0xe0131: 84, ++ 0xe0132: 84, ++ 0xe0133: 84, ++ 0xe0134: 84, ++ 0xe0135: 84, ++ 0xe0136: 84, ++ 0xe0137: 84, ++ 0xe0138: 84, ++ 0xe0139: 84, ++ 0xe013a: 84, ++ 0xe013b: 84, ++ 0xe013c: 84, ++ 0xe013d: 84, ++ 0xe013e: 84, ++ 0xe013f: 84, ++ 0xe0140: 84, ++ 0xe0141: 84, ++ 0xe0142: 84, ++ 0xe0143: 84, ++ 0xe0144: 84, ++ 0xe0145: 84, ++ 0xe0146: 84, ++ 0xe0147: 84, ++ 0xe0148: 84, ++ 0xe0149: 84, ++ 0xe014a: 84, ++ 0xe014b: 84, ++ 0xe014c: 84, ++ 0xe014d: 84, ++ 0xe014e: 84, ++ 0xe014f: 84, ++ 0xe0150: 84, ++ 0xe0151: 84, ++ 0xe0152: 84, ++ 0xe0153: 84, ++ 0xe0154: 84, ++ 0xe0155: 84, ++ 0xe0156: 84, ++ 0xe0157: 84, ++ 0xe0158: 84, ++ 0xe0159: 84, ++ 0xe015a: 84, ++ 0xe015b: 84, ++ 0xe015c: 84, ++ 0xe015d: 84, ++ 0xe015e: 84, ++ 0xe015f: 84, ++ 0xe0160: 84, ++ 0xe0161: 84, ++ 0xe0162: 84, ++ 0xe0163: 84, ++ 0xe0164: 84, ++ 0xe0165: 84, ++ 0xe0166: 84, ++ 0xe0167: 84, ++ 0xe0168: 84, ++ 0xe0169: 84, ++ 0xe016a: 84, ++ 0xe016b: 84, ++ 0xe016c: 84, ++ 0xe016d: 84, ++ 0xe016e: 84, ++ 0xe016f: 84, ++ 0xe0170: 84, ++ 0xe0171: 84, ++ 0xe0172: 84, ++ 0xe0173: 84, ++ 0xe0174: 84, ++ 0xe0175: 84, ++ 0xe0176: 84, ++ 0xe0177: 84, ++ 0xe0178: 84, ++ 0xe0179: 84, ++ 0xe017a: 84, ++ 0xe017b: 84, ++ 0xe017c: 84, ++ 0xe017d: 84, ++ 0xe017e: 84, ++ 0xe017f: 84, ++ 0xe0180: 84, ++ 0xe0181: 84, ++ 0xe0182: 84, ++ 0xe0183: 84, ++ 0xe0184: 84, ++ 0xe0185: 84, ++ 0xe0186: 84, ++ 0xe0187: 84, ++ 0xe0188: 84, ++ 0xe0189: 84, ++ 0xe018a: 84, ++ 0xe018b: 84, ++ 0xe018c: 84, ++ 0xe018d: 84, ++ 0xe018e: 84, ++ 0xe018f: 84, ++ 0xe0190: 84, ++ 0xe0191: 84, ++ 0xe0192: 84, ++ 0xe0193: 84, ++ 0xe0194: 84, ++ 0xe0195: 84, ++ 0xe0196: 84, ++ 0xe0197: 84, ++ 0xe0198: 84, ++ 0xe0199: 84, ++ 0xe019a: 84, ++ 0xe019b: 84, ++ 0xe019c: 84, ++ 0xe019d: 84, ++ 0xe019e: 84, ++ 0xe019f: 84, ++ 0xe01a0: 84, ++ 0xe01a1: 84, ++ 0xe01a2: 84, ++ 0xe01a3: 84, ++ 0xe01a4: 84, ++ 0xe01a5: 84, ++ 0xe01a6: 84, ++ 0xe01a7: 84, ++ 0xe01a8: 84, ++ 0xe01a9: 84, ++ 0xe01aa: 84, ++ 0xe01ab: 84, ++ 0xe01ac: 84, ++ 0xe01ad: 84, ++ 0xe01ae: 84, ++ 0xe01af: 84, ++ 0xe01b0: 84, ++ 0xe01b1: 84, ++ 0xe01b2: 84, ++ 0xe01b3: 84, ++ 0xe01b4: 84, ++ 0xe01b5: 84, ++ 0xe01b6: 84, ++ 0xe01b7: 84, ++ 0xe01b8: 84, ++ 0xe01b9: 84, ++ 0xe01ba: 84, ++ 0xe01bb: 84, ++ 0xe01bc: 84, ++ 0xe01bd: 84, ++ 0xe01be: 84, ++ 0xe01bf: 84, ++ 0xe01c0: 84, ++ 0xe01c1: 84, ++ 0xe01c2: 84, ++ 0xe01c3: 84, ++ 0xe01c4: 84, ++ 0xe01c5: 84, ++ 0xe01c6: 84, ++ 0xe01c7: 84, ++ 0xe01c8: 84, ++ 0xe01c9: 84, ++ 0xe01ca: 84, ++ 0xe01cb: 84, ++ 0xe01cc: 84, ++ 0xe01cd: 84, ++ 0xe01ce: 84, ++ 0xe01cf: 84, ++ 0xe01d0: 84, ++ 0xe01d1: 84, ++ 0xe01d2: 84, ++ 0xe01d3: 84, ++ 0xe01d4: 84, ++ 0xe01d5: 84, ++ 0xe01d6: 84, ++ 0xe01d7: 84, ++ 0xe01d8: 84, ++ 0xe01d9: 84, ++ 0xe01da: 84, ++ 0xe01db: 84, ++ 0xe01dc: 84, ++ 0xe01dd: 84, ++ 0xe01de: 84, ++ 0xe01df: 84, ++ 0xe01e0: 84, ++ 0xe01e1: 84, ++ 0xe01e2: 84, ++ 0xe01e3: 84, ++ 0xe01e4: 84, ++ 0xe01e5: 84, ++ 0xe01e6: 84, ++ 0xe01e7: 84, ++ 0xe01e8: 84, ++ 0xe01e9: 84, ++ 0xe01ea: 84, ++ 0xe01eb: 84, ++ 0xe01ec: 84, ++ 0xe01ed: 84, ++ 0xe01ee: 84, ++ 0xe01ef: 84, + } + codepoint_classes = { + 'PVALID': ( +@@ -1831,7 +3885,6 @@ codepoint_classes = { + 0xa7d50000a7d6, + 0xa7d70000a7d8, + 0xa7d90000a7da, +- 0xa7f20000a7f5, + 0xa7f60000a7f8, + 0xa7fa0000a828, + 0xa82c0000a82d, +@@ -1859,7 +3912,7 @@ codepoint_classes = { + 0xab200000ab27, + 0xab280000ab2f, + 0xab300000ab5b, +- 0xab600000ab6a, ++ 0xab600000ab69, + 0xabc00000abeb, + 0xabec0000abee, + 0xabf00000abfa, +@@ -1904,9 +3957,7 @@ codepoint_classes = { + 0x1060000010737, + 0x1074000010756, + 0x1076000010768, +- 0x1078000010786, +- 0x10787000107b1, +- 0x107b2000107bb, ++ 0x1078000010781, + 0x1080000010806, + 0x1080800010809, + 0x1080a00010836, +@@ -2115,7 +4166,6 @@ codepoint_classes = { + 0x1e8d00001e8d7, + 0x1e9220001e94c, + 0x1e9500001e95a, +- 0x1fbf00001fbfa, + 0x200000002a6e0, + 0x2a7000002b739, + 0x2b7400002b81e, +diff --git a/tools/idna-data b/tools/idna-data +index f5572a8..9fe004a 100755 +--- a/tools/idna-data ++++ b/tools/idna-data +@@ -238,11 +238,18 @@ class UnicodeData(object): + def _load_arabicshaping(self): + + self.ucd_as = {} +- f_as = self._ucdfile('ArabicShaping.txt') ++ f_as = self._ucdfile('extracted/DerivedJoiningType.txt') + for line in f_as.splitlines(): +- result = re.match(r'^(?P[0-9A-F]{4,6})\s*;\s*.*?\s*;\s*(?P\S+)\s*;', line) ++ result = re.match( ++ r'^(?P[0-9A-F]{4,6})(|\.\.(?P[0-9A-F]{4,6}))\s*;\s*(?P\S+)\s*(|\#.*)$', ++ line) + if result: +- self.ucd_as[int(result.group('cp'), 16)] = result.group('jt') ++ if result.group('end'): ++ for i in hexrange(result.group('start'), result.group('end')): ++ self.ucd_as[i] = result.group('jt') ++ else: ++ i = hexvalue(result.group('start')) ++ self.ucd_as[i] = result.group('jt') + + def _load_scripts(self): + diff --git a/meta/recipes-devtools/python/python3-idna_3.3.bb b/meta/recipes-devtools/python/python3-idna_3.3.bb index ee92f44fd5..c5d88259bf 100644 --- a/meta/recipes-devtools/python/python3-idna_3.3.bb +++ b/meta/recipes-devtools/python/python3-idna_3.3.bb @@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=239668a7c6066d9e0c5382e9c8c6c0e1" SRC_URI[sha256sum] = "9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d" +SRC_URI += " file://CVE-2024-3651.patch" + inherit pypi setuptools3 # Remove bundled egg-info From patchwork Tue Nov 25 20:54:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 75378 X-Patchwork-Delegate: steve@sakoman.com 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 038BFD0EE2C for ; Tue, 25 Nov 2025 20:55:10 +0000 (UTC) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.4184.1764104103647898316 for ; Tue, 25 Nov 2025 12:55:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=aPX6NzGz; spf=softfail (domain: sakoman.com, ip: 209.85.216.48, mailfrom: steve@sakoman.com) Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-343806688c5so5053702a91.0 for ; Tue, 25 Nov 2025 12:55:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1764104103; x=1764708903; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=7attq8GevIUBM9vDsRMY4IETD5RxAmqNfZhwQvShrXg=; b=aPX6NzGzRQHmdNueYKwusoI0cCIrhI78D6vLgUqPti6APgv7crwpKlgOVvablScLSi vVCpCb9AqpsVTrUacvI/LEtv9vCMlKVvfGnWii59ud6GLn6pCjnaM4Jx8QRsNveOLXrT PSZ1t/seqFQ79fcdIOf1ftbPcA945qK4Ix/rw8Sy5WcU0S/6dXIVXwpt0Qa78kwqu44s yEfRUt0Xzr13QCw8oIxTuh/5U7CECeQCvLLH/snCCwsLg1sLOgN/rtww2tiFbDrVhmql EXdA9ecnXT7FX6AdkCW+oYk4sa8ArhecCfY8+k4pa8B22CHp9aYDCIOzKQ/hmrGy0HWJ D07g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764104103; x=1764708903; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=7attq8GevIUBM9vDsRMY4IETD5RxAmqNfZhwQvShrXg=; b=aTKIL+K/DcAtHpz9NAsmUZYEz/0cmXqyyFC/cRVCGfH+ZgFyvCkaxRMsIWfniGOGnB 4OgzrKF4iEAuO1X9mBzv6MSU+fxLsswnfFQaGsZDb2lcmZjPQ+/BRyEHWZoNj8uTi/sl 8U4AZV3/AmOUKlzeFPK+uIbaE/u8bU0cS6QcpXU/m755zSayMSU1n1rQq+8QL7ELyx7U W6B0SQFARhmfAkmd9Xtr1nkBHCTzYXewOodoBNJZyW4WJ0IuaQuGjzqIC51OSDAaBQOF 7hhovwH2lfOjV5L7EW/poKsiSHupp4BsRMDjLXOZO982TawRcO/sjqQh+m2PZ3wf7zgc koMQ== X-Gm-Message-State: AOJu0YxoKb8uxiGFH4GTWG33RdTyiUyob50IFnQhUw8A3qUAZMyRBJOH wltd77F/6Ue3NiPrYe/eAe4bng6eig5JhB6qh3NVv6xaxNvkD0SbTmaRT2gmdHnygzJL5Rwkg36 yKe2n X-Gm-Gg: ASbGncsF2tYtFvKwahXOtTilxLUJSG9LCbcs7i7YYZ5gr3wVlX8ngT8v6MuYC6vafGw lcX5nEFEN2M7d+HB/XdLzy7kiLWKZQhcPAIeQxWL5FTs8YWduTz0KumPtm7tP/Pz5R2GPeu6PST s6eCSVKJ+CY2yTLKUrUafSQ66C3WRIfhKN1oxYZFWhYC9Ro433TZQliw2V/UJQtW/nw2OkVADF0 EnBp6MXHI2/xJ9foeyfu1xNkXcGh+EVLChbUe2dsmbo13x6sw0/EG07Bkp2GerUUDVMxMy1LenK 1xPc5vdJhhdn6PuBrsudBpPrwcxMRBnOvvSes5GgrY7vgjeNy2WoKfwf6+rJ6MjS+niJhP1iAtt r69br27BHMdya+KClcf2zZsRwYxdlTyLnCn+C7gdLNsQ8VEgYiGqAs629U17Z0SwE8brvpCdhO1 A7Vw== X-Google-Smtp-Source: AGHT+IFCAuyKGJuhTyX6ZuooBD7q96xqjWnZFL4ha5ZXWfSztQb5xMn/u/NW8Lb3k3+ZsG4X/gTdaA== X-Received: by 2002:a17:90b:1c04:b0:340:dd2c:a3da with SMTP id 98e67ed59e1d1-3475ebe6a55mr3680804a91.8.1764104102770; Tue, 25 Nov 2025 12:55:02 -0800 (PST) Received: from hexa.. ([2602:feb4:3b:2100:5e34:462b:e2f0:5898]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3476a5a3099sm322602a91.11.2025.11.25.12.55.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 12:55:02 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 2/9] ruby: fix CVE-2024-35176 Date: Tue, 25 Nov 2025 12:54:45 -0800 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 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 ; Tue, 25 Nov 2025 20:55:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/226777 From: Divya Chellam REXML is an XML toolkit for Ruby. The REXML gem before 3.2.6 has a denial of service vulnerability when it parses an XML that has many `<`s in an attribute value. Those who need to parse untrusted XMLs may be impacted to this vulnerability. The REXML gem 3.2.7 or later include the patch to fix this vulnerability. As a workaround, don't parse untrusted XMLs. Reference: https://nvd.nist.gov/vuln/detail/CVE-2024-35176 Upstream-patch: https://github.com/ruby/rexml/commit/4325835f92f3f142ebd91a3fdba4e1f1ab7f1cfb Signed-off-by: Divya Chellam Signed-off-by: Steve Sakoman --- .../ruby/ruby/CVE-2024-35176.patch | 112 ++++++++++++++++++ meta/recipes-devtools/ruby/ruby_3.1.3.bb | 1 + 2 files changed, 113 insertions(+) create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-35176.patch diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-35176.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-35176.patch new file mode 100644 index 0000000000..83fa3fa4e7 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-35176.patch @@ -0,0 +1,112 @@ +From 4325835f92f3f142ebd91a3fdba4e1f1ab7f1cfb Mon Sep 17 00:00:00 2001 +From: Nobuyoshi Nakada +Date: Thu, 16 May 2024 11:26:51 +0900 +Subject: [PATCH] Read quoted attributes in chunks (#126) + +CVE: CVE-2024-35176 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/4325835f92f3f142ebd91a3fdba4e1f1ab7f1cfb] + +Signed-off-by: Divya Chellam +--- + .../lib/rexml/parsers/baseparser.rb | 20 ++++++------- + .bundle/gems/rexml-3.2.5/lib/rexml/source.rb | 29 +++++++++++++++---- + 2 files changed, 34 insertions(+), 15 deletions(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index b97beb3..eab942d 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -675,17 +675,17 @@ module REXML + message = "Missing attribute equal: <#{name}>" + raise REXML::ParseException.new(message, @source) + end +- unless match = @source.match(/(['"])(.*?)\1\s*/um, true) +- if match = @source.match(/(['"])/, true) +- message = +- "Missing attribute value end quote: <#{name}>: <#{match[1]}>" +- raise REXML::ParseException.new(message, @source) +- else +- message = "Missing attribute value start quote: <#{name}>" +- raise REXML::ParseException.new(message, @source) +- end ++ unless match = @source.match(/(['"])/, true) ++ message = "Missing attribute value start quote: <#{name}>" ++ raise REXML::ParseException.new(message, @source) ++ end ++ quote = match[1] ++ value = @source.read_until(quote) ++ unless value.chomp!(quote) ++ message = "Missing attribute value end quote: <#{name}>: <#{quote}>" ++ raise REXML::ParseException.new(message, @source) + end +- value = match[2] ++ @source.match(/\s*/um, true) + if prefix == "xmlns" + if local_part == "xml" + if value != "http://www.w3.org/XML/1998/namespace" +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb +index 4111d1d..7132147 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb +@@ -65,7 +65,11 @@ module REXML + encoding_updated + end + +- def read ++ def read(term = nil) ++ end ++ ++ def read_until(term) ++ @scanner.scan_until(Regexp.union(term)) or @scanner.rest + end + + def match(pattern, cons=false) +@@ -151,9 +155,9 @@ module REXML + end + end + +- def read ++ def read(term = nil) + begin +- @scanner << readline ++ @scanner << readline(term) + true + rescue Exception, NameError + @source = nil +@@ -161,6 +165,21 @@ module REXML + end + end + ++ def read_until(term) ++ pattern = Regexp.union(term) ++ data = [] ++ begin ++ until str = @scanner.scan_until(pattern) ++ @scanner << readline(term) ++ end ++ rescue EOFError ++ @scanner.rest ++ else ++ read if @scanner.eos? and !@source.eof? ++ str ++ end ++ end ++ + def match( pattern, cons=false ) + read if @scanner.eos? && @source + while true +@@ -205,8 +224,8 @@ module REXML + end + + private +- def readline +- str = @source.readline(@line_break) ++ def readline(term = nil) ++ str = @source.readline(term || @line_break) + if @pending_buffer + if str.nil? + str = @pending_buffer +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby_3.1.3.bb b/meta/recipes-devtools/ruby/ruby_3.1.3.bb index 19641e5a51..6a381b2e40 100644 --- a/meta/recipes-devtools/ruby/ruby_3.1.3.bb +++ b/meta/recipes-devtools/ruby/ruby_3.1.3.bb @@ -53,6 +53,7 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ file://CVE-2024-43398-0003.patch \ file://CVE-2025-27221-0001.patch \ file://CVE-2025-27221-0002.patch \ + file://CVE-2024-35176.patch \ " UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/" From patchwork Tue Nov 25 20:54:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 75381 X-Patchwork-Delegate: steve@sakoman.com 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 12D2BD0EE33 for ; Tue, 25 Nov 2025 20:55:10 +0000 (UTC) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.4188.1764104105948894109 for ; Tue, 25 Nov 2025 12:55:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=gVsA8IAb; spf=softfail (domain: sakoman.com, ip: 209.85.216.50, mailfrom: steve@sakoman.com) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-343774bd9b4so4537110a91.2 for ; Tue, 25 Nov 2025 12:55:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1764104105; x=1764708905; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=awthmEkyCKuPTWRCYTzIZirEYaZ+QUb6+XaRcQ5fv+E=; b=gVsA8IAb3cvFTNVfxn5THJYMiya+05yT6ttxAoHY8T/bZVX785Ti0bAReZNv39o6fo gNXSC9YsfAG0tnX5RABi5la+/9QgUTsTGsPSXCF6nyxeRrD0swlGB7p49UIWIGWKPQ31 GT8X83mEK3+zAb/XSoCUzdeV/FXSfbNMgSOPhZoJVenPX2tat/D6phdUo0bj2k+MtiIV kHTEPefZ887rsCNKFjT8NxY9dACamtp8QLhdF6Ue9PedGV1yqJQtxPh3O0Wq6ieo6CaL ez3vFq5QJWSpOqCkj75Apv7kLGTS0n4uJjRUX3olmjSU4uT5j4DhPRvNDNplos2iQHvo +DHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764104105; x=1764708905; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=awthmEkyCKuPTWRCYTzIZirEYaZ+QUb6+XaRcQ5fv+E=; b=jUnfcWJqjitmB3EOGY1iBFAIlQGht3dOJlwYczRKc8Vw+n65L0b9dlxnIgpG94lPa4 JS7utbyri4OINDaso0EfX/bgSduW1y+9EWbX1OuolfbOCbgceDYyuQ/YYkQnwq/IA/iE YzbcniY6QtNCVKoYVP2NjIKMZEM3EdyfLkR08oboZh+i86uwyZMc0T4Ou4IZPlilli1d 9m0MARy/437s2bK/iUYVXEB2WWQCg5GGSfawg28G5EtVBnXthSc2L7W2j7OCo9Vk/WZ5 1MgpM7fvFb1WjyhuyW5Ted/zUfuyDA036DjHaqg2zhioONpDdt7ByW/EELFuSoRpT95U aDwQ== X-Gm-Message-State: AOJu0Yy6IKYxi1B3BQAb4FJdNpkHz1ZRaac7wam74sDToy41EQjptEB1 wIxe+JQfcUIt5l1oE7AZTwZOR7ERRm3MZ1b7YSpOJIhI/CAGFUeIt8O3rnPcwt6HAHv3N2PmciQ BsLaK X-Gm-Gg: ASbGncvl144VB0O98dQdRKPuXgbzYhAiVIw9NWlwGobZRQMnrs80QvKeY8t1tJdXMS7 SXIwHXKhicJPrYH+aGdo5k9j5D0ZWP/V7jHeAvuuBy2pRgsgCw4LaJz6oqNccTTPs3wlSdXOXv+ QY5Xo9YbxVGjB/bxxotsKK5IHdnmbeTp8YZfBAKuTO9O29D0S/Jl+3jU/w8TYe/RmkKb/ZPwojB +JNWJG8BKQJstf9pN1aivsFEUjozzFCVfsmTMAhWUgnF6kMNTF3LfJF5B6bbXIbz91cnpFiohTJ bcOTGQI48JzmBXJLEgElt5ujJp8ZzqTvvh1J7sp8zlNkBF+RZ7siWJvFFzEyBa56jlROGymr+PP 5gMTdIAY26PGcMAqwkjHhc+mDpmUO1H/S/uGTZ/73LVS4O9h2P9u0hXVsRGNd8jcAK/A+rCnHQp HEOw== X-Google-Smtp-Source: AGHT+IGQ4FXJ72DcpdxQbp8pOStk/pDTafQYMazGdoI/l8JKEfJi8TwDIpf3CYWaxK852xkJKUi9vA== X-Received: by 2002:a17:90b:2b50:b0:343:653d:31c with SMTP id 98e67ed59e1d1-34733e4cb69mr13690960a91.5.1764104104514; Tue, 25 Nov 2025 12:55:04 -0800 (PST) Received: from hexa.. ([2602:feb4:3b:2100:5e34:462b:e2f0:5898]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3476a5a3099sm322602a91.11.2025.11.25.12.55.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 12:55:04 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 3/9] ruby: fix CVE-2024-39908 Date: Tue, 25 Nov 2025 12:54:46 -0800 Message-ID: <6e0b70843422cd7cdb25a9e1520dd64bf701fea6.1764103986.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 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 ; Tue, 25 Nov 2025 20:55:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/226778 From: Divya Chellam REXML is an XML toolkit for Ruby. The REXML gem before 3.3.1 has some DoS vulnerabilities when it parses an XML that has many specific characters such as `<`, `0` and `%>`. If you need to parse untrusted XMLs, you many be impacted to these vulnerabilities. The REXML gem 3.3.2 or later include the patches to fix these vulnerabilities. Users are advised to upgrade. Users unable to upgrade should avoid parsing untrusted XML strings. Reference: https://security-tracker.debian.org/tracker/CVE-2024-39908 Upstream-patches: https://github.com/ruby/rexml/commit/f1df7d13b3e57a5e059273d2f0870163c08d7420 https://github.com/ruby/rexml/commit/d146162e9a61574499d10428bc0065754cd26601 https://github.com/ruby/rexml/commit/b5bf109a599ea733663150e99c09eb44046b41dd https://github.com/ruby/rexml/commit/b8a5f4cd5c8fe29c65d7a00e67170223d9d2b50e https://github.com/ruby/rexml/commit/0af55fa49d4c9369f90f239a9571edab800ed36e https://github.com/ruby/rexml/commit/c1b64c174ec2e8ca2174c51332670e3be30c865f https://github.com/ruby/rexml/commit/9f1415a2616c77cad44a176eee90e8457b4774b6 https://github.com/ruby/rexml/commit/c33ea498102be65082940e8b7d6d31cb2c6e6ee2 https://github.com/ruby/rexml/commit/a79ac8b4b42a9efabe33a0be31bd82d33fd50347 https://github.com/ruby/rexml/commit/67efb5951ed09dbb575c375b130a1e469f437d1f https://github.com/ruby/rexml/commit/1f1e6e9b40bf339894e843dfd679c2fb1a5ddbf2 https://github.com/ruby/rexml/commit/910e5a2b487cb5a30989884a39f9cad2cc499cfc Signed-off-by: Divya Chellam Signed-off-by: Steve Sakoman --- .../ruby/ruby/CVE-2024-39908-0001.patch | 46 +++++++ .../ruby/ruby/CVE-2024-39908-0002.patch | 130 ++++++++++++++++++ .../ruby/ruby/CVE-2024-39908-0003.patch | 46 +++++++ .../ruby/ruby/CVE-2024-39908-0004.patch | 76 ++++++++++ .../ruby/ruby/CVE-2024-39908-0005.patch | 87 ++++++++++++ .../ruby/ruby/CVE-2024-39908-0006.patch | 44 ++++++ .../ruby/ruby/CVE-2024-39908-0007.patch | 44 ++++++ .../ruby/ruby/CVE-2024-39908-0008.patch | 44 ++++++ .../ruby/ruby/CVE-2024-39908-0009.patch | 36 +++++ .../ruby/ruby/CVE-2024-39908-0010.patch | 53 +++++++ .../ruby/ruby/CVE-2024-39908-0011.patch | 35 +++++ .../ruby/ruby/CVE-2024-39908-0012.patch | 36 +++++ meta/recipes-devtools/ruby/ruby_3.1.3.bb | 12 ++ 13 files changed, 689 insertions(+) create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0001.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0002.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0003.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0004.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0005.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0006.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0007.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0008.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0009.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0010.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0011.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0012.patch diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0001.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0001.patch new file mode 100644 index 0000000000..44d3e1dffe --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0001.patch @@ -0,0 +1,46 @@ +From f1df7d13b3e57a5e059273d2f0870163c08d7420 Mon Sep 17 00:00:00 2001 +From: Sutou Kouhei +Date: Mon, 20 May 2024 12:17:27 +0900 +Subject: [PATCH] Add support for old strscan + +Fix GH-132 + +If we support old strscan, users can also use strscan installed as a +default gem. + +Reported by Adam. Thanks!!! + +CVE: CVE-2024-39908 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/f1df7d13b3e57a5e059273d2f0870163c08d7420] + +Signed-off-by: Divya Chellam +--- + .../gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index eab942d..8ea8b43 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -7,6 +7,17 @@ require "strscan" + + module REXML + module Parsers ++ if StringScanner::Version < "3.0.8" ++ module StringScannerCaptures ++ refine StringScanner do ++ def captures ++ values_at(*(1...size)) ++ end ++ end ++ end ++ using StringScannerCaptures ++ end ++ + # = Using the Pull Parser + # This API is experimental, and subject to change. + # parser = PullParser.new( "texttxet" ) +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0002.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0002.patch new file mode 100644 index 0000000000..25a9e70891 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0002.patch @@ -0,0 +1,130 @@ +From d146162e9a61574499d10428bc0065754cd26601 Mon Sep 17 00:00:00 2001 +From: NAITOH Jun +Date: Mon, 4 Mar 2024 05:24:53 +0900 +Subject: [PATCH] Remove `Source#string=` method (#117) + +We want to just change scan pointer. + +https://github.com/ruby/rexml/pull/114#discussion_r1501773803 +> I want to just change scan pointer (`StringScanner#pos=`) instead of +changing `@scanner.string`. + +CVE: CVE-2024-39908 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/d146162e9a61574499d10428bc0065754cd26601] + +Signed-off-by: Divya Chellam +--- + .../lib/rexml/parsers/baseparser.rb | 19 +++++++++++-------- + .bundle/gems/rexml-3.2.5/lib/rexml/source.rb | 8 ++++++-- + 2 files changed, 17 insertions(+), 10 deletions(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index 8ea8b43..81415a8 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -231,8 +231,9 @@ module REXML + #STDERR.puts @source.encoding + #STDERR.puts "BUFFER = #{@source.buffer.inspect}" + if @document_status == nil ++ start_position = @source.position + if @source.match("/um, true)[1] ] +@@ -244,7 +245,7 @@ module REXML + else + message = "#{base_error_message}: invalid name" + end +- @source.string = "/um, true) +@@ -344,7 +346,7 @@ module REXML + else + message = "#{base_error_message}: invalid name" + end +- @source.string = " +Date: Thu, 13 Jun 2024 15:12:32 +0900 +Subject: [PATCH] Add a "malformed comment" check for top-level comments (#145) + +This check was missing. Therefore, `REXML::Document.new("/um, true)[1] ] ++ md = @source.match(/(.*?)-->/um, true) ++ if md.nil? ++ raise REXML::ParseException.new("Unclosed comment", @source) ++ end ++ if /--|-\z/.match?(md[1]) ++ raise REXML::ParseException.new("Malformed comment", @source) ++ end ++ return [ :comment, md[1] ] + elsif @source.match("DOCTYPE", true) + base_error_message = "Malformed DOCTYPE" + unless @source.match(/\s+/um, true) +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0004.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0004.patch new file mode 100644 index 0000000000..11a4c1ca54 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0004.patch @@ -0,0 +1,76 @@ +From b8a5f4cd5c8fe29c65d7a00e67170223d9d2b50e Mon Sep 17 00:00:00 2001 +From: Watson +Date: Tue, 16 Jul 2024 10:48:53 +0900 +Subject: [PATCH] Fix performance issue caused by using repeated `>` characters + inside ` +--- + .bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb | 3 ++- + .bundle/gems/rexml-3.2.5/lib/rexml/source.rb | 6 +++--- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index 49c313c..767e134 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -125,6 +125,7 @@ module REXML + + module Private + INSTRUCTION_END = /#{NAME}(\s+.*?)?\?>/um ++ INSTRUCTION_TERM = "?>" + TAG_PATTERN = /((?>#{QNAME_STR}))\s*/um + CLOSE_PATTERN = /(#{QNAME_STR})\s*>/um + ATTLISTDECL_END = /\s+#{NAME}(?:#{ATTDEF})*\s*>/um +@@ -652,7 +653,7 @@ module REXML + end + + def process_instruction(start_position) +- match_data = @source.match(INSTRUCTION_END, true) ++ match_data = @source.match(Private::INSTRUCTION_END, true, term: Private::INSTRUCTION_TERM) + unless match_data + message = "Invalid processing instruction node" + @source.position = start_position +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb +index b20cc4f..08a035c 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb +@@ -72,7 +72,7 @@ module REXML + @scanner.scan_until(Regexp.union(term)) or @scanner.rest + end + +- def match(pattern, cons=false) ++ def match(pattern, cons=false, term: nil) + if cons + @scanner.scan(pattern).nil? ? nil : @scanner + else +@@ -184,7 +184,7 @@ module REXML + end + end + +- def match( pattern, cons=false ) ++ def match( pattern, cons=false, term: nil ) + read if @scanner.eos? && @source + while true + if cons +@@ -195,7 +195,7 @@ module REXML + break if md + return nil if pattern.is_a?(String) && pattern.bytesize <= @scanner.rest_size + return nil if @source.nil? +- return nil unless read ++ return nil unless read(term) + end + + md.nil? ? nil : @scanner +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0005.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0005.patch new file mode 100644 index 0000000000..0726927865 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0005.patch @@ -0,0 +1,87 @@ +From 0af55fa49d4c9369f90f239a9571edab800ed36e Mon Sep 17 00:00:00 2001 +From: Watson +Date: Tue, 16 Jul 2024 10:57:39 +0900 +Subject: [PATCH] Fix ReDoS caused by very large character references using + repeated 0s (#169) + +This patch will fix the ReDoS that is caused by large string of 0s on a +character reference (like `�...`). + +This is occurred in Ruby 3.1 or earlier. + +CVE: CVE-2024-39908 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/0af55fa49d4c9369f90f239a9571edab800ed36e] + +Signed-off-by: Divya Chellam +--- + .bundle/gems/rexml-3.2.5/lib/rexml/text.rb | 48 +++++++++++++++------- + 1 file changed, 34 insertions(+), 14 deletions(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/text.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/text.rb +index 050b09c..0957d70 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/text.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/text.rb +@@ -151,25 +151,45 @@ module REXML + end + end + +- # context sensitive +- string.scan(pattern) do +- if $1[-1] != ?; +- raise "Illegal character #{$1.inspect} in raw string #{string.inspect}" +- elsif $1[0] == ?& +- if $5 and $5[0] == ?# +- case ($5[1] == ?x ? $5[2..-1].to_i(16) : $5[1..-1].to_i) +- when *VALID_CHAR ++ pos = 0 ++ while (index = string.index(/<|&/, pos)) ++ if string[index] == "<" ++ raise "Illegal character \"#{string[index]}\" in raw string #{string.inspect}" ++ end ++ ++ unless (end_index = string.index(/[^\s];/, index + 1)) ++ raise "Illegal character \"#{string[index]}\" in raw string #{string.inspect}" ++ end ++ ++ value = string[(index + 1)..end_index] ++ if /\s/.match?(value) ++ raise "Illegal character \"#{string[index]}\" in raw string #{string.inspect}" ++ end ++ ++ if value[0] == "#" ++ character_reference = value[1..-1] ++ ++ unless (/\A(\d+|x[0-9a-fA-F]+)\z/.match?(character_reference)) ++ if character_reference[0] == "x" || character_reference[-1] == "x" ++ raise "Illegal character \"#{string[index]}\" in raw string #{string.inspect}" + else +- raise "Illegal character #{$1.inspect} in raw string #{string.inspect}" ++ raise "Illegal character #{string.inspect} in raw string #{string.inspect}" + end +- # FIXME: below can't work but this needs API change. +- # elsif @parent and $3 and !SUBSTITUTES.include?($1) +- # if !doctype or !doctype.entities.has_key?($3) +- # raise "Undeclared entity '#{$1}' in raw string \"#{string}\"" +- # end + end ++ ++ case (character_reference[0] == "x" ? character_reference[1..-1].to_i(16) : character_reference[0..-1].to_i) ++ when *VALID_CHAR ++ else ++ raise "Illegal character #{string.inspect} in raw string #{string.inspect}" ++ end ++ elsif !(/\A#{Entity::NAME}\z/um.match?(value)) ++ raise "Illegal character \"#{string[index]}\" in raw string #{string.inspect}" + end ++ ++ pos = end_index + 1 + end ++ ++ string + end + + def node_type +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0006.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0006.patch new file mode 100644 index 0000000000..9d78112edd --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0006.patch @@ -0,0 +1,44 @@ +From c1b64c174ec2e8ca2174c51332670e3be30c865f Mon Sep 17 00:00:00 2001 +From: Watson +Date: Tue, 16 Jul 2024 10:57:50 +0900 +Subject: [PATCH] Fix performance issue caused by using repeated `>` characters + inside comments (#171) + +A `<` is treated as a string delimiter. +In certain cases, if `<` is used in succession, read and match are +repeated, which slows down the process. Therefore, the following is used +to read ahead to a specific part of the string in advance. + +CVE: CVE-2024-39908 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/c1b64c174ec2e8ca2174c51332670e3be30c865f] + +Signed-off-by: Divya Chellam +--- + .bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index 767e134..81753ad 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -126,6 +126,7 @@ module REXML + module Private + INSTRUCTION_END = /#{NAME}(\s+.*?)?\?>/um + INSTRUCTION_TERM = "?>" ++ COMMENT_TERM = "-->" + TAG_PATTERN = /((?>#{QNAME_STR}))\s*/um + CLOSE_PATTERN = /(#{QNAME_STR})\s*>/um + ATTLISTDECL_END = /\s+#{NAME}(?:#{ATTDEF})*\s*>/um +@@ -237,7 +238,7 @@ module REXML + return process_instruction(start_position) + elsif @source.match("/um, true) ++ md = @source.match(/(.*?)-->/um, true, term: Private::COMMENT_TERM) + if md.nil? + raise REXML::ParseException.new("Unclosed comment", @source) + end +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0007.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0007.patch new file mode 100644 index 0000000000..bb2325bbbd --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0007.patch @@ -0,0 +1,44 @@ +From 9f1415a2616c77cad44a176eee90e8457b4774b6 Mon Sep 17 00:00:00 2001 +From: Watson +Date: Tue, 16 Jul 2024 11:04:40 +0900 +Subject: [PATCH] Fix performance issue caused by using repeated `>` characters + inside `CDATA [ PAYLOAD ]` (#172) + +A `<` is treated as a string delimiter. +In certain cases, if `<` is used in succession, read and match are +repeated, which slows down the process. Therefore, the following is used +to read ahead to a specific part of the string in advance. + +CVE: CVE-2024-39908 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/9f1415a2616c77cad44a176eee90e8457b4774b6] + +Signed-off-by: Divya Chellam +--- + .bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index 81753ad..c907f8c 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -127,6 +127,7 @@ module REXML + INSTRUCTION_END = /#{NAME}(\s+.*?)?\?>/um + INSTRUCTION_TERM = "?>" + COMMENT_TERM = "-->" ++ CDATA_TERM = "]]>" + TAG_PATTERN = /((?>#{QNAME_STR}))\s*/um + CLOSE_PATTERN = /(#{QNAME_STR})\s*>/um + ATTLISTDECL_END = /\s+#{NAME}(?:#{ATTDEF})*\s*>/um +@@ -416,7 +417,7 @@ module REXML + + return [ :comment, md[1] ] if md + else +- md = @source.match(/\[CDATA\[(.*?)\]\]>/um, true) ++ md = @source.match(/\[CDATA\[(.*?)\]\]>/um, true, term: Private::CDATA_TERM) + return [ :cdata, md[1] ] if md + end + raise REXML::ParseException.new( "Declarations can only occur "+ +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0008.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0008.patch new file mode 100644 index 0000000000..e9413ba2c0 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0008.patch @@ -0,0 +1,44 @@ +From c33ea498102be65082940e8b7d6d31cb2c6e6ee2 Mon Sep 17 00:00:00 2001 +From: Watson +Date: Tue, 16 Jul 2024 11:11:17 +0900 +Subject: [PATCH] Fix performance issue caused by using repeated `>` characters + after ` +--- + .bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index c907f8c..5391e0a 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -128,6 +128,7 @@ module REXML + INSTRUCTION_TERM = "?>" + COMMENT_TERM = "-->" + CDATA_TERM = "]]>" ++ DOCTYPE_TERM = "]>" + TAG_PATTERN = /((?>#{QNAME_STR}))\s*/um + CLOSE_PATTERN = /(#{QNAME_STR})\s*>/um + ATTLISTDECL_END = /\s+#{NAME}(?:#{ATTDEF})*\s*>/um +@@ -375,7 +376,7 @@ module REXML + end + return [ :comment, md[1] ] if md + end +- elsif match = @source.match(/(%.*?;)\s*/um, true) ++ elsif match = @source.match(/(%.*?;)\s*/um, true, term: Private::DOCTYPE_TERM) + return [ :externalentity, match[1] ] + elsif @source.match(/\]\s*>/um, true) + @document_status = :after_doctype +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0009.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0009.patch new file mode 100644 index 0000000000..1de0551879 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0009.patch @@ -0,0 +1,36 @@ +From a79ac8b4b42a9efabe33a0be31bd82d33fd50347 Mon Sep 17 00:00:00 2001 +From: Watson +Date: Tue, 16 Jul 2024 11:18:11 +0900 +Subject: [PATCH] Fix performance issue caused by using repeated `>` characters + inside `]>` (#174) + +A `<` is treated as a string delimiter. +In certain cases, if `<` is used in succession, read and match are +repeated, which slows down the process. Therefore, the following is used +to read ahead to a specific part of the string in advance. + +CVE: CVE-2024-39908 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/a79ac8b4b42a9efabe33a0be31bd82d33fd50347] + +Signed-off-by: Divya Chellam +--- + .bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index 5391e0a..c22b632 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -369,7 +369,7 @@ module REXML + raise REXML::ParseException.new(message, @source) + end + return [:notationdecl, name, *id] +- elsif md = @source.match(/--(.*?)-->/um, true) ++ elsif md = @source.match(/--(.*?)-->/um, true, term: Private::COMMENT_TERM) + case md[1] + when /--/, /-\z/ + raise REXML::ParseException.new("Malformed comment", @source) +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0010.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0010.patch new file mode 100644 index 0000000000..a46ba171de --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0010.patch @@ -0,0 +1,53 @@ +From 67efb5951ed09dbb575c375b130a1e469f437d1f Mon Sep 17 00:00:00 2001 +From: Watson +Date: Tue, 16 Jul 2024 11:26:57 +0900 +Subject: [PATCH] Fix performance issue caused by using repeated `>` characters + inside `]>` (#175) + +A `<` is treated as a string delimiter. +In certain cases, if `<` is used in succession, read and match are +repeated, which slows down the process. Therefore, the following is used +to read ahead to a specific part of the string in advance. + +CVE: CVE-2024-39908 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/67efb5951ed09dbb575c375b130a1e469f437d1f] + +Signed-off-by: Divya Chellam +--- + .bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index c22b632..c4de254 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -124,11 +124,15 @@ module REXML + } + + module Private +- INSTRUCTION_END = /#{NAME}(\s+.*?)?\?>/um ++ # Terminal requires two or more letters. + INSTRUCTION_TERM = "?>" + COMMENT_TERM = "-->" + CDATA_TERM = "]]>" + DOCTYPE_TERM = "]>" ++ # Read to the end of DOCTYPE because there is no proper ENTITY termination ++ ENTITY_TERM = DOCTYPE_TERM ++ ++ INSTRUCTION_END = /#{NAME}(\s+.*?)?\?>/um + TAG_PATTERN = /((?>#{QNAME_STR}))\s*/um + CLOSE_PATTERN = /(#{QNAME_STR})\s*>/um + ATTLISTDECL_END = /\s+#{NAME}(?:#{ATTDEF})*\s*>/um +@@ -304,7 +308,7 @@ module REXML + raise REXML::ParseException.new( "Bad ELEMENT declaration!", @source ) if md.nil? + return [ :elementdecl, " +Date: Tue, 16 Jul 2024 11:35:41 +0900 +Subject: [PATCH] Fix ReDoS by using repeated space characters inside + `]>` (#176) + +Fix performance by removing unnecessary spaces. + +This is occurred in Ruby 3.1 or earlier. + +CVE: CVE-2024-39908 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/1f1e6e9b40bf339894e843dfd679c2fb1a5ddbf2] + +Signed-off-by: Divya Chellam +--- + .bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index c4de254..a9b1b44 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -340,7 +340,7 @@ module REXML + contents = md[0] + + pairs = {} +- values = md[0].scan( ATTDEF_RE ) ++ values = md[0].strip.scan( ATTDEF_RE ) + values.each do |attdef| + unless attdef[3] == "#IMPLIED" + attdef.compact! +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0012.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0012.patch new file mode 100644 index 0000000000..5a7cbe18dc --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-39908-0012.patch @@ -0,0 +1,36 @@ +From 910e5a2b487cb5a30989884a39f9cad2cc499cfc Mon Sep 17 00:00:00 2001 +From: Watson +Date: Tue, 16 Jul 2024 11:36:05 +0900 +Subject: [PATCH] Fix performance issue caused by using repeated `>` characters + inside `` (#177) + +A `<` is treated as a string delimiter. +In certain cases, if `<` is used in succession, read and match are +repeated, which slows down the process. Therefore, the following is used +to read ahead to a specific part of the string in advance. + +CVE: CVE-2024-39908 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/910e5a2b487cb5a30989884a39f9cad2cc499cfc] + +Signed-off-by: Divya Chellam +--- + .bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index a9b1b44..4864ba1 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -413,7 +413,7 @@ module REXML + #STDERR.puts "SOURCE BUFFER = #{source.buffer}, #{source.buffer.size}" + raise REXML::ParseException.new("Malformed node", @source) unless md + if md[0][0] == ?- +- md = @source.match(/--(.*?)-->/um, true) ++ md = @source.match(/--(.*?)-->/um, true, term: Private::COMMENT_TERM) + + case md[1] + when /--/, /-\z/ +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby_3.1.3.bb b/meta/recipes-devtools/ruby/ruby_3.1.3.bb index 6a381b2e40..f967cc6948 100644 --- a/meta/recipes-devtools/ruby/ruby_3.1.3.bb +++ b/meta/recipes-devtools/ruby/ruby_3.1.3.bb @@ -54,6 +54,18 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ file://CVE-2025-27221-0001.patch \ file://CVE-2025-27221-0002.patch \ file://CVE-2024-35176.patch \ + file://CVE-2024-39908-0001.patch \ + file://CVE-2024-39908-0002.patch \ + file://CVE-2024-39908-0003.patch \ + file://CVE-2024-39908-0004.patch \ + file://CVE-2024-39908-0005.patch \ + file://CVE-2024-39908-0006.patch \ + file://CVE-2024-39908-0007.patch \ + file://CVE-2024-39908-0008.patch \ + file://CVE-2024-39908-0009.patch \ + file://CVE-2024-39908-0010.patch \ + file://CVE-2024-39908-0011.patch \ + file://CVE-2024-39908-0012.patch \ " UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/" From patchwork Tue Nov 25 20:54:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 75380 X-Patchwork-Delegate: steve@sakoman.com 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 043B5D0EE30 for ; Tue, 25 Nov 2025 20:55:10 +0000 (UTC) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.4189.1764104107203371457 for ; Tue, 25 Nov 2025 12:55:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=mg8HuFmb; spf=softfail (domain: sakoman.com, ip: 209.85.210.175, mailfrom: steve@sakoman.com) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-7b86e0d9615so7144269b3a.0 for ; Tue, 25 Nov 2025 12:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1764104106; x=1764708906; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VNBr/xRHhdUTWxaWtf9rqRKYKyFn1ZspDaF6qsBy398=; b=mg8HuFmbgv29NKqOztAFBa8jkbtzFlAJEykgzU1CstaarXy3bU2GHWPfsPlapWz7N9 bOllnxlNgp4OZ3JIJHAHuUlUzQz82TEtZagvhw2+8Y0Zd3NhbmjMEeIy5ElYugZiNvAh 3i+dV+zsouaMyFyo2aX/HjkDxEu6JoElIGCdGpDILk4IY5cQfl4+kgpiMGTqVsb5yDA+ yfqseBXU0ZU/DgrLSLkSxBz8Dj1X/14PMD/YvinzTJ2txFajNQXcIQ/LUqaQe1tQaxUX l64j9t79jlQudRvgsiwWFA0Xf59dt2ZGWlGykqRrXlY/xl6pjR+qD573c50KtIDK9xlZ TN0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764104106; x=1764708906; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=VNBr/xRHhdUTWxaWtf9rqRKYKyFn1ZspDaF6qsBy398=; b=vcKfrnWpR8k+aIZq3AbtCzLeY4n9Yz0TRvRQeRRzjEMBibDnKqXKNzsqZ1c7HTT8sa uH7dSkXHHzkWiOuFrvoWUOik4J2ZZeqBfC/V2Bcozzt2x9BOrZ7z+i0PS/jHcpUBaICj 1NKQdlYmkMplhmevOchtgh7u8EJqtlK3KAEuPmaghJBo82qEj1tUUqt+u4tKzA5i4ppf OH/Zb5iJCBbzkefnjUSS0cVlgM8y/mQQ/PpD3k0g4gmO8Y7p8sg45GWMZXA6Xw3bg3ZF gNiL/5uy/tcPUyhEEJXh8Gm6gT3pOCVQTkPLP4THHZUH7It66sKKTuS0datPKkcGlqIq Pxmw== X-Gm-Message-State: AOJu0Yz7jnQlCQPHB468slG/rK3iqb0b3aa3BzfFZZ6JTnL7GQVDszD6 Col6bjYYQ2TouaXPWFsAqy8B61+1fXAy/uHLxDVyoaKs3f2Ht/I1pul4VAYN9zlJvwRGKVTJeWN Xwiz1 X-Gm-Gg: ASbGnctVd575yldVCHMaTPsW4k/7cbHOstmqQMwGMglksdlgdNNgv3OCmdmGR/RjH3v ya5EG1dg2WEwgRM+ze9ADEAF7kCml+gxmXZ8BEZDDr4boL2MScDnJa2KDN0baNVZ99uF5IoBjR8 4n99MHvqzz0aTb13+5W8Pol83akwkPj6HKFvc9tH7XLYV1mKKcwqv0t8WTpePG7+iWxLKaG4+k5 rL9jr2jdLvbJuMU4NODGcxwhesCR07tJqg+Td6K6aG0c+hCn3ZQtUl2byu1vhWdHF7ooTIwP6uf RYk6ofWj3khnHIEp7rj/jk8kYo3xsJ5rJo6n0L6br/Ck9ULRlODxqxZf1g1xamGnlahxSVZBtmY qQbAdCT5pLUhAPd4+vDhE1yWoe13fEmRQD9DVkt0DccvYt80EfR7XD3goTSFV7Re+4CphNCONdn MQMg== X-Google-Smtp-Source: AGHT+IGPICY8vCniGWiYtBaul6f6KL3QLdD6RvPgHrAcuQ7aoqPnqGGPmCNF0ObPFrSIW6w6B+vQ2w== X-Received: by 2002:a05:6a20:2586:b0:35d:bb66:5ce3 with SMTP id adf61e73a8af0-3614eaf59b5mr18894868637.12.1764104106155; Tue, 25 Nov 2025 12:55:06 -0800 (PST) Received: from hexa.. ([2602:feb4:3b:2100:5e34:462b:e2f0:5898]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3476a5a3099sm322602a91.11.2025.11.25.12.55.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 12:55:05 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 4/9] ruby: fix CVE-2024-41123 Date: Tue, 25 Nov 2025 12:54:47 -0800 Message-ID: <6b2a2e689a69deef6098f6c266542234e46fb24b.1764103986.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 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 ; Tue, 25 Nov 2025 20:55:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/226779 From: Divya Chellam REXML is an XML toolkit for Ruby. The REXML gem before 3.3.2 has some DoS vulnerabilities when it parses an XML that has many specific characters such as whitespace character, `>]` and `]>`. The REXML gem 3.3.3 or later include the patches to fix these vulnerabilities. Reference: https://nvd.nist.gov/vuln/detail/CVE-2024-41123 Upstream-patches: https://github.com/ruby/rexml/commit/2c39c91a65d69357cfbc35dd8079b3606d86bb70 https://github.com/ruby/rexml/commit/4444a04ece4c02a7bd51e8c75623f22dc12d882b https://github.com/ruby/rexml/commit/ebc3e85bfa2796fb4922c1932760bec8390ff87c https://github.com/ruby/rexml/commit/6cac15d45864c8d70904baa5cbfcc97181000960 https://github.com/ruby/rexml/commit/e2546e6ecade16b04c9ee528e5be8509fe16c2d6 Signed-off-by: Divya Chellam Signed-off-by: Steve Sakoman --- .../ruby/ruby/CVE-2024-41123-0001.patch | 44 +++++ .../ruby/ruby/CVE-2024-41123-0002.patch | 37 ++++ .../ruby/ruby/CVE-2024-41123-0003.patch | 55 ++++++ .../ruby/ruby/CVE-2024-41123-0004.patch | 163 ++++++++++++++++++ .../ruby/ruby/CVE-2024-41123-0005.patch | 111 ++++++++++++ meta/recipes-devtools/ruby/ruby_3.1.3.bb | 5 + 6 files changed, 415 insertions(+) create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0001.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0002.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0003.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0004.patch create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0005.patch diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0001.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0001.patch new file mode 100644 index 0000000000..c9d7ed2626 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0001.patch @@ -0,0 +1,44 @@ +From 2c39c91a65d69357cfbc35dd8079b3606d86bb70 Mon Sep 17 00:00:00 2001 +From: Watson +Date: Fri, 19 Jul 2024 17:15:15 +0900 +Subject: [PATCH] Fix method scope in test in order to invoke the tests + properly and fix exception message (#182) + +This PR includes following two fixes. + +1. The `test_empty` and `test_linear_performance_gt` were defined as +private method. Seems that test-unit runner does not invoke private +methods even if the methods have `test_` prefix. +2. When parse malformed entity declaration, the exception might have the +message about `NoMethodError`. The proper exception message will be +contained by this fix. + +CVE: CVE-2024-41123 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/2c39c91a65d69357cfbc35dd8079b3606d86bb70] + +Signed-off-by: Divya Chellam +--- + .bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index 4864ba1..451fbf8 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -308,7 +308,11 @@ module REXML + raise REXML::ParseException.new( "Bad ELEMENT declaration!", @source ) if md.nil? + return [ :elementdecl, " +Date: Sun, 2 Jun 2024 16:59:16 +0900 +Subject: [PATCH] Add missing encode for custom term + +CVE: CVE-2024-41123 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/4444a04ece4c02a7bd51e8c75623f22dc12d882b] + +Signed-off-by: Divya Chellam +--- + .bundle/gems/rexml-3.2.5/lib/rexml/source.rb | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb +index 08a035c..7be430a 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb +@@ -160,6 +160,7 @@ module REXML + end + + def read(term = nil) ++ term = encode(term) if term + begin + @scanner << readline(term) + true +@@ -171,6 +172,7 @@ module REXML + + def read_until(term) + pattern = Regexp.union(term) ++ term = encode(term) + data = [] + begin + until str = @scanner.scan_until(pattern) +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0003.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0003.patch new file mode 100644 index 0000000000..d31b77efbf --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0003.patch @@ -0,0 +1,55 @@ +From ebc3e85bfa2796fb4922c1932760bec8390ff87c Mon Sep 17 00:00:00 2001 +From: NAITOH Jun +Date: Mon, 8 Jul 2024 05:54:06 +0900 +Subject: [PATCH] Add position check for XML declaration (#162) + +XML declaration must be the first item. + +https://www.w3.org/TR/2006/REC-xml11-20060816/#document + +``` +[1] document ::= ( prolog element Misc* ) - ( Char* RestrictedChar Char* ) +``` + +https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-prolog + +``` +[22] prolog ::= XMLDecl Misc* (doctypedecl Misc*)? +``` + +https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-XMLDecl + +``` +[23] XMLDecl ::= '' +``` + +See: https://github.com/ruby/rexml/pull/161#discussion_r1666118193 + +CVE: CVE-2024-41123 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/ebc3e85bfa2796fb4922c1932760bec8390ff87c] + +Signed-off-by: Divya Chellam +--- + .bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index 451fbf8..71fce99 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -670,7 +670,10 @@ module REXML + @source.position = start_position + raise REXML::ParseException.new(message, @source) + end +- if @document_status.nil? and match_data[1] == "xml" ++ if match_data[1] == "xml" ++ if @document_status ++ raise ParseException.new("Malformed XML: XML declaration is not at the start", @source) ++ end + content = match_data[2] + version = VERSION.match(content) + version = version[1] unless version.nil? +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0004.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0004.patch new file mode 100644 index 0000000000..4d7603a5b9 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0004.patch @@ -0,0 +1,163 @@ +From 6cac15d45864c8d70904baa5cbfcc97181000960 Mon Sep 17 00:00:00 2001 +From: tomoya ishida +Date: Thu, 1 Aug 2024 09:21:19 +0900 +Subject: [PATCH] Fix source.match performance without specifying term string + (#186) + +Performance problem of `source.match(regexp)` was recently fixed by +specifying terminator string. However, I think maintaining appropriate +terminator string for a regexp is hard. +I propose solving this performance issue by increasing bytes to read in +each iteration. + +CVE: CVE-2024-41123 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/6cac15d45864c8d70904baa5cbfcc97181000960] + +Signed-off-by: Divya Chellam +--- + .../lib/rexml/parsers/baseparser.rb | 22 ++++++------------ + .bundle/gems/rexml-3.2.5/lib/rexml/source.rb | 23 +++++++++++++++---- + 2 files changed, 25 insertions(+), 20 deletions(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index 71fce99..c1a22b8 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -124,14 +124,6 @@ module REXML + } + + module Private +- # Terminal requires two or more letters. +- INSTRUCTION_TERM = "?>" +- COMMENT_TERM = "-->" +- CDATA_TERM = "]]>" +- DOCTYPE_TERM = "]>" +- # Read to the end of DOCTYPE because there is no proper ENTITY termination +- ENTITY_TERM = DOCTYPE_TERM +- + INSTRUCTION_END = /#{NAME}(\s+.*?)?\?>/um + TAG_PATTERN = /((?>#{QNAME_STR}))\s*/um + CLOSE_PATTERN = /(#{QNAME_STR})\s*>/um +@@ -244,7 +236,7 @@ module REXML + return process_instruction(start_position) + elsif @source.match("/um, true, term: Private::COMMENT_TERM) ++ md = @source.match(/(.*?)-->/um, true) + if md.nil? + raise REXML::ParseException.new("Unclosed comment", @source) + end +@@ -308,7 +300,7 @@ module REXML + raise REXML::ParseException.new( "Bad ELEMENT declaration!", @source ) if md.nil? + return [ :elementdecl, "/um, true, term: Private::COMMENT_TERM) ++ elsif md = @source.match(/--(.*?)-->/um, true) + case md[1] + when /--/, /-\z/ + raise REXML::ParseException.new("Malformed comment", @source) + end + return [ :comment, md[1] ] if md + end +- elsif match = @source.match(/(%.*?;)\s*/um, true, term: Private::DOCTYPE_TERM) ++ elsif match = @source.match(/(%.*?;)\s*/um, true) + return [ :externalentity, match[1] ] + elsif @source.match(/\]\s*>/um, true) + @document_status = :after_doctype +@@ -417,7 +409,7 @@ module REXML + #STDERR.puts "SOURCE BUFFER = #{source.buffer}, #{source.buffer.size}" + raise REXML::ParseException.new("Malformed node", @source) unless md + if md[0][0] == ?- +- md = @source.match(/--(.*?)-->/um, true, term: Private::COMMENT_TERM) ++ md = @source.match(/--(.*?)-->/um, true) + + case md[1] + when /--/, /-\z/ +@@ -426,7 +418,7 @@ module REXML + + return [ :comment, md[1] ] if md + else +- md = @source.match(/\[CDATA\[(.*?)\]\]>/um, true, term: Private::CDATA_TERM) ++ md = @source.match(/\[CDATA\[(.*?)\]\]>/um, true) + return [ :cdata, md[1] ] if md + end + raise REXML::ParseException.new( "Declarations can only occur "+ +@@ -664,7 +656,7 @@ module REXML + end + + def process_instruction(start_position) +- match_data = @source.match(Private::INSTRUCTION_END, true, term: Private::INSTRUCTION_TERM) ++ match_data = @source.match(Private::INSTRUCTION_END, true) + unless match_data + message = "Invalid processing instruction node" + @source.position = start_position +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb +index 7be430a..7c05cb5 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb +@@ -72,7 +72,7 @@ module REXML + @scanner.scan_until(Regexp.union(term)) or @scanner.rest + end + +- def match(pattern, cons=false, term: nil) ++ def match(pattern, cons=false) + if cons + @scanner.scan(pattern).nil? ? nil : @scanner + else +@@ -159,10 +159,20 @@ module REXML + end + end + +- def read(term = nil) ++ def read(term = nil, min_bytes = 1) + term = encode(term) if term + begin +- @scanner << readline(term) ++ str = readline(term) ++ @scanner << str ++ read_bytes = str.bytesize ++ begin ++ while read_bytes < min_bytes ++ str = readline(term) ++ @scanner << str ++ read_bytes += str.bytesize ++ end ++ rescue IOError ++ end + true + rescue Exception, NameError + @source = nil +@@ -186,7 +196,9 @@ module REXML + end + end + +- def match( pattern, cons=false, term: nil ) ++ def match( pattern, cons=false ) ++ # To avoid performance issue, we need to increase bytes to read per scan ++ min_bytes = 1 + read if @scanner.eos? && @source + while true + if cons +@@ -197,7 +209,8 @@ module REXML + break if md + return nil if pattern.is_a?(String) && pattern.bytesize <= @scanner.rest_size + return nil if @source.nil? +- return nil unless read(term) ++ return nil unless read(nil, min_bytes) ++ min_bytes *= 2 + end + + md.nil? ? nil : @scanner +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0005.patch b/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0005.patch new file mode 100644 index 0000000000..3d79d07327 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/CVE-2024-41123-0005.patch @@ -0,0 +1,111 @@ +From e2546e6ecade16b04c9ee528e5be8509fe16c2d6 Mon Sep 17 00:00:00 2001 +From: Sutou Kouhei +Date: Thu, 1 Aug 2024 11:23:43 +0900 +Subject: [PATCH] parse pi: improve invalid case detection + +CVE: CVE-2024-41123 + +Upstream-Status: Backport [https://github.com/ruby/rexml/commit/e2546e6ecade16b04c9ee528e5be8509fe16c2d6] + +Signed-off-by: Divya Chellam +--- + .../lib/rexml/parsers/baseparser.rb | 35 +++++++++++-------- + 1 file changed, 20 insertions(+), 15 deletions(-) + +diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +index c1a22b8..0ece9b5 100644 +--- a/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb ++++ b/.bundle/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +@@ -124,11 +124,10 @@ module REXML + } + + module Private +- INSTRUCTION_END = /#{NAME}(\s+.*?)?\?>/um + TAG_PATTERN = /((?>#{QNAME_STR}))\s*/um + CLOSE_PATTERN = /(#{QNAME_STR})\s*>/um + ATTLISTDECL_END = /\s+#{NAME}(?:#{ATTDEF})*\s*>/um +- NAME_PATTERN = /\s*#{NAME}/um ++ NAME_PATTERN = /#{NAME}/um + GEDECL_PATTERN = "\\s+#{NAME}\\s+#{ENTITYDEF}\\s*>" + PEDECL_PATTERN = "\\s+(%)\\s+#{NAME}\\s+#{PEDEF}\\s*>" + ENTITYDECL_PATTERN = /(?:#{GEDECL_PATTERN})|(?:#{PEDECL_PATTERN})/um +@@ -233,7 +232,7 @@ module REXML + if @document_status == nil + start_position = @source.position + if @source.match("/um, true) +@@ -424,7 +423,7 @@ module REXML + raise REXML::ParseException.new( "Declarations can only occur "+ + "in the doctype declaration.", @source) + elsif @source.match("?", true) +- return process_instruction(start_position) ++ return process_instruction + else + # Get the next tag + md = @source.match(TAG_PATTERN, true) +@@ -579,14 +578,14 @@ module REXML + def parse_name(base_error_message) + md = @source.match(NAME_PATTERN, true) + unless md +- if @source.match(/\s*\S/um) ++ if @source.match(/\S/um) + message = "#{base_error_message}: invalid name" + else + message = "#{base_error_message}: name is missing" + end + raise REXML::ParseException.new(message, @source) + end +- md[1] ++ md[0] + end + + def parse_id(base_error_message, +@@ -655,18 +654,24 @@ module REXML + end + end + +- def process_instruction(start_position) +- match_data = @source.match(Private::INSTRUCTION_END, true) +- unless match_data +- message = "Invalid processing instruction node" +- @source.position = start_position +- raise REXML::ParseException.new(message, @source) ++ def process_instruction ++ name = parse_name("Malformed XML: Invalid processing instruction node") ++ if @source.match(/\s+/um, true) ++ match_data = @source.match(/(.*?)\?>/um, true) ++ unless match_data ++ raise ParseException.new("Malformed XML: Unclosed processing instruction", @source) ++ end ++ content = match_data[1] ++ else ++ content = nil ++ unless @source.match("?>", true) ++ raise ParseException.new("Malformed XML: Unclosed processing instruction", @source) ++ end + end +- if match_data[1] == "xml" ++ if name == "xml" + if @document_status + raise ParseException.new("Malformed XML: XML declaration is not at the start", @source) + end +- content = match_data[2] + version = VERSION.match(content) + version = version[1] unless version.nil? + encoding = ENCODING.match(content) +@@ -681,7 +686,7 @@ module REXML + standalone = standalone[1] unless standalone.nil? + return [ :xmldecl, version, encoding, standalone ] + end +- [:processing_instruction, match_data[1], match_data[2]] ++ [:processing_instruction, name, content] + end + + def parse_attributes(prefixes) +-- +2.40.0 + diff --git a/meta/recipes-devtools/ruby/ruby_3.1.3.bb b/meta/recipes-devtools/ruby/ruby_3.1.3.bb index f967cc6948..f2f9c848f0 100644 --- a/meta/recipes-devtools/ruby/ruby_3.1.3.bb +++ b/meta/recipes-devtools/ruby/ruby_3.1.3.bb @@ -66,6 +66,11 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ file://CVE-2024-39908-0010.patch \ file://CVE-2024-39908-0011.patch \ file://CVE-2024-39908-0012.patch \ + file://CVE-2024-41123-0001.patch \ + file://CVE-2024-41123-0002.patch \ + file://CVE-2024-41123-0003.patch \ + file://CVE-2024-41123-0004.patch \ + file://CVE-2024-41123-0005.patch \ " UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/" From patchwork Tue Nov 25 20:54:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 75379 X-Patchwork-Delegate: steve@sakoman.com 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 1A95DD0EE31 for ; Tue, 25 Nov 2025 20:55:10 +0000 (UTC) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.4190.1764104108646535829 for ; Tue, 25 Nov 2025 12:55:08 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=xwh4Zais; spf=softfail (domain: sakoman.com, ip: 209.85.216.53, mailfrom: steve@sakoman.com) Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-343dd5aa6e7so6298613a91.0 for ; Tue, 25 Nov 2025 12:55:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1764104108; x=1764708908; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xsMZjKeiNsCRXo3Hz/LPzZTKDN9y+cEfGW3mTYn3uIw=; b=xwh4ZaiseFR3A0vtF0vdOd7/ffQ/1uBZhCA0e4yLUxfIxA3SVAyCVgzAlLXGkzK/Di FfmICV6AbSht4KeVK4lnW9FEPfGYzIgenyl9TqJ46Cp0ZvwKKqhCyhdYO7s6LbHExX+9 ob7O388POVz8AJitiFwYJFdHp56f3p4Sy8HiPyFLMSaxEUsdRpVIw5fpp8yPO47uwTxM RVJ1iQUdP/AAW4FhrrHcvpQ1hZXxCndu8sx/Rtg/O+Fr4S/qxRlefK9CZkT2ALIjbfcH wrakk5sFqBrwULljwdJtjC6lrb4IosUC4Gtn+I8tU7R0ySFgquBdqFZ7bkBoZfeqqeSt zlIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764104108; x=1764708908; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=xsMZjKeiNsCRXo3Hz/LPzZTKDN9y+cEfGW3mTYn3uIw=; b=eYHgRhf87ugK6CySr25jj18OSJ7q6LiPnynXyoX0I+u6P93DM16arD6d5NSyGYcbXg 69fFs5By46C745bimnVxIOtpDFKD/gM1uySy5mfuCqceDFoR6a7rOM4XKjoEQVTQ1r16 Lak4R3T77+okrR3iUYFOpAty2TLNZb53ivjbzpoaA2HQ5jKG+RVYFdEY28pz+OUvUy0y vnfpkpSmnxCe9aCSN/WbPC8A/GjG0rE3osEiEhEjEWC6g5qt/RvNVwP1vAGj7Tu3jNBo r7S1IiSYBmcSxV6wqGXUqRNW0g37x80VJsiIGfsejGySdaMjYtr3pZgx6aP/c2Tiu2ym 28SQ== X-Gm-Message-State: AOJu0Yx9gp9LGrsMCWrpHUb0NK/uRI89MJ81u/7QHx65WHk+f1+KiuWQ yF/zrZ3b3+5xixGtNgDRTdATmJDdae109maaVhvSzmc7UbGmHK51i8fj8CHDVm6lCydJC+qfSHL u6fKz X-Gm-Gg: ASbGncvPn6967bVRJQcKA5KLKoVfdseGkIQZxcfwA67m3R5W2sYo+O7VCAakrtvHDKd sEaD1kwO5rBsKq/4YZEg4Svj6ajcsSPLiCEK0dw04oWjBk43CuWcoGKIgNmZJvKybjzgnB33CFn bp1vdezbs7PQlYJsphpa+K5RB0JE2yaG0mfRrw0VaKPOg37m5gNnmLHhkQVRqaizXav69BLz3p0 WuhtiY3NzUi+q1cQ8nO5UBwGcyugrsykBxLPY/XoDXW0ZQKB/o0wUBHhjA1w0rE8DFmimzAA+3t AzdFzRsGmgRFyJ7PtZLDfvanP3OCiNZZ8o48OnSTZPuGy67Nr2rTXOV5awveixko/5jJY/Qrvis /HhgunjiKMzPonXPIfduoVz7JcozX50RZ4USKFhdzaQutAAyfEAJB/zc9rtE0v4P/DqZHP/+OSa hU4Q== X-Google-Smtp-Source: AGHT+IF8DlrUlzn5TC9Nnz1HEkrU5kj0PqBm6cxSToqOZbtO5RIhsJpWjwmyJiNfLuFGH217U6gZKg== X-Received: by 2002:a17:90b:3890:b0:330:a228:d2c with SMTP id 98e67ed59e1d1-34733e6ce5bmr17578343a91.15.1764104107658; Tue, 25 Nov 2025 12:55:07 -0800 (PST) Received: from hexa.. ([2602:feb4:3b:2100:5e34:462b:e2f0:5898]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3476a5a3099sm322602a91.11.2025.11.25.12.55.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 12:55:07 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 5/9] python3: fix CVE-2025-6075 Date: Tue, 25 Nov 2025 12:54:48 -0800 Message-ID: <9a7f33d85355ffbe382aa175c04c64541e77b441.1764103986.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 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 ; Tue, 25 Nov 2025 20:55:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/226780 From: Praveen Kumar If the value passed to os.path.expandvars() is user-controlled a performance degradation is possible when expanding environment variables. Reference: https://nvd.nist.gov/vuln/detail/CVE-2025-6075 Upstream-patch: https://github.com/python/cpython/commit/892747b4cf0f95ba8beb51c0d0658bfaa381ebca Signed-off-by: Praveen Kumar Signed-off-by: Steve Sakoman --- .../python/python3/CVE-2025-6075.patch | 364 ++++++++++++++++++ .../python/python3_3.10.19.bb | 1 + 2 files changed, 365 insertions(+) create mode 100644 meta/recipes-devtools/python/python3/CVE-2025-6075.patch diff --git a/meta/recipes-devtools/python/python3/CVE-2025-6075.patch b/meta/recipes-devtools/python/python3/CVE-2025-6075.patch new file mode 100644 index 0000000000..eab5a882a0 --- /dev/null +++ b/meta/recipes-devtools/python/python3/CVE-2025-6075.patch @@ -0,0 +1,364 @@ +From 892747b4cf0f95ba8beb51c0d0658bfaa381ebca Mon Sep 17 00:00:00 2001 +From: Łukasz Langa +Date: Fri, 31 Oct 2025 17:51:32 +0100 +Subject: [PATCH] gh-136065: Fix quadratic complexity in os.path.expandvars() + (GH-134952) (GH-140851) + +(cherry picked from commit f029e8db626ddc6e3a3beea4eff511a71aaceb5c) + +Co-authored-by: Serhiy Storchaka + +CVE: CVE-2025-6075 + +Upstream-Status: Backport [https://github.com/python/cpython/commit/892747b4cf0f95ba8beb51c0d0658bfaa381ebca] + +Signed-off-by: Praveen Kumar +--- + Lib/ntpath.py | 126 ++++++------------ + Lib/posixpath.py | 43 +++--- + Lib/test/test_genericpath.py | 14 ++ + Lib/test/test_ntpath.py | 20 ++- + ...-05-30-22-33-27.gh-issue-136065.bu337o.rst | 1 + + 5 files changed, 93 insertions(+), 111 deletions(-) + create mode 100644 Misc/NEWS.d/next/Security/2025-05-30-22-33-27.gh-issue-136065.bu337o.rst + +diff --git a/Lib/ntpath.py b/Lib/ntpath.py +index 9b0cca4..bd2b4e2 100644 +--- a/Lib/ntpath.py ++++ b/Lib/ntpath.py +@@ -374,17 +374,23 @@ def expanduser(path): + # XXX With COMMAND.COM you can use any characters in a variable name, + # XXX except '^|<>='. + ++_varpattern = r"'[^']*'?|%(%|[^%]*%?)|\$(\$|[-\w]+|\{[^}]*\}?)" ++_varsub = None ++_varsubb = None ++ + def expandvars(path): + """Expand shell variables of the forms $var, ${var} and %var%. + + Unknown variables are left unchanged.""" + path = os.fspath(path) ++ global _varsub, _varsubb + if isinstance(path, bytes): + if b'$' not in path and b'%' not in path: + return path +- import string +- varchars = bytes(string.ascii_letters + string.digits + '_-', 'ascii') +- quote = b'\'' ++ if not _varsubb: ++ import re ++ _varsubb = re.compile(_varpattern.encode(), re.ASCII).sub ++ sub = _varsubb + percent = b'%' + brace = b'{' + rbrace = b'}' +@@ -393,94 +399,44 @@ def expandvars(path): + else: + if '$' not in path and '%' not in path: + return path +- import string +- varchars = string.ascii_letters + string.digits + '_-' +- quote = '\'' ++ if not _varsub: ++ import re ++ _varsub = re.compile(_varpattern, re.ASCII).sub ++ sub = _varsub + percent = '%' + brace = '{' + rbrace = '}' + dollar = '$' + environ = os.environ +- res = path[:0] +- index = 0 +- pathlen = len(path) +- while index < pathlen: +- c = path[index:index+1] +- if c == quote: # no expansion within single quotes +- path = path[index + 1:] +- pathlen = len(path) +- try: +- index = path.index(c) +- res += c + path[:index + 1] +- except ValueError: +- res += c + path +- index = pathlen - 1 +- elif c == percent: # variable or '%' +- if path[index + 1:index + 2] == percent: +- res += c +- index += 1 +- else: +- path = path[index+1:] +- pathlen = len(path) +- try: +- index = path.index(percent) +- except ValueError: +- res += percent + path +- index = pathlen - 1 +- else: +- var = path[:index] +- try: +- if environ is None: +- value = os.fsencode(os.environ[os.fsdecode(var)]) +- else: +- value = environ[var] +- except KeyError: +- value = percent + var + percent +- res += value +- elif c == dollar: # variable or '$$' +- if path[index + 1:index + 2] == dollar: +- res += c +- index += 1 +- elif path[index + 1:index + 2] == brace: +- path = path[index+2:] +- pathlen = len(path) +- try: +- index = path.index(rbrace) +- except ValueError: +- res += dollar + brace + path +- index = pathlen - 1 +- else: +- var = path[:index] +- try: +- if environ is None: +- value = os.fsencode(os.environ[os.fsdecode(var)]) +- else: +- value = environ[var] +- except KeyError: +- value = dollar + brace + var + rbrace +- res += value +- else: +- var = path[:0] +- index += 1 +- c = path[index:index + 1] +- while c and c in varchars: +- var += c +- index += 1 +- c = path[index:index + 1] +- try: +- if environ is None: +- value = os.fsencode(os.environ[os.fsdecode(var)]) +- else: +- value = environ[var] +- except KeyError: +- value = dollar + var +- res += value +- if c: +- index -= 1 ++ ++ def repl(m): ++ lastindex = m.lastindex ++ if lastindex is None: ++ return m[0] ++ name = m[lastindex] ++ if lastindex == 1: ++ if name == percent: ++ return name ++ if not name.endswith(percent): ++ return m[0] ++ name = name[:-1] + else: +- res += c +- index += 1 +- return res ++ if name == dollar: ++ return name ++ if name.startswith(brace): ++ if not name.endswith(rbrace): ++ return m[0] ++ name = name[1:-1] ++ ++ try: ++ if environ is None: ++ return os.fsencode(os.environ[os.fsdecode(name)]) ++ else: ++ return environ[name] ++ except KeyError: ++ return m[0] ++ ++ return sub(repl, path) + + + # Normalize a path, e.g. A//B, A/./B and A/foo/../B all become A\B. +diff --git a/Lib/posixpath.py b/Lib/posixpath.py +index b8dd563..75020ee 100644 +--- a/Lib/posixpath.py ++++ b/Lib/posixpath.py +@@ -279,42 +279,41 @@ def expanduser(path): + # This expands the forms $variable and ${variable} only. + # Non-existent variables are left unchanged. + +-_varprog = None +-_varprogb = None ++_varpattern = r'\$(\w+|\{[^}]*\}?)' ++_varsub = None ++_varsubb = None + + def expandvars(path): + """Expand shell variables of form $var and ${var}. Unknown variables + are left unchanged.""" + path = os.fspath(path) +- global _varprog, _varprogb ++ global _varsub, _varsubb + if isinstance(path, bytes): + if b'$' not in path: + return path +- if not _varprogb: ++ if not _varsubb: + import re +- _varprogb = re.compile(br'\$(\w+|\{[^}]*\})', re.ASCII) +- search = _varprogb.search ++ _varsubb = re.compile(_varpattern.encode(), re.ASCII).sub ++ sub = _varsubb + start = b'{' + end = b'}' + environ = getattr(os, 'environb', None) + else: + if '$' not in path: + return path +- if not _varprog: ++ if not _varsub: + import re +- _varprog = re.compile(r'\$(\w+|\{[^}]*\})', re.ASCII) +- search = _varprog.search ++ _varsub = re.compile(_varpattern, re.ASCII).sub ++ sub = _varsub + start = '{' + end = '}' + environ = os.environ +- i = 0 +- while True: +- m = search(path, i) +- if not m: +- break +- i, j = m.span(0) +- name = m.group(1) +- if name.startswith(start) and name.endswith(end): ++ ++ def repl(m): ++ name = m[1] ++ if name.startswith(start): ++ if not name.endswith(end): ++ return m[0] + name = name[1:-1] + try: + if environ is None: +@@ -322,13 +321,11 @@ def expandvars(path): + else: + value = environ[name] + except KeyError: +- i = j ++ return m[0] + else: +- tail = path[j:] +- path = path[:i] + value +- i = len(path) +- path += tail +- return path ++ return value ++ ++ return sub(repl, path) + + + # Normalize a path, e.g. A//B, A/./B and A/foo/../B all become A/B. +diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py +index 1ff7f75..b0a1326 100644 +--- a/Lib/test/test_genericpath.py ++++ b/Lib/test/test_genericpath.py +@@ -7,6 +7,7 @@ import os + import sys + import unittest + import warnings ++from test import support + from test.support import os_helper + from test.support import warnings_helper + from test.support.script_helper import assert_python_ok +@@ -430,6 +431,19 @@ class CommonTest(GenericTest): + os.fsencode('$bar%s bar' % nonascii)) + check(b'$spam}bar', os.fsencode('%s}bar' % nonascii)) + ++ @support.requires_resource('cpu') ++ def test_expandvars_large(self): ++ expandvars = self.pathmodule.expandvars ++ with os_helper.EnvironmentVarGuard() as env: ++ env.clear() ++ env["A"] = "B" ++ n = 100_000 ++ self.assertEqual(expandvars('$A'*n), 'B'*n) ++ self.assertEqual(expandvars('${A}'*n), 'B'*n) ++ self.assertEqual(expandvars('$A!'*n), 'B!'*n) ++ self.assertEqual(expandvars('${A}A'*n), 'BA'*n) ++ self.assertEqual(expandvars('${'*10*n), '${'*10*n) ++ + def test_abspath(self): + self.assertIn("foo", self.pathmodule.abspath("foo")) + with warnings.catch_warnings(): +diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py +index f790f77..161e57d 100644 +--- a/Lib/test/test_ntpath.py ++++ b/Lib/test/test_ntpath.py +@@ -5,8 +5,8 @@ import sys + import unittest + import warnings + from ntpath import ALLOW_MISSING ++from test import support + from test.support import os_helper +-from test.support import TestFailed + from test.support.os_helper import FakePath + from test import test_genericpath + from tempfile import TemporaryFile +@@ -56,7 +56,7 @@ def tester(fn, wantResult): + fn = fn.replace("\\", "\\\\") + gotResult = eval(fn) + if wantResult != gotResult and _norm(wantResult) != _norm(gotResult): +- raise TestFailed("%s should return: %s but returned: %s" \ ++ raise support.TestFailed("%s should return: %s but returned: %s" \ + %(str(fn), str(wantResult), str(gotResult))) + + # then with bytes +@@ -72,7 +72,7 @@ def tester(fn, wantResult): + warnings.simplefilter("ignore", DeprecationWarning) + gotResult = eval(fn) + if _norm(wantResult) != _norm(gotResult): +- raise TestFailed("%s should return: %s but returned: %s" \ ++ raise support.TestFailed("%s should return: %s but returned: %s" \ + %(str(fn), str(wantResult), repr(gotResult))) + + +@@ -689,6 +689,19 @@ class TestNtpath(NtpathTestCase): + check('%spam%bar', '%sbar' % nonascii) + check('%{}%bar'.format(nonascii), 'ham%sbar' % nonascii) + ++ @support.requires_resource('cpu') ++ def test_expandvars_large(self): ++ expandvars = ntpath.expandvars ++ with os_helper.EnvironmentVarGuard() as env: ++ env.clear() ++ env["A"] = "B" ++ n = 100_000 ++ self.assertEqual(expandvars('%A%'*n), 'B'*n) ++ self.assertEqual(expandvars('%A%A'*n), 'BA'*n) ++ self.assertEqual(expandvars("''"*n + '%%'), "''"*n + '%') ++ self.assertEqual(expandvars("%%"*n), "%"*n) ++ self.assertEqual(expandvars("$$"*n), "$"*n) ++ + def test_expanduser(self): + tester('ntpath.expanduser("test")', 'test') + +@@ -923,6 +936,7 @@ class TestNtpath(NtpathTestCase): + self.assertIsInstance(b_final_path, bytes) + self.assertGreater(len(b_final_path), 0) + ++ + class NtCommonTest(test_genericpath.CommonTest, unittest.TestCase): + pathmodule = ntpath + attributes = ['relpath'] +diff --git a/Misc/NEWS.d/next/Security/2025-05-30-22-33-27.gh-issue-136065.bu337o.rst b/Misc/NEWS.d/next/Security/2025-05-30-22-33-27.gh-issue-136065.bu337o.rst +new file mode 100644 +index 0000000..1d152bb +--- /dev/null ++++ b/Misc/NEWS.d/next/Security/2025-05-30-22-33-27.gh-issue-136065.bu337o.rst +@@ -0,0 +1 @@ ++Fix quadratic complexity in :func:`os.path.expandvars`. +-- +2.40.0 diff --git a/meta/recipes-devtools/python/python3_3.10.19.bb b/meta/recipes-devtools/python/python3_3.10.19.bb index 8680c13893..6f23d258c1 100644 --- a/meta/recipes-devtools/python/python3_3.10.19.bb +++ b/meta/recipes-devtools/python/python3_3.10.19.bb @@ -37,6 +37,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://0001-Avoid-shebang-overflow-on-python-config.py.patch \ file://0001-test_storlines-skip-due-to-load-variability.patch \ file://0001-gh-107811-tarfile-treat-overflow-in-UID-GID-as-failu.patch \ + file://CVE-2025-6075.patch \ " SRC_URI:append:class-native = " \ From patchwork Tue Nov 25 20:54:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 75383 X-Patchwork-Delegate: steve@sakoman.com 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 1824FD0EE1C for ; Tue, 25 Nov 2025 20:55:20 +0000 (UTC) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.4243.1764104110337813730 for ; Tue, 25 Nov 2025 12:55:10 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=iG8BB8iC; spf=softfail (domain: sakoman.com, ip: 209.85.216.44, mailfrom: steve@sakoman.com) Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-3434700be69so8491898a91.1 for ; Tue, 25 Nov 2025 12:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1764104109; x=1764708909; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XxSja6snZIDvqt6U6SwEEIuzqzJrQQathsJXBm9ftWo=; b=iG8BB8iCbz7HdxB4F2yHJJoASdA29Fz0t6chDctSOiS93khmJn2UXrKK2JJWrvl4Dv DZd41iLOVueLcnCdiwfWcZbsZjFmjYUqa/KPTZC09I95fZ1cdeetP8HU15jobsprWpp6 KJDvTe866ph1HCLjYuDlQaRvch8QPxaPdIzW+a9E8H++m09rI6uUq8QnlMMi6ZzXzkkr ThZ3bkirDnXTDNnyGzjd6e20k/mA4fYgraYL6awLarh7xJpc7nKmYmgUdqHV5ikcWilg w/MU9iSqEKvekY6QdXL1pvHAzadoqM1347Pa7DXA71rH+bwehCP0aVfOm8Sf9HWrbard evrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764104109; x=1764708909; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=XxSja6snZIDvqt6U6SwEEIuzqzJrQQathsJXBm9ftWo=; b=AQ28Ru5sXFHguYHGCHhsfR3Y7qvQZ0aGNBfiYHx9He6R0olFlDMW/lzRp7aghHYmYt nKxyrIuo6BHKELO26jmPyJVY0/SkNC2QSk7pZ+v1/sUaY8eUhnl1oVUHCNovdsROP2i9 jRUOL636NY6GSdZ1KW8CCRZ6ofaRj0KP8LjsijXplrCkjtKpyzAeQf6pQyKwUiF655Xi naaf3i5DUz4+OCqiIGpiDsEC5lfhdkrqUoB++4+KOI6iOpXaFWjooLAj3CMAHc/N3gsa Dmxk1rV8e2NWDu1OdPBXHNkQza13prsIUlhzn7ulIMwlaxtnZiSiwvPk5NphEqcbVViX 6YCQ== X-Gm-Message-State: AOJu0YwIaaQ+iUjJ1/dKuZTRkTLx65E2j/T6Co3SVLhm91ayIHrjkayS tANelY+AWyils3kXsyGS02X2V8r+A04WTf2iE5MLVGpHXoJyFsGcidv+YtfXmIC2H6h/hkqC/Ui 6Pjk3 X-Gm-Gg: ASbGncuOJv/GJjFUM+/WWJz0eOspovrrE3ilSqUlXKThNgAGDadKFX0VLBYEh28WynB wy34En1WVxc41Vt3Smd4AWhisvV/ezekeb0kspGTZYV92iNuctVnt/tcLMbqCrh3c0OmM3NMiaH KsDg3uHBQtsBzW7NQ4qsGLhLT1JlO6Yx+PaY2gwDW+H0wc+S12fZI7lrtBGdsvoCKaEeQjKgp/v stnFAQr3EGyeZszyUCKa0lbqmOlPwWsbJLqhwx5VFlLtkKdqa9uTbLN7eWbWNE81HwVc+sLY3zV mHqXYQAtf5RVQ5ANpdvJld7pti8JxaMFBU99s5hVMfnbOifJRkQUSXB48EUGIpl+H/YG/u1fbbx w4hz6BbZwQcrElE7obnbVrVbhfHkvOxzh/sXvxq3SwZkndAB8RWKKZW9EgI1j1LJ1JtecJ49WAz 4fFw== X-Google-Smtp-Source: AGHT+IFEA9MVjwGh7DvElXSmSeZPFX8cTTXClJaBZLDQ/YVJdiKbDvGVJK7EtZi6utIRW4FgYFnLQQ== X-Received: by 2002:a17:90b:5843:b0:347:5ddd:b2d1 with SMTP id 98e67ed59e1d1-3475ed517edmr4292518a91.27.1764104109314; Tue, 25 Nov 2025 12:55:09 -0800 (PST) Received: from hexa.. ([2602:feb4:3b:2100:5e34:462b:e2f0:5898]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3476a5a3099sm322602a91.11.2025.11.25.12.55.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 12:55:08 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 6/9] libarchive: patch 3.8.3 security issue 1 Date: Tue, 25 Nov 2025 12:54:49 -0800 Message-ID: <201eed780c73335c9278db17fe39fb453e16af08.1764103986.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 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 ; Tue, 25 Nov 2025 20:55:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/226781 From: Peter Marko Pick patch [2] as listed in [1]. To apply it cleanly, add three additional patches from branch patch/3.8. [1] https://github.com/libarchive/libarchive/releases/tag/v3.8.3 [2] https://github.com/libarchive/libarchive/pull/2753 Signed-off-by: Peter Marko Signed-off-by: Steve Sakoman --- ...ax-path-length-metadata-writing-2243.patch | 30 +++ ...request-2696-from-al3xtjames-mkstemp.patch | 28 +++ ...st-2749-from-KlaraSystems-des-tempdi.patch | 183 +++++++++++++++++ ...st-2753-from-KlaraSystems-des-temp-f.patch | 190 ++++++++++++++++++ .../libarchive/libarchive_3.6.2.bb | 4 + 5 files changed, 435 insertions(+) create mode 100644 meta/recipes-extended/libarchive/libarchive/0001-Fix-max-path-length-metadata-writing-2243.patch create mode 100644 meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2696-from-al3xtjames-mkstemp.patch create mode 100644 meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2749-from-KlaraSystems-des-tempdi.patch create mode 100644 meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2753-from-KlaraSystems-des-temp-f.patch diff --git a/meta/recipes-extended/libarchive/libarchive/0001-Fix-max-path-length-metadata-writing-2243.patch b/meta/recipes-extended/libarchive/libarchive/0001-Fix-max-path-length-metadata-writing-2243.patch new file mode 100644 index 0000000000..0f7dca2a40 --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/0001-Fix-max-path-length-metadata-writing-2243.patch @@ -0,0 +1,30 @@ +From 2e73ea3a7db1c3c743c28a0d2dd0456a43e96b96 Mon Sep 17 00:00:00 2001 +From: Sam Bingner +Date: Fri, 5 Jul 2024 09:34:43 -1000 +Subject: [PATCH] Fix max path-length metadata writing (#2243) + +Previous code added `.XXXXXX` to the end of the filename to write the +mac metadata. This is a problem if the filename is at or near the +filesystem max path length. This reuses the same code used by +create_tempdatafork to ensure that the filename is not too long. + +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/2e73ea3a7db1c3c743c28a0d2dd0456a43e96b96] +Signed-off-by: Peter Marko +--- + libarchive/archive_write_disk_posix.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c +index bac906d2..098a8fe4 100644 +--- a/libarchive/archive_write_disk_posix.c ++++ b/libarchive/archive_write_disk_posix.c +@@ -4331,8 +4331,7 @@ set_mac_metadata(struct archive_write_disk *a, const char *pathname, + * silly dance of writing the data to disk just so that + * copyfile() can read it back in again. */ + archive_string_init(&tmp); +- archive_strcpy(&tmp, pathname); +- archive_strcat(&tmp, ".XXXXXX"); ++ archive_strcpy(&tmp, "tar.mmd.XXXXXX"); + fd = mkstemp(tmp.s); + + if (fd < 0) { diff --git a/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2696-from-al3xtjames-mkstemp.patch b/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2696-from-al3xtjames-mkstemp.patch new file mode 100644 index 0000000000..a4ccfd16b5 --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2696-from-al3xtjames-mkstemp.patch @@ -0,0 +1,28 @@ +From 53d2bc4f89fcbd7414b92bd242f6cdc901941f55 Mon Sep 17 00:00:00 2001 +From: Tim Kientzle +Date: Sat, 16 Aug 2025 10:27:11 -0600 +Subject: [PATCH] Merge pull request #2696 from al3xtjames/mkstemp + +Fix mkstemp path in setup_mac_metadata + +(cherry picked from commit 892f33145093d1c9b962b6521a6480dfea66ae00) + +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/53d2bc4f89fcbd7414b92bd242f6cdc901941f55] +Signed-off-by: Peter Marko +--- + libarchive/archive_read_disk_entry_from_file.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c +index 19d04977..87389642 100644 +--- a/libarchive/archive_read_disk_entry_from_file.c ++++ b/libarchive/archive_read_disk_entry_from_file.c +@@ -365,7 +365,7 @@ setup_mac_metadata(struct archive_read_disk *a, + tempdir = _PATH_TMP; + archive_string_init(&tempfile); + archive_strcpy(&tempfile, tempdir); +- archive_strcat(&tempfile, "tar.md.XXXXXX"); ++ archive_strcat(&tempfile, "/tar.md.XXXXXX"); + tempfd = mkstemp(tempfile.s); + if (tempfd < 0) { + archive_set_error(&a->archive, errno, diff --git a/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2749-from-KlaraSystems-des-tempdi.patch b/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2749-from-KlaraSystems-des-tempdi.patch new file mode 100644 index 0000000000..0d69faa23b --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2749-from-KlaraSystems-des-tempdi.patch @@ -0,0 +1,183 @@ +From 82e31ba4a9afcce0c7c19e591ccd8653196d84a0 Mon Sep 17 00:00:00 2001 +From: Tim Kientzle +Date: Mon, 13 Oct 2025 10:57:18 -0700 +Subject: [PATCH] Merge pull request #2749 from KlaraSystems/des/tempdir + +Unify temporary directory handling + +(cherry picked from commit d207d816d065c79dc2cb992008c3ba9721c6a276) + +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/82e31ba4a9afcce0c7c19e591ccd8653196d84a0] +Signed-off-by: Peter Marko +--- + CMakeLists.txt | 6 ++- + configure.ac | 4 +- + libarchive/archive_private.h | 1 + + .../archive_read_disk_entry_from_file.c | 14 +++---- + libarchive/archive_read_disk_posix.c | 3 -- + libarchive/archive_util.c | 38 ++++++++++++++++--- + 6 files changed, 48 insertions(+), 18 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f44adc77..fc9aca4e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1357,14 +1357,18 @@ CHECK_FUNCTION_EXISTS_GLIBC(ftruncate HAVE_FTRUNCATE) + CHECK_FUNCTION_EXISTS_GLIBC(futimens HAVE_FUTIMENS) + CHECK_FUNCTION_EXISTS_GLIBC(futimes HAVE_FUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(futimesat HAVE_FUTIMESAT) ++CHECK_FUNCTION_EXISTS_GLIBC(getegid HAVE_GETEGID) + CHECK_FUNCTION_EXISTS_GLIBC(geteuid HAVE_GETEUID) + CHECK_FUNCTION_EXISTS_GLIBC(getgrgid_r HAVE_GETGRGID_R) + CHECK_FUNCTION_EXISTS_GLIBC(getgrnam_r HAVE_GETGRNAM_R) ++CHECK_FUNCTION_EXISTS_GLIBC(getpid HAVE_GETPID) + CHECK_FUNCTION_EXISTS_GLIBC(getpwnam_r HAVE_GETPWNAM_R) + CHECK_FUNCTION_EXISTS_GLIBC(getpwuid_r HAVE_GETPWUID_R) +-CHECK_FUNCTION_EXISTS_GLIBC(getpid HAVE_GETPID) ++CHECK_FUNCTION_EXISTS_GLIBC(getresgid HAVE_GETRESGID) ++CHECK_FUNCTION_EXISTS_GLIBC(getresuid HAVE_GETRESUID) + CHECK_FUNCTION_EXISTS_GLIBC(getvfsbyname HAVE_GETVFSBYNAME) + CHECK_FUNCTION_EXISTS_GLIBC(gmtime_r HAVE_GMTIME_R) ++CHECK_FUNCTION_EXISTS_GLIBC(issetugid HAVE_ISSETUGID) + CHECK_FUNCTION_EXISTS_GLIBC(lchflags HAVE_LCHFLAGS) + CHECK_FUNCTION_EXISTS_GLIBC(lchmod HAVE_LCHMOD) + CHECK_FUNCTION_EXISTS_GLIBC(lchown HAVE_LCHOWN) +diff --git a/configure.ac b/configure.ac +index aae0f381..a1a8f380 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -677,7 +677,9 @@ AC_CHECK_FUNCS([fchdir fchflags fchmod fchown fcntl fdopendir fork]) + AC_CHECK_FUNCS([fstat fstatat fstatfs fstatvfs ftruncate]) + AC_CHECK_FUNCS([futimens futimes futimesat]) + AC_CHECK_FUNCS([geteuid getpid getgrgid_r getgrnam_r]) +-AC_CHECK_FUNCS([getpwnam_r getpwuid_r getvfsbyname gmtime_r]) ++AC_CHECK_FUNCS([getgrgid_r getgrnam_r getpwnam_r getpwuid_r]) ++AC_CHECK_FUNCS([getvfsbyname gmtime_r]) ++AC_CHECK_FUNCS([issetugid]) + AC_CHECK_FUNCS([lchflags lchmod lchown link linkat localtime_r lstat lutimes]) + AC_CHECK_FUNCS([mbrtowc memmove memset]) + AC_CHECK_FUNCS([mkdir mkfifo mknod mkstemp]) +diff --git a/libarchive/archive_private.h b/libarchive/archive_private.h +index 050fc63c..3a926c68 100644 +--- a/libarchive/archive_private.h ++++ b/libarchive/archive_private.h +@@ -156,6 +156,7 @@ int __archive_check_magic(struct archive *, unsigned int magic, + void __archive_errx(int retvalue, const char *msg) __LA_DEAD; + + void __archive_ensure_cloexec_flag(int fd); ++int __archive_get_tempdir(struct archive_string *); + int __archive_mktemp(const char *tmpdir); + #if defined(_WIN32) && !defined(__CYGWIN__) + int __archive_mkstemp(wchar_t *template); +diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c +index 87389642..42af4034 100644 +--- a/libarchive/archive_read_disk_entry_from_file.c ++++ b/libarchive/archive_read_disk_entry_from_file.c +@@ -339,7 +339,7 @@ setup_mac_metadata(struct archive_read_disk *a, + int ret = ARCHIVE_OK; + void *buff = NULL; + int have_attrs; +- const char *name, *tempdir; ++ const char *name; + struct archive_string tempfile; + + (void)fd; /* UNUSED */ +@@ -358,14 +358,12 @@ setup_mac_metadata(struct archive_read_disk *a, + if (have_attrs == 0) + return (ARCHIVE_OK); + +- tempdir = NULL; +- if (issetugid() == 0) +- tempdir = getenv("TMPDIR"); +- if (tempdir == NULL) +- tempdir = _PATH_TMP; + archive_string_init(&tempfile); +- archive_strcpy(&tempfile, tempdir); +- archive_strcat(&tempfile, "/tar.md.XXXXXX"); ++ if (__archive_get_tempdir(&tempfile) != ARCHIVE_OK) { ++ ret = ARCHIVE_WARN; ++ goto cleanup; ++ } ++ archive_strcat(&tempfile, "tar.md.XXXXXX"); + tempfd = mkstemp(tempfile.s); + if (tempfd < 0) { + archive_set_error(&a->archive, errno, +diff --git a/libarchive/archive_read_disk_posix.c b/libarchive/archive_read_disk_posix.c +index ba0046d7..54a8e661 100644 +--- a/libarchive/archive_read_disk_posix.c ++++ b/libarchive/archive_read_disk_posix.c +@@ -1579,9 +1579,6 @@ setup_current_filesystem(struct archive_read_disk *a) + # endif + #endif + int r, xr = 0; +-#if !defined(HAVE_STRUCT_STATFS_F_NAMEMAX) +- long nm; +-#endif + + t->current_filesystem->synthetic = -1; + t->current_filesystem->remote = -1; +diff --git a/libarchive/archive_util.c b/libarchive/archive_util.c +index 900abd0c..d048bbc9 100644 +--- a/libarchive/archive_util.c ++++ b/libarchive/archive_util.c +@@ -395,11 +395,39 @@ __archive_mkstemp(wchar_t *template) + #else + + static int +-get_tempdir(struct archive_string *temppath) ++__archive_issetugid(void) + { +- const char *tmp; ++#ifdef HAVE_ISSETUGID ++ return (issetugid()); ++#elif HAVE_GETRESUID ++ uid_t ruid, euid, suid; ++ gid_t rgid, egid, sgid; ++ if (getresuid(&ruid, &euid, &suid) != 0) ++ return (-1); ++ if (ruid != euid || ruid != suid) ++ return (1); ++ if (getresgid(&ruid, &egid, &sgid) != 0) ++ return (-1); ++ if (rgid != egid || rgid != sgid) ++ return (1); ++#elif HAVE_GETEUID ++ if (geteuid() != getuid()) ++ return (1); ++#if HAVE_GETEGID ++ if (getegid() != getgid()) ++ return (1); ++#endif ++#endif ++ return (0); ++} + +- tmp = getenv("TMPDIR"); ++int ++__archive_get_tempdir(struct archive_string *temppath) ++{ ++ const char *tmp = NULL; ++ ++ if (__archive_issetugid() == 0) ++ tmp = getenv("TMPDIR"); + if (tmp == NULL) + #ifdef _PATH_TMP + tmp = _PATH_TMP; +@@ -426,7 +454,7 @@ __archive_mktemp(const char *tmpdir) + + archive_string_init(&temp_name); + if (tmpdir == NULL) { +- if (get_tempdir(&temp_name) != ARCHIVE_OK) ++ if (__archive_get_tempdir(&temp_name) != ARCHIVE_OK) + goto exit_tmpfile; + } else { + archive_strcpy(&temp_name, tmpdir); +@@ -487,7 +515,7 @@ __archive_mktempx(const char *tmpdir, char *template) + if (template == NULL) { + archive_string_init(&temp_name); + if (tmpdir == NULL) { +- if (get_tempdir(&temp_name) != ARCHIVE_OK) ++ if (__archive_get_tempdir(&temp_name) != ARCHIVE_OK) + goto exit_tmpfile; + } else + archive_strcpy(&temp_name, tmpdir); diff --git a/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2753-from-KlaraSystems-des-temp-f.patch b/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2753-from-KlaraSystems-des-temp-f.patch new file mode 100644 index 0000000000..a5efb3da94 --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2753-from-KlaraSystems-des-temp-f.patch @@ -0,0 +1,190 @@ +From c3593848067cea3b41bc11eec15f391318675cb4 Mon Sep 17 00:00:00 2001 +From: Tim Kientzle +Date: Tue, 28 Oct 2025 17:13:18 -0700 +Subject: [PATCH] Merge pull request #2753 from KlaraSystems/des/temp-files + +Create temporary files in the target directory + +(cherry picked from commit d2e861769c25470427656b36a14b535f17d47d03) + +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/c3593848067cea3b41bc11eec15f391318675cb4] +Signed-off-by: Peter Marko +--- + .../archive_read_disk_entry_from_file.c | 10 ++--- + libarchive/archive_string.c | 20 ++++++++++ + libarchive/archive_string.h | 4 ++ + libarchive/archive_write_disk_posix.c | 20 ++++++---- + libarchive/test/test_archive_string.c | 38 +++++++++++++++++++ + 5 files changed, 79 insertions(+), 13 deletions(-) + +diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c +index 42af4034..121af198 100644 +--- a/libarchive/archive_read_disk_entry_from_file.c ++++ b/libarchive/archive_read_disk_entry_from_file.c +@@ -359,12 +359,10 @@ setup_mac_metadata(struct archive_read_disk *a, + return (ARCHIVE_OK); + + archive_string_init(&tempfile); +- if (__archive_get_tempdir(&tempfile) != ARCHIVE_OK) { +- ret = ARCHIVE_WARN; +- goto cleanup; +- } +- archive_strcat(&tempfile, "tar.md.XXXXXX"); +- tempfd = mkstemp(tempfile.s); ++ archive_strcpy(&tempfile, name); ++ archive_string_dirname(&tempfile); ++ archive_strcat(&tempfile, "/tar.XXXXXXXX"); ++ tempfd = __archive_mkstemp(tempfile.s); + if (tempfd < 0) { + archive_set_error(&a->archive, errno, + "Could not open extended attribute file"); +diff --git a/libarchive/archive_string.c b/libarchive/archive_string.c +index 3bb97833..740308b6 100644 +--- a/libarchive/archive_string.c ++++ b/libarchive/archive_string.c +@@ -2012,6 +2012,26 @@ archive_strncat_l(struct archive_string *as, const void *_p, size_t n, + return (r); + } + ++struct archive_string * ++archive_string_dirname(struct archive_string *as) ++{ ++ /* strip trailing separators */ ++ while (as->length > 1 && as->s[as->length - 1] == '/') ++ as->length--; ++ /* strip final component */ ++ while (as->length > 0 && as->s[as->length - 1] != '/') ++ as->length--; ++ /* empty path -> cwd */ ++ if (as->length == 0) ++ return (archive_strcat(as, ".")); ++ /* strip separator(s) */ ++ while (as->length > 1 && as->s[as->length - 1] == '/') ++ as->length--; ++ /* terminate */ ++ as->s[as->length] = '\0'; ++ return (as); ++} ++ + #if HAVE_ICONV + + /* +diff --git a/libarchive/archive_string.h b/libarchive/archive_string.h +index e8987867..d5f5c03a 100644 +--- a/libarchive/archive_string.h ++++ b/libarchive/archive_string.h +@@ -195,6 +195,10 @@ void archive_string_vsprintf(struct archive_string *, const char *, + void archive_string_sprintf(struct archive_string *, const char *, ...) + __LA_PRINTF(2, 3); + ++/* Equivalent to dirname(3) */ ++struct archive_string * ++archive_string_dirname(struct archive_string *); ++ + /* Translates from MBS to Unicode. */ + /* Returns non-zero if conversion failed in any way. */ + int archive_wstring_append_from_mbs(struct archive_wstring *dest, +diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c +index 6fcf3929..cd256203 100644 +--- a/libarchive/archive_write_disk_posix.c ++++ b/libarchive/archive_write_disk_posix.c +@@ -412,12 +412,14 @@ static ssize_t _archive_write_disk_data_block(struct archive *, const void *, + static int + la_mktemp(struct archive_write_disk *a) + { ++ struct archive_string *tmp = &a->_tmpname_data; + int oerrno, fd; + mode_t mode; + +- archive_string_empty(&a->_tmpname_data); +- archive_string_sprintf(&a->_tmpname_data, "%s.XXXXXX", a->name); +- a->tmpname = a->_tmpname_data.s; ++ archive_strcpy(tmp, a->name); ++ archive_string_dirname(tmp); ++ archive_strcat(tmp, "/tar.XXXXXXXX"); ++ a->tmpname = tmp->s; + + fd = __archive_mkstemp(a->tmpname); + if (fd == -1) +@@ -4251,8 +4253,10 @@ create_tempdatafork(struct archive_write_disk *a, const char *pathname) + int tmpfd; + + archive_string_init(&tmpdatafork); +- archive_strcpy(&tmpdatafork, "tar.md.XXXXXX"); +- tmpfd = mkstemp(tmpdatafork.s); ++ archive_strcpy(&tmpdatafork, pathname); ++ archive_string_dirname(&tmpdatafork); ++ archive_strcat(&tmpdatafork, "/tar.XXXXXXXX"); ++ tmpfd = __archive_mkstemp(tmpdatafork.s); + if (tmpfd < 0) { + archive_set_error(&a->archive, errno, + "Failed to mkstemp"); +@@ -4331,8 +4335,10 @@ set_mac_metadata(struct archive_write_disk *a, const char *pathname, + * silly dance of writing the data to disk just so that + * copyfile() can read it back in again. */ + archive_string_init(&tmp); +- archive_strcpy(&tmp, "tar.mmd.XXXXXX"); +- fd = mkstemp(tmp.s); ++ archive_strcpy(&tmp, pathname); ++ archive_string_dirname(&tmp); ++ archive_strcat(&tmp, "/tar.XXXXXXXX"); ++ fd = __archive_mkstemp(tmp.s); + + if (fd < 0) { + archive_set_error(&a->archive, errno, +diff --git a/libarchive/test/test_archive_string.c b/libarchive/test/test_archive_string.c +index 30f7a800..bf822c0d 100644 +--- a/libarchive/test/test_archive_string.c ++++ b/libarchive/test/test_archive_string.c +@@ -354,6 +354,43 @@ test_archive_string_sprintf(void) + archive_string_free(&s); + } + ++static void ++test_archive_string_dirname(void) ++{ ++ static struct pair { const char *str, *exp; } pairs[] = { ++ { "", "." }, ++ { "/", "/" }, ++ { "//", "/" }, ++ { "///", "/" }, ++ { "./", "." }, ++ { ".", "." }, ++ { "..", "." }, ++ { "foo", "." }, ++ { "foo/", "." }, ++ { "foo//", "." }, ++ { "foo/bar", "foo" }, ++ { "foo/bar/", "foo" }, ++ { "foo/bar//", "foo" }, ++ { "foo//bar", "foo" }, ++ { "foo//bar/", "foo" }, ++ { "foo//bar//", "foo" }, ++ { "/foo", "/" }, ++ { "//foo", "/" }, ++ { "//foo/", "/" }, ++ { "//foo//", "/" }, ++ { 0 }, ++ }; ++ struct pair *pair; ++ struct archive_string s; ++ ++ archive_string_init(&s); ++ for (pair = pairs; pair->str; pair++) { ++ archive_strcpy(&s, pair->str); ++ archive_string_dirname(&s); ++ assertEqualString(pair->exp, s.s); ++ } ++} ++ + DEFINE_TEST(test_archive_string) + { + test_archive_string_ensure(); +@@ -365,6 +402,7 @@ DEFINE_TEST(test_archive_string) + test_archive_string_concat(); + test_archive_string_copy(); + test_archive_string_sprintf(); ++ test_archive_string_dirname(); + } + + static const char *strings[] = diff --git a/meta/recipes-extended/libarchive/libarchive_3.6.2.bb b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb index 65b4649147..e0b8b15df4 100644 --- a/meta/recipes-extended/libarchive/libarchive_3.6.2.bb +++ b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb @@ -43,6 +43,10 @@ SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ file://0001-Improve-lseek-handling-2564.patch \ file://CVE-2025-5918-01.patch \ file://CVE-2025-5918-02.patch \ + file://0001-Fix-max-path-length-metadata-writing-2243.patch \ + file://0001-Merge-pull-request-2696-from-al3xtjames-mkstemp.patch \ + file://0001-Merge-pull-request-2749-from-KlaraSystems-des-tempdi.patch \ + file://0001-Merge-pull-request-2753-from-KlaraSystems-des-temp-f.patch \ " UPSTREAM_CHECK_URI = "http://libarchive.org/" From patchwork Tue Nov 25 20:54:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 75382 X-Patchwork-Delegate: steve@sakoman.com 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 20B86D0EE31 for ; Tue, 25 Nov 2025 20:55:20 +0000 (UTC) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.4192.1764104111562697860 for ; Tue, 25 Nov 2025 12:55:11 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=MDhZKhrz; spf=softfail (domain: sakoman.com, ip: 209.85.216.51, mailfrom: steve@sakoman.com) Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-340bcc92c7dso121686a91.0 for ; Tue, 25 Nov 2025 12:55:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1764104111; x=1764708911; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/M3UsA8fV6t0fyXbOlzZRsQ+AJdCgCOlRODCI+9eUyA=; b=MDhZKhrzP1JpQ1gG9rtw4LBPIBrxUtPeQuLIFvNt+e91Yn1uq9D22GX841whH2gdXD 7zyohIM2nvFXnilDqZqr+63ex+KyIiKq/14KXTh0HNm2OohAAZVF8X6AytyfM9JbLPdF o86mR5iTKVMfzj7VsVvY9x9ydq4UFMQ36VKIXy+T+Tem7fPGeI4buoWOBY/BPKrBZ5c7 a82Nxt8C2aSQ6Hy2tW9wkuUNB1SoG9d7EX9CDERs3tRKmYO5lf+QwFMnoKJJRXAW0uS0 0zbnPjRS2ACh/cHzmpHvWHs+0B7MUCp5O45N4wDCa44Cj09eby6lWIOJ2/TtNMO8bERo ro7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764104111; x=1764708911; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=/M3UsA8fV6t0fyXbOlzZRsQ+AJdCgCOlRODCI+9eUyA=; b=xM+WU+tf4kYuzDX1FTjP618/6ziy3uDe5lvvLNv3ZvoDI3GtJ/8QZWCEmGYTBAD0F7 6oehQgs0jolvfufD1+OiooTMfsDWGgbHlrJsU2ySpAQJvnCd7sRjpAB0F2Kd3UYiPhjB ALGMSAwxLJSae2KnkIKA0qALNIErzFOhyc42y7PnMpZ7Vtknis4M0iLUWbROLrfwK3Es Sj65QSEEWtf0zRBXZoKlXsq/zuSeDDssqFk+3oEBdFVnxbq9VGySJlvqqigUgN+4yZt7 pZUNFJ6n1poHxu+YYm8eoEuVXjVWRYlwr4Zg7DNWwj5v1tWuDEzP20VkdyuCpBrJ6nVc TuqA== X-Gm-Message-State: AOJu0YzPH17dQYyDRx1TEiTkvbfDUrOQ4rot4Q4wIJzPEPEXdgMoVhvM niP7pjjfHq9TSkxhRTgBeu7vW5p1AvKQ6ZPyKEDl1EsnGgFUImTL3FVTtWWeY3u6J/fzc+fJFhZ S6LA2 X-Gm-Gg: ASbGncvZLXrgXvGo+oXPsM13TryUaXCJ9iqTQQvGzYY2AAcOAS9YkmgPVtwoBzbL04m ZV3447VZKmKm7v2qYLDqbYorUUCnqyhOAnB+C+9uYYBAtvVcM2wwLduJj4BQnkgfK4/kgjP5XTG an9HQGubQbWffdueCME/3QSufxLN8v9yrOyrJT8ll+ILWrwhOkbWOFgK5XyHnAiGmlyaIpOq9ES 1LESlATtkYIH5NwUuRtRaGuBLX/cHZzAOFne4PMoMoEO7FX6tpAq7LdtxcpWjNKXtKWTC0O5lx4 2dFkxxHC37v0dYETdBVVkcNy/ZxelfKZ44PSxlmZyHoApR8NLdr1TlSeZLxjh0Oxgja6oSzaZk4 XLd8V8+JjrruriqThpTbMPQaY2fFmjRsm6pHP2IOrOqt+L5nh0+J3QVdJ4tTTWhZ11sp/iVEbd6 fZBA== X-Google-Smtp-Source: AGHT+IEgaInThm3wqufzopCdbNp0AXv1BEMbgsmw0N32Z6Qa325xHC3Mb8sUTn5CVqzWJBzLXoDc4g== X-Received: by 2002:a17:90b:4d11:b0:340:bfcd:6af9 with SMTP id 98e67ed59e1d1-347331a7104mr15925040a91.3.1764104110675; Tue, 25 Nov 2025 12:55:10 -0800 (PST) Received: from hexa.. ([2602:feb4:3b:2100:5e34:462b:e2f0:5898]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3476a5a3099sm322602a91.11.2025.11.25.12.55.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 12:55:10 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 7/9] libarchive: patch 3.8.3 security issue 2 Date: Tue, 25 Nov 2025 12:54:50 -0800 Message-ID: <332f07635ccb4965a001f6536620c9d0b1a9c056.1764103986.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 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 ; Tue, 25 Nov 2025 20:55:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/226782 From: Peter Marko Pick patch [2] as listed in [1]. [1] https://github.com/libarchive/libarchive/releases/tag/v3.8.3 [2] https://github.com/libarchive/libarchive/pull/2768 Signed-off-by: Peter Marko Signed-off-by: Steve Sakoman --- ...-request-2768-from-Commandoss-master.patch | 28 +++++++++++++++++++ .../libarchive/libarchive_3.6.2.bb | 1 + 2 files changed, 29 insertions(+) create mode 100644 meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2768-from-Commandoss-master.patch diff --git a/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2768-from-Commandoss-master.patch b/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2768-from-Commandoss-master.patch new file mode 100644 index 0000000000..66e88c91b4 --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/0001-Merge-pull-request-2768-from-Commandoss-master.patch @@ -0,0 +1,28 @@ +From 82b57a9740aa6d084edcf4592a3b8e49f63dec98 Mon Sep 17 00:00:00 2001 +From: Tim Kientzle +Date: Fri, 31 Oct 2025 22:07:19 -0700 +Subject: [PATCH] Merge pull request #2768 from Commandoss/master + +Fix for an out-of-bounds buffer overrun when using p[H_LEVEL_OFFSET] + +(cherry picked from commit ce614c65246158bcb0dc1f9c1dce5a5af65f9827) + +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/82b57a9740aa6d084edcf4592a3b8e49f63dec98] +Signed-off-by: Peter Marko +--- + libarchive/archive_read_support_format_lha.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libarchive/archive_read_support_format_lha.c b/libarchive/archive_read_support_format_lha.c +index 2a84ad9d..abf8b879 100644 +--- a/libarchive/archive_read_support_format_lha.c ++++ b/libarchive/archive_read_support_format_lha.c +@@ -690,7 +690,7 @@ archive_read_format_lha_read_header(struct archive_read *a, + * a pathname and a symlink has '\' character, a directory + * separator in DOS/Windows. So we should convert it to '/'. + */ +- if (p[H_LEVEL_OFFSET] == 0) ++ if (lha->level == 0) + lha_replace_path_separator(lha, entry); + + archive_entry_set_mode(entry, lha->mode); diff --git a/meta/recipes-extended/libarchive/libarchive_3.6.2.bb b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb index e0b8b15df4..b834f2dbc3 100644 --- a/meta/recipes-extended/libarchive/libarchive_3.6.2.bb +++ b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb @@ -47,6 +47,7 @@ SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ file://0001-Merge-pull-request-2696-from-al3xtjames-mkstemp.patch \ file://0001-Merge-pull-request-2749-from-KlaraSystems-des-tempdi.patch \ file://0001-Merge-pull-request-2753-from-KlaraSystems-des-temp-f.patch \ + file://0001-Merge-pull-request-2768-from-Commandoss-master.patch \ " UPSTREAM_CHECK_URI = "http://libarchive.org/" From patchwork Tue Nov 25 20:54:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 75385 X-Patchwork-Delegate: steve@sakoman.com 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 26880D0EE2C for ; Tue, 25 Nov 2025 20:55:20 +0000 (UTC) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.4248.1764104113094153468 for ; Tue, 25 Nov 2025 12:55:13 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=dGt2ig6s; spf=softfail (domain: sakoman.com, ip: 209.85.216.41, mailfrom: steve@sakoman.com) Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-343ee44d89aso8540950a91.2 for ; Tue, 25 Nov 2025 12:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1764104112; x=1764708912; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RKVUn3q5ATxtITt6fxzM3Mcw/7i74lLjI1eiyW9/FM4=; b=dGt2ig6sOl+2J7H34tFXVVFlFAyIm8EIshD81E1ftfL1E2bxkTnEkvpZTf1Xp5bQab sKuo4cZCn7BUduU3WIO2p5zgvGwaL76N6uXwfQAdJPkgINNnMCAW8AFmMFde0Yb+jat8 m4F1d6WQtEuyV0Xi1/muMAcPkIheArU6L97m3w3azSldYjebO/WwUd+PQclzzPXEGjYL x0NzqzXBTug7/0Xpw/Chr6VzzP6bhVcJlxKchcanhwAJNZpT0Iz00TO0cho2ro3JP0jm 19QptM+7S8XeM0XFvRoGh+XFcqDeWPx2xZG0RSpY9xl5R8PB68KCdyWskQBNxWeU9r+Q dbuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764104112; x=1764708912; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=RKVUn3q5ATxtITt6fxzM3Mcw/7i74lLjI1eiyW9/FM4=; b=ugjr7sc+5HItckBzAxlhVzMq0SiAUfqIqZ2C95g1qrkmZcD4CzJ6avV1xr2vOvGROF A0GpzlV2BT5sZXewaVh/szFwnj4Y3HpD9NFY6rTuCDfhWd1ChzxSZQTB6IP/BqcFQu4Z 5NKvTP8JI+54y7DTJlETdued3G2K2vHjv7rkDheN3vdxdIWDger6DAXpYYCxwwglCDJb PJGWOVGHElO3N0oorqY4l1Z9fjqPXrqLozX+ljHuaPqxKt9GRI8xZRTjJslibaLidMjQ r/lz0CsI7diRnDMQM+5gfDC7CR9XOnvtc4l7cua8oCBnMuxV/FOj3mASE+7D53uzXZsG 7XvA== X-Gm-Message-State: AOJu0YwrigeeoYLe5Q/46NT041Q4PadGyKCxbCsiHXnuwkAQ0xtdv02X tn/oS1mKkFDJkOAB/M8xDplSQdqU9FNqhuo3ah9IX8sw+aM1b34gttI0KiohCf0aw/q11cKmjrz OfM64 X-Gm-Gg: ASbGncuN0P0jWvUDG4PVZJXl8DmgadJKWuxoJ4UbkoE7yHgexrrpcN9TKbTN3FyDzAc X5LJWNGtRgKWHv3pydiTRPjCZW2hGyQpVJUTJX6e8EK4tkTNDJNhx22hJ60ZDfV+If4UFD6LmFp ztED4ZXWbKbqX1iq2U/JYtFlr9V1/6IjwX+UGrMXoPe7aAiOt2OYyZn4NEei8gaMIZssvRFceqQ ywBBU8eqts/QhQ9LaEK59j8ECPL8Ienb9rdfY5l3dlIdZusT4/WHInsPdxhpy0mFH0rzX3fRAe9 yji7oBljvoy9rrPo4T7xGRnsMo9r5/DvRYzVGk7cEDVfyDDkojP6kCcHoTe4WOBl+VDUQiUoUZr d5+ebmsDHwNDgAuEM4RaD5ATAS7QVsmACP0IHbiO1V84y4Is3VmDOw6CwIYo1UNUFP0QXU9/WYM GMP6X2rC5clIYD X-Google-Smtp-Source: AGHT+IHnSmUiaJanGuzI1bCCQvJadzx8FmhRwU7cOogQijWM/jbtRb6T1K9zqo1L2ytNmuBbvNmFGA== X-Received: by 2002:a17:90b:2fc8:b0:340:776d:f4ca with SMTP id 98e67ed59e1d1-34733f34cfamr17679300a91.26.1764104112175; Tue, 25 Nov 2025 12:55:12 -0800 (PST) Received: from hexa.. ([2602:feb4:3b:2100:5e34:462b:e2f0:5898]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3476a5a3099sm322602a91.11.2025.11.25.12.55.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 12:55:11 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 8/9] libarchive: patch CVE-2025-60753 Date: Tue, 25 Nov 2025 12:54:51 -0800 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 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 ; Tue, 25 Nov 2025 20:55:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/226783 From: Peter Marko Pick patch from [3] marked in [2] mentioned in [1]. [1] https://nvd.nist.gov/vuln/detail/CVE-2025-60753 [2] https://github.com/libarchive/libarchive/issues/2725 [3] https://github.com/libarchive/libarchive/pull/2787 Signed-off-by: Peter Marko Signed-off-by: Steve Sakoman --- .../libarchive/CVE-2025-60753.patch | 76 +++++++++++++++++++ .../libarchive/libarchive_3.6.2.bb | 1 + 2 files changed, 77 insertions(+) create mode 100644 meta/recipes-extended/libarchive/libarchive/CVE-2025-60753.patch diff --git a/meta/recipes-extended/libarchive/libarchive/CVE-2025-60753.patch b/meta/recipes-extended/libarchive/libarchive/CVE-2025-60753.patch new file mode 100644 index 0000000000..604e0421be --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/CVE-2025-60753.patch @@ -0,0 +1,76 @@ +From 3150539edb18690c2c5f81c37fd2d3a35c69ace5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?ARJANEN=20Lo=C3=AFc=20Jean=20David?= +Date: Fri, 14 Nov 2025 20:34:48 +0100 +Subject: [PATCH] Fix bsdtar zero-length pattern issue. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Uses the sed-like way (and Java-like, and .Net-like, and Javascript-like…) to fix this issue of advancing the string to be processed by one if the match is zero-length. + +Fixes libarchive/libarchive#2725 and solves libarchive/libarchive#2438. + +CVE: CVE-2025-60753 +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/3150539edb18690c2c5f81c37fd2d3a35c69ace5] +Signed-off-by: Peter Marko +--- + tar/subst.c | 19 ++++++++++++------- + tar/test/test_option_s.c | 8 +++++++- + 2 files changed, 19 insertions(+), 8 deletions(-) + +diff --git a/tar/subst.c b/tar/subst.c +index 9747abb9..902a4d64 100644 +--- a/tar/subst.c ++++ b/tar/subst.c +@@ -237,7 +237,9 @@ apply_substitution(struct bsdtar *bsdtar, const char *name, char **result, + continue; + } + +- while (1) { ++ char isEnd = 0; ++ do { ++ isEnd = *name == '\0'; + if (regexec(&rule->re, name, 10, matches, 0)) + break; + +@@ -291,12 +293,15 @@ apply_substitution(struct bsdtar *bsdtar, const char *name, char **result, + } + + realloc_strcat(result, rule->result + j); +- +- name += matches[0].rm_eo; +- +- if (!rule->global) +- break; +- } ++ if (matches[0].rm_eo > 0) { ++ name += matches[0].rm_eo; ++ } else { ++ // We skip a character because the match is 0-length ++ // so we need to add it to the output ++ realloc_strncat(result, name, 1); ++ name += 1; ++ } ++ } while (rule->global && !isEnd); // Testing one step after because sed et al. run 0-length patterns a last time on the empty string at the end + } + + if (got_match) +diff --git a/tar/test/test_option_s.c b/tar/test/test_option_s.c +index 564793b9..90b4c471 100644 +--- a/tar/test/test_option_s.c ++++ b/tar/test/test_option_s.c +@@ -61,7 +61,13 @@ DEFINE_TEST(test_option_s) + systemf("%s -cf test1_2.tar -s /d1/d2/ in/d1/foo", testprog); + systemf("%s -xf test1_2.tar -C test1", testprog); + assertFileContents("foo", 3, "test1/in/d2/foo"); +- ++ systemf("%s -cf test1_3.tar -s /o/#/g in/d1/foo", testprog); ++ systemf("%s -xf test1_3.tar -C test1", testprog); ++ assertFileContents("foo", 3, "test1/in/d1/f##"); ++ // For the 0-length pattern check, remember that "test1/" isn't part of the string affected by the regexp ++ systemf("%s -cf test1_4.tar -s /f*/\\<~\\>/g in/d1/foo", testprog); ++ systemf("%s -xf test1_4.tar -C test1", testprog); ++ assertFileContents("foo", 3, "test1/<>i<>n<>/<>d<>1<>/<>o<>o<>"); + /* + * Test 2: Basic substitution when extracting archive. + */ diff --git a/meta/recipes-extended/libarchive/libarchive_3.6.2.bb b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb index b834f2dbc3..66f30ec89b 100644 --- a/meta/recipes-extended/libarchive/libarchive_3.6.2.bb +++ b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb @@ -48,6 +48,7 @@ SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ file://0001-Merge-pull-request-2749-from-KlaraSystems-des-tempdi.patch \ file://0001-Merge-pull-request-2753-from-KlaraSystems-des-temp-f.patch \ file://0001-Merge-pull-request-2768-from-Commandoss-master.patch \ + file://CVE-2025-60753.patch \ " UPSTREAM_CHECK_URI = "http://libarchive.org/" From patchwork Tue Nov 25 20:54:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 75384 X-Patchwork-Delegate: steve@sakoman.com 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 2EB6CD0EE34 for ; Tue, 25 Nov 2025 20:55:20 +0000 (UTC) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.4251.1764104114465149082 for ; Tue, 25 Nov 2025 12:55:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=KY07wi7I; spf=softfail (domain: sakoman.com, ip: 209.85.216.42, mailfrom: steve@sakoman.com) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-340a5c58bf1so4030217a91.2 for ; Tue, 25 Nov 2025 12:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1764104114; x=1764708914; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RAQJlYeA4Z3o0tkvXlT1yGfxn+6mIiwAIQhp2urkQEA=; b=KY07wi7InEeOXD4ir1SSE0CBHLdnCcyDAGa9npBGcjmx51e4EPaB44p3+3+stkOJGT DcQADA/4pvAo8EnjelL3JpbXmFbpJukXDTU2rWuKKEpUffgY/E+df4tTA2zweLy056Ml tionrgyUq6Nq5pvX1X0hD+TxgBhyqfFOqq4rJmA4lowjnAcmt6QNtxbAQbzR8YKSuMv0 88jZXZxq5gysd8mReh9U9FTN1nvX0uMSKdE9RVvFDh0TZIn134dRX3EQrgWd4OZld+7t ZBvnkDK+ruCF9E6Jl7vsm7KK210eph2HkkfMHF8OrKm7szjqA9d8c1qxonBojFB0m3/H 6oqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764104114; x=1764708914; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=RAQJlYeA4Z3o0tkvXlT1yGfxn+6mIiwAIQhp2urkQEA=; b=bAG6Ik3o2ea5rVExxnwsxsN12PoV8ZLErY9c5yUpOUEOdc1l7xKYXLh3ECkpvS7O2P oM66Yv/vSmI6eP7Pz4bkESsOSvL5YZMijaEW5FU/EjVuVjvDHpyWc8Ovt+gvcyl5Ut23 efzJ2Hi92vRz6bat3tZicvR2My7kTQxOe6LLXKxquhLt3I8twp319keCJFSw4fNo3FkS 7gcwfHKjN1jiayyoJh1OX+u5BDstMbu6ADjtE4bWUFizFdYc8hXAKNmIz8cb3ZbKvBVJ WZvwvKSO/bPqTHrWUHiCc9CP5bc/h3EhO7HkrT9ryjhzwhtKgg1V7y1+MxqI5Sta3dGl 15nw== X-Gm-Message-State: AOJu0YxJsnyjtfcBnBOaZ3eVTKFMywC8BIS7y8QyxEu8sMZV+LLRRUPO e4BUCCydEHOwU1msk7a3w1gqGnM+wMFvI5RW2qlyGBXidAxRxVwEhoYxH2J61uGxbMZdCX9ivH5 vGnTb X-Gm-Gg: ASbGncvOGJX49cgebSCpHDQij/H7YokrscZpdBSm3pQYyytO4++Rz2thGrxoPL2p4zL 15dUqkglSCOPfr+mKZMDZZkSp5vKA85rpCVCQOnE7gaBpsjGLr6uxtTtDWZTeqdAO+phvmlwPQw 1UIhivytzZmIGPdop/J4+y3RhLIPuwJzPYZJiksAajFQ5ZhOM7MCyezZwtlSok8EhkKMaAxYvRW artrg3iebQP39n+Ct22i2i2gx1WxulQNM58Uzp9ZiimgefZ4kjcTy5Mtk99KXR31qL6ZdYXpNsp rcs7Q8Z8pzVcM6EdSEUn50G1wpfReIRRLnbfyY0lGC5EoXat8fCVdeTNxDWseMvPGlrIhc2WMmT USWwpqheKjtOPmMoVEo5zDflectoXVCctxspml/iH4njLfElQppHuAYNDVo5t8uDrrRFcTQiHt2 jJXg== X-Google-Smtp-Source: AGHT+IEHVToGhSS0XUD4eUbWJ2zsY3uGRcWBgM8rraa1jhidj2cP/FgicX3pqkCt2S37FOGgtc8VzQ== X-Received: by 2002:a17:90b:164c:b0:340:ad5e:cd with SMTP id 98e67ed59e1d1-3475ebe68f2mr3850192a91.5.1764104113598; Tue, 25 Nov 2025 12:55:13 -0800 (PST) Received: from hexa.. ([2602:feb4:3b:2100:5e34:462b:e2f0:5898]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3476a5a3099sm322602a91.11.2025.11.25.12.55.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 12:55:13 -0800 (PST) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 9/9] flac: patch seeking bug Date: Tue, 25 Nov 2025 12:54:52 -0800 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 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 ; Tue, 25 Nov 2025 20:55:20 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/226784 From: Gyorgy Sarvari While working on audiofile recipe from meta-oe, a test that is using flac to convert a flac file failed with this particular version of the recipe. Bisecting the issue pointed to a code snippet that later was modifed with the patch that is introduced here: in version 1.3.4 there is a bug with seeking in flac files, returning incorrect pointers. This backported patch fixes this (and fixes the ptest also, that triggered this). Signed-off-by: Gyorgy Sarvari Signed-off-by: Steve Sakoman --- .../flac/files/0001-Fix-seeking-bug.patch | 34 +++++++++++++++++++ meta/recipes-multimedia/flac/flac_1.3.4.bb | 3 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-multimedia/flac/files/0001-Fix-seeking-bug.patch diff --git a/meta/recipes-multimedia/flac/files/0001-Fix-seeking-bug.patch b/meta/recipes-multimedia/flac/files/0001-Fix-seeking-bug.patch new file mode 100644 index 0000000000..dadedcc168 --- /dev/null +++ b/meta/recipes-multimedia/flac/files/0001-Fix-seeking-bug.patch @@ -0,0 +1,34 @@ +From 1817916388cd8180f4411e6d0eb89a8c6916dce6 Mon Sep 17 00:00:00 2001 +From: Martijn van Beurden +Date: Mon, 25 Apr 2022 20:29:57 +0200 +Subject: [PATCH] Fix seeking bug + +Commit 159cd6c introduced a bug that only triggered upon seeking +from the start of a headerless FLAC file to the first frame (so +really not a seek at all). Furthermore that commit did nothing +else in any other circumstance. This commit fixes that, by both +fixing the problem and the behaviour the commit mentioned earlier +meant to introduce. + +Co-authored-by: Robert Kausch + +Upstream-Status: Backport [https://github.com/xiph/flac/commit/7e785eb9a84f9147246eb2b0e5e35ec01db5a815] +Signed-off-by: Gyorgy Sarvari +--- + src/libFLAC/stream_decoder.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c +index ef6da44..bc78645 100644 +--- a/src/libFLAC/stream_decoder.c ++++ b/src/libFLAC/stream_decoder.c +@@ -3077,7 +3077,8 @@ FLAC__bool seek_to_absolute_sample_(FLAC__StreamDecoder *decoder, FLAC__uint64 s + upper_bound = stream_length; + upper_bound_sample = total_samples > 0 ? total_samples : target_sample /*estimate it*/; + +- if(decoder->protected_->state == FLAC__STREAM_DECODER_READ_FRAME) { ++ if(decoder->protected_->state == FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC && ++ decoder->private_->samples_decoded != 0) { + if(target_sample < decoder->private_->samples_decoded) { + if(FLAC__stream_decoder_get_decode_position(decoder, &upper_bound)) + upper_bound_sample = decoder->private_->samples_decoded; diff --git a/meta/recipes-multimedia/flac/flac_1.3.4.bb b/meta/recipes-multimedia/flac/flac_1.3.4.bb index 1a44718bba..6df0668783 100644 --- a/meta/recipes-multimedia/flac/flac_1.3.4.bb +++ b/meta/recipes-multimedia/flac/flac_1.3.4.bb @@ -16,7 +16,8 @@ DEPENDS = "libogg" SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \ file://CVE-2020-22219.patch \ -" + file://0001-Fix-seeking-bug.patch \ + " SRC_URI[sha256sum] = "8ff0607e75a322dd7cd6ec48f4f225471404ae2730d0ea945127b1355155e737"