From patchwork Mon Oct 19 05:07:35 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 101238 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 B4BE1CCF2E0 for ; Mon, 19 Oct 2026 05:07:58 +0000 (UTC) Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.27954.1792386476550505389 for ; Sun, 18 Oct 2026 22:07:57 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: message contains an insecure body length tag" header.i=@cisco.com header.s=iport01 header.b=JgO+Ww23; spf=pass (domain: cisco.com, ip: 173.37.86.77, mailfrom: dkelaiya@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=10703; q=dns/txt; s=iport01; t=1792386476; x=1793596076; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9l+oJADNvXMs2JQd0XK6Sb/P1j2XlxGDNWURn4i1AYQ=; b=JgO+Ww23yx3ONUlw71fP4ZUXLTh+5pqTOt7Kiy7UJb8bQtgNOGvXE99X LUtF99sn+juylfezRiMOSp33zWC4cDFwr+dMewHNuhMUpKNf6CjB5u9lF IFopu7V/OWAF8DxJo0l/99TNNYN3HManmbiLZ4i5oJGNK0qovc4mT9VlS cqEYsXV+Nanfwhy4nzBiulbv0P2TFRw5ykhy4X9BTdZoW2SjWz0eQReWm ArjrP10CihupOapI3xGb/LdHH8VKMQjn5B2RMMMMW2FSyJ0vD39ShQMlv BLFuFRFajACJLeIw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qUW3clVWmwJ2 cYyEywMQhGth9upwLi0H7wEasQLdKEHPasFsX1miDWcBvE8TNWbGOPB5MRT23E7gcUm8fT2P pVCL2EwKk6dPlsWZg9/5JEWxI9EglHzcDBcoVOErII84nPYy0p6172F3N/9J4fVHJgJwR7Dz o7A13v2DBI4PeXP9SWi812DjbWTgxjUXqtHQdVU8dYv2jV/3Fc7DwUbU1a+q/S1hkOyHt5SN UEQ0i4vtrQpskuzQ9/wWhe1rHKJslgbQdU4LgEhwBuGxqyR50OSAXIJC2YaLtcnr8QxAzct0 zdlgu/UONCmi5XNIVr1y1tehWna1fQ9RYPaWRI5cA== IronPort-HdrOrdr: A9a23:xJv5qKjb/vXQq9b/fg/+yQgbUHBQXvgji2hC6mlwRA09TyVXra +TdZMgpHjJYVkqOU3I9ersBEDEewK/yXcX2/h0AV7dZmnbUQKTRekIh7cKgQeQfhEWndQy6U 4PScRD4aXLfDtHpPe/xhWkGNA9x9TC2qWpieDCi0pJd2hRGsddB8MTMHfiLqWwLzM2fKYEKA == X-Talos-CUID: 9a23:3JeNqGCmB2xNRNX6EydA22xPF4cJSFfm0Hb8ImG4MHlpQrLAHA== X-Talos-MUID: 9a23:2OmiLg0wsO64SrlL/MFRVFQMMjUj/KugC2IEqMU6pO6FGgN7YWuDtxuxa9py X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,167,1787011200"; d="scan'208";a="537154703" Received: from rcdn-l-core-03.cisco.com ([173.37.255.140]) by rcdn-iport-6.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 19 Oct 2026 05:07:55 +0000 Received: from sjc-ads-5675.cisco.com (sjc-ads-5675.cisco.com [10.28.88.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by rcdn-l-core-03.cisco.com (Postfix) with ESMTPS id 9619F180001EB; Mon, 19 Oct 2026 05:07:55 +0000 (GMT) Received: by sjc-ads-5675.cisco.com (Postfix, from userid 1887444) id 3AE24CBF201; Sun, 18 Oct 2026 22:07:55 -0700 (PDT) From: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-devel@lists.openembedded.org Cc: Darsh Kelaiya Subject: [oe][meta-filesystems][wrynose][PATCH 1/7] ntfs-3g-ntfsprogs: fix CVE-2026-46572 and CVE-2026-42617 Date: Sun, 18 Oct 2026 22:07:35 -0700 Message-Id: <20261019050741.1688261-2-dkelaiya@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261019050741.1688261-1-dkelaiya@cisco.com> References: <20261019050741.1688261-1-dkelaiya@cisco.com> MIME-Version: 1.0 X-Outbound-Client-TLS: ANONYMOUS;sjc-ads-5675.cisco.com [10.28.88.189];TLSv1.3;TLS_AES_256_GCM_SHA384;256 X-Outbound-SMTP-Client: 10.28.88.189, sjc-ads-5675.cisco.com X-Outbound-Node: rcdn-l-core-03.cisco.com 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 ; Mon, 19 Oct 2026 05:07:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/131111 From: Darsh Kelaiya This patch applies the upstream fixes shown in [1], [2], and [3]. The NVD records describing the vulnerabilities are referenced in [4] and [5]. [1] https://github.com/tuxera/ntfs-3g/commit/2ead8a3ccf940c0219ffba587fab54e21462b3a5 [2] https://github.com/tuxera/ntfs-3g/commit/dfd1a7c6eb23a22238ec193451fa59c989b4381f [3] https://github.com/tuxera/ntfs-3g/commit/edf2b892356684ca8f2fc5898943c7a9b90ffb80 [4] https://nvd.nist.gov/vuln/detail/CVE-2026-46572 [5] https://nvd.nist.gov/vuln/detail/CVE-2026-42617 Signed-off-by: Darsh Kelaiya --- .../CVE-2026-46572_CVE-2026-42617_p1.patch | 66 +++++++++++ .../CVE-2026-46572_CVE-2026-42617_p2.patch | 104 ++++++++++++++++++ .../CVE-2026-46572_CVE-2026-42617_p3.patch | 35 ++++++ .../ntfs-3g-ntfsprogs_2022.10.3.bb | 3 + 4 files changed, 208 insertions(+) create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p1.patch create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p2.patch create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p3.patch diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p1.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p1.patch new file mode 100644 index 0000000000..47121ea9a5 --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p1.patch @@ -0,0 +1,66 @@ +From 7a3fccddc2bca7609fd6597fcb6ea8a42a258937 Mon Sep 17 00:00:00 2001 +From: Erik Larsson +Date: Fri, 24 Apr 2026 13:00:30 +0300 +Subject: [PATCH] index.c: Validate the size of data copied from root to index + block. + +If the last entry extends beyond the index block size, we could copy +more bytes than allocated into the index block, overflowing its +allocation. Fixed by adding a bounds check prior to the memcpy, emitting +an error message and returning NULL with errno == EIO as this is an +inconsistency. + +Thanks to Alexandro Calo' from Nozomi Networks Labs for reporting this +issue. + +CVE: CVE-2026-46572 CVE-2026-42617 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/2ead8a3ccf940c0219ffba587fab54e21462b3a5] + +(cherry picked from commit 2ead8a3ccf940c0219ffba587fab54e21462b3a5) +Signed-off-by: Darsh Kelaiya +--- + libntfs-3g/index.c | 18 ++++++++++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) + +diff --git a/libntfs-3g/index.c b/libntfs-3g/index.c +index e48d6aaf..2739594b 100644 +--- a/libntfs-3g/index.c ++++ b/libntfs-3g/index.c +@@ -1091,14 +1091,16 @@ out: + + static INDEX_BLOCK *ntfs_ir_to_ib(INDEX_ROOT *ir, VCN ib_vcn) + { ++ u32 ib_size; + INDEX_BLOCK *ib; + INDEX_ENTRY *ie_last; + char *ies_start, *ies_end; + int i; + + ntfs_log_trace("Entering\n"); +- +- ib = ntfs_ib_alloc(ib_vcn, le32_to_cpu(ir->index_block_size), LEAF_NODE); ++ ++ ib_size = le32_to_cpu(ir->index_block_size); ++ ib = ntfs_ib_alloc(ib_vcn, ib_size, LEAF_NODE); + if (!ib) + return NULL; + +@@ -1110,6 +1112,18 @@ static INDEX_BLOCK *ntfs_ir_to_ib(INDEX_ROOT *ir, VCN ib_vcn) + * as well, which can never have any data. + */ + i = (char *)ie_last - ies_start + le16_to_cpu(ie_last->length); ++ ++ if (offsetof(INDEX_BLOCK, index) + le32_to_cpu(ib->index.entries_offset) ++ + i > ib_size) ++ { ++ ntfs_log_error("Last entry in index root overflows the index " ++ "block size: %d (index block size: %lu)\n", ++ i, (unsigned long)ib_size); ++ free(ib); ++ errno = EIO; ++ return NULL; ++ } ++ + memcpy(ntfs_ie_get_first(&ib->index), ies_start, i); + + ib->index.ih_flags = ir->index.ih_flags; diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p2.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p2.patch new file mode 100644 index 0000000000..d2d40124fe --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p2.patch @@ -0,0 +1,104 @@ +From 51475eab2d2a559e10a8d3772d56444feffc13a4 Mon Sep 17 00:00:00 2001 +From: Rakesh Pandit +Date: Mon, 8 Jun 2026 09:27:45 +0300 +Subject: [PATCH] Validate index entry stream while reading from disk. + +Add ntfs_ie_stream_inconsistent() to walk the IE stream once and verify +every entry: header fits, length is sane and 8-byte aligned, entry fits, +and the END entry terminates the stream exactly. Call it from +ntfs_attr_inconsistent() for INDEX_ROOT and from +ntfs_index_block_inconsistent() for INDX blocks so callers can rely on +the IE stream being well-formed. + +CVE: CVE-2026-46572 CVE-2026-42617 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/dfd1a7c6eb23a22238ec193451fa59c989b4381f] + +(cherry picked from commit dfd1a7c6eb23a22238ec193451fa59c989b4381f) +Signed-off-by: Darsh Kelaiya +--- + include/ntfs-3g/index.h | 1 + + libntfs-3g/attrib.c | 3 +++ + libntfs-3g/index.c | 37 ++++++++++++++++++++++++++++++++++++- + 3 files changed, 40 insertions(+), 1 deletion(-) + +diff --git a/include/ntfs-3g/index.h b/include/ntfs-3g/index.h +index d001863a..1d5845d4 100644 +--- a/include/ntfs-3g/index.h ++++ b/include/ntfs-3g/index.h +@@ -143,6 +143,7 @@ extern int ntfs_index_block_inconsistent(const INDEX_BLOCK *ib, u32 block_size, + u64 inum, VCN vcn); + extern int ntfs_index_entry_inconsistent(const INDEX_ENTRY *ie, + COLLATION_RULES collation_rule, u64 inum); ++extern int ntfs_ie_stream_inconsistent(const INDEX_HEADER *ih, u64 inum); + extern int ntfs_index_lookup(const void *key, const int key_len, + ntfs_index_context *ictx) __attribute_warn_unused_result__; + +diff --git a/libntfs-3g/attrib.c b/libntfs-3g/attrib.c +index efb91943..ad9ebceb 100644 +--- a/libntfs-3g/attrib.c ++++ b/libntfs-3g/attrib.c +@@ -3542,6 +3542,9 @@ int ntfs_attr_inconsistent(const ATTR_RECORD *a, const MFT_REF mref) + (long long)inum); + errno = EIO; + ret = -1; ++ } else if (ntfs_ie_stream_inconsistent(&ir->index, inum)) { ++ errno = EIO; ++ ret = -1; + } + break; + case AT_STANDARD_INFORMATION : +diff --git a/libntfs-3g/index.c b/libntfs-3g/index.c +index 2739594b..c9651a62 100644 +--- a/libntfs-3g/index.c ++++ b/libntfs-3g/index.c +@@ -504,6 +504,8 @@ int ntfs_index_block_inconsistent(const INDEX_BLOCK *ib, u32 block_size, + (unsigned long long)inum); + return -1; + } ++ if (ntfs_ie_stream_inconsistent(&ib->index, inum)) ++ return -1; + + return (0); + } +@@ -560,7 +562,40 @@ int ntfs_index_entry_inconsistent(const INDEX_ENTRY *ie, + return (ret); + } + +-/** ++int ntfs_ie_stream_inconsistent(const INDEX_HEADER *ih, u64 inum) ++{ ++ const u8 *ies_start = (const u8 *)ih + le32_to_cpu(ih->entries_offset); ++ const u8 *ies_end = (const u8 *)ih + le32_to_cpu(ih->index_length); ++ const u8 *ie; ++ ++ ntfs_log_trace("Entering\n"); ++ ++ for (ie = ies_start; ie < ies_end; ) { ++ u32 len; ++ const INDEX_ENTRY *ent = (const INDEX_ENTRY *)ie; ++ ++ if ((size_t)(ies_end - ie) < sizeof(INDEX_ENTRY_HEADER)) ++ goto err; ++ len = le16_to_cpu(ent->length); ++ if (len < sizeof(INDEX_ENTRY_HEADER) || (len & 7)) ++ goto err; ++ if ((size_t)(ies_end - ie) < len) ++ goto err; ++ if (ent->ie_flags & INDEX_ENTRY_END) { ++ /* END must terminate the stream exactly. */ ++ if (ie + len != ies_end) ++ goto err; ++ return 0; ++ } ++ ie += len; ++ } ++err: ++ ntfs_log_error("Corrupt index entry stream in inode %lld\n", ++ (long long)inum); ++ return -1; ++} ++ ++/** + * Find a key in the index block. + * + * Return values: diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p3.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p3.patch new file mode 100644 index 0000000000..54bce4f95e --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46572_CVE-2026-42617_p3.patch @@ -0,0 +1,35 @@ +From c8630e735204fd4ed4b49c4dc315716664b965c1 Mon Sep 17 00:00:00 2001 +From: Rakesh Pandit +Date: Mon, 8 Jun 2026 09:57:11 +0300 +Subject: [PATCH] Validate INDEX_ROOT.index_block_size from disk. + +Reject INDEX_ROOT attributes whose index_block_size is smaller than +NTFS_BLOCK_SIZE or not a power of two. Same rule the driver already +applies at libntfs-3g/dir.c. + +Thanks to Alexandro Calo' from Nozomi Networks Labs for the report. + +CVE: CVE-2026-46572 CVE-2026-42617 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/edf2b892356684ca8f2fc5898943c7a9b90ffb80] + +(cherry picked from commit edf2b892356684ca8f2fc5898943c7a9b90ffb80) +Signed-off-by: Darsh Kelaiya +--- + libntfs-3g/attrib.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libntfs-3g/attrib.c b/libntfs-3g/attrib.c +index ad9ebceb..cfc2446e 100644 +--- a/libntfs-3g/attrib.c ++++ b/libntfs-3g/attrib.c +@@ -3528,6 +3528,10 @@ int ntfs_attr_inconsistent(const ATTR_RECORD *a, const MFT_REF mref) + if (a->non_resident + || (le32_to_cpu(a->value_length) + < offsetof(INDEX_ROOT, index.reserved)) ++ || (le32_to_cpu(ir->index_block_size) ++ < NTFS_BLOCK_SIZE) ++ || (le32_to_cpu(ir->index_block_size) ++ & (le32_to_cpu(ir->index_block_size) - 1)) + || (le32_to_cpu(ir->index.entries_offset) + < sizeof(INDEX_HEADER)) + || (le32_to_cpu(ir->index.index_length) diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb index 3a7dd783b9..4ed47ff53a 100644 --- a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb @@ -9,6 +9,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ SRC_URI = "git://github.com/tuxera/ntfs-3g;protocol=https;branch=edge;tag=${PV} \ file://0001-libntfs-3g-Makefile.am-fix-install-failed-while-host.patch \ file://0001-unistr.c-Fix-use-after-free-in-ntfs_uppercase_mbs.patch \ + file://CVE-2026-46572_CVE-2026-42617_p1.patch \ + file://CVE-2026-46572_CVE-2026-42617_p2.patch \ + file://CVE-2026-46572_CVE-2026-42617_p3.patch \ " SRCREV = "78414d93613532fd82f3a82aba5d4a1c32898781" From patchwork Mon Oct 19 05:07:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 101239 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 C7BBECCF2E4 for ; Mon, 19 Oct 2026 05:07:58 +0000 (UTC) Received: from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.28000.1792386476642148574 for ; Sun, 18 Oct 2026 22:07:56 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: message contains an insecure body length tag" header.i=@cisco.com header.s=iport01 header.b=jS0iVUhQ; spf=pass (domain: cisco.com, ip: 173.37.86.80, mailfrom: dkelaiya@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=3542; q=dns/txt; s=iport01; t=1792386476; x=1793596076; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4wnPE8iJxSqew2NrZ+V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uYcGwvIc6UvmWo+t 512huHodZ5yEzmE4Ej9atANlFEkvYmQXL3wFeXYDS54QA5gWU8JhAlq8wIDqtYAbeORXUXX5 rsen+WFYAX7gmYtYzpNg06+gEoHUMra6WtwUmMWPZinjHeG/1EJAZQWI72GLneQauF8Au6gS u/f+6qy92Xf8g1FIovNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ajs7XAMEhhXJ/0F1lqTzeJ OJl7vRcQS9xVkHFdX90vxNwS0mSNoUekFPLzOTWXcG7lyX7n3XQL/pGLx4wIrEYqrxNCE5C3 OEjGB9cczOevrfjqF67YrEEasULNsLnOsYb/3pn1zycVadgSpHYSKKM7thdtNsyrpkRRrCFO IxDNGcpNUieC/FMEg9/5JYWkOSlgnD+YjRwo1OOrq1x6G/WpOB0+OW2boCFI4HTFK25mG6zj DuWzz66Oy0cbteO6jSL6Uy3qfXAyHaTtIU6UefQGuRRqFqLy2oeDRcbWVe2rby1h1CzX/pbK lcI4WwptaU0+UmhQ9XxUhH+p2SL1iPwQPJKGOE8rQXIwa3O7kPBVy4PTyVKb5ots8peqSEW6 2JlVujBXVRH2IB5g1rEnltIhVte4RQoEFI= IronPort-HdrOrdr: A9a23:pMWwGayXRiUFfofcQgQuKrPwDr1zdoMgy1knxilNoNJuHfBw8P re+8jzuiWUtN98YhwdcJW7Scu9qBDnhPpICPcqXYtKNTOO0ADDEGgh1/qG/9SKIUPDH4BmuZ uIC5IOa+HYPBxdkdvw5hW+HpILxdmK973tuMLlpk0dKz2Dr8pbnn9E4sHxKDwOeDV7 X-Talos-CUID: 9a23:gODpcGzvhXVYr7n3SnGoBgU3RcY6Tn2Nlk3ZDEORFF1ZZ+yIakKprfY= X-Talos-MUID: 9a23:afiRFwnGjkxsj0pZg/pXdnpJHp440/7tMXwLy54XmMeKLhJrFC2S2WE= X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,167,1787011200"; d="scan'208";a="536281519" Received: from rcdn-l-core-09.cisco.com ([173.37.255.146]) by rcdn-iport-9.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 19 Oct 2026 05:07:55 +0000 Received: from sjc-ads-5675.cisco.com (sjc-ads-5675.cisco.com [10.28.88.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by rcdn-l-core-09.cisco.com (Postfix) with ESMTPS id 99BA71800048E; Mon, 19 Oct 2026 05:07:55 +0000 (GMT) Received: by sjc-ads-5675.cisco.com (Postfix, from userid 1887444) id 3F604CBF202; Sun, 18 Oct 2026 22:07:55 -0700 (PDT) From: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-devel@lists.openembedded.org Cc: Darsh Kelaiya Subject: [oe][meta-filesystems][wrynose][PATCH 2/7] ntfs-3g-ntfsprogs: fix CVE-2026-46571 Date: Sun, 18 Oct 2026 22:07:36 -0700 Message-Id: <20261019050741.1688261-3-dkelaiya@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261019050741.1688261-1-dkelaiya@cisco.com> References: <20261019050741.1688261-1-dkelaiya@cisco.com> MIME-Version: 1.0 X-Outbound-Client-TLS: ANONYMOUS;sjc-ads-5675.cisco.com [10.28.88.189];TLSv1.3;TLS_AES_256_GCM_SHA384;256 X-Outbound-SMTP-Client: 10.28.88.189, sjc-ads-5675.cisco.com X-Outbound-Node: rcdn-l-core-09.cisco.com 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 ; Mon, 19 Oct 2026 05:07:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/131109 From: Darsh Kelaiya This patch applies the upstream fix shown in [1]. The NVD record describing the vulnerability is referenced in [2]. [1] https://github.com/tuxera/ntfs-3g/commit/b912272b30c552b0457e40a0a68b1fac2587aaea [2] https://nvd.nist.gov/vuln/detail/CVE-2026-46571 Signed-off-by: Darsh Kelaiya --- .../files/CVE-2026-46571.patch | 50 +++++++++++++++++++ .../ntfs-3g-ntfsprogs_2022.10.3.bb | 1 + 2 files changed, 51 insertions(+) create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46571.patch diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46571.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46571.patch new file mode 100644 index 0000000000..b2739f026e --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46571.patch @@ -0,0 +1,50 @@ +From fc32321c8c795e9f73cbdd8f36fcd9e0a3a9814b Mon Sep 17 00:00:00 2001 +From: Rakesh Pandit +Date: Mon, 8 Jun 2026 14:16:39 +0300 +Subject: [PATCH] reparse.c: Bounds-check locase index in ntfs_fix_file_name. + +The case-insensitive branch indexed vol->locase with a raw 16-bit code +point and no check against vol->upcase_len. A truncated $UpCase made +the table shorter than 65536 entries, so a file name character >= +upcase_len read past it and leaked 2 heap bytes via the symlink target +returned to userspace. + +Thanks to Alexandro Calo' from Nozomi Networks Labs for reporting this +issue. + +CVE: CVE-2026-46571 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/b912272b30c552b0457e40a0a68b1fac2587aaea] + +(cherry picked from commit b912272b30c552b0457e40a0a68b1fac2587aaea) +Signed-off-by: Darsh Kelaiya +--- + libntfs-3g/reparse.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/libntfs-3g/reparse.c b/libntfs-3g/reparse.c +index 76dbe2f1..54858caa 100644 +--- a/libntfs-3g/reparse.c ++++ b/libntfs-3g/reparse.c +@@ -196,11 +196,19 @@ static u64 ntfs_fix_file_name(ntfs_inode *dir_ni, ntfschar *uname, + lemref = entry->indexed_file; + mref = le64_to_cpu(lemref); + if (NVolCaseSensitive(vol) || !vol->locase) { +- for (i=0; ifile_name_length; i++) ++ for (i=0; ifile_name_length; ++ i++) + uname[i] = found->file_name[i]; + } else { +- for (i=0; ifile_name_length; i++) +- uname[i] = vol->locase[le16_to_cpu(found->file_name[i])]; ++ for (i=0; ifile_name_length; ++ i++) { ++ u16 u = le16_to_cpu(found-> ++ file_name[i]); ++ uname[i] = (u < vol->upcase_len) ++ ? vol->locase[u] ++ : found-> ++ file_name[i]; ++ } + } + } + } diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb index 4ed47ff53a..1e1b5bc54a 100644 --- a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb @@ -12,6 +12,7 @@ SRC_URI = "git://github.com/tuxera/ntfs-3g;protocol=https;branch=edge;tag=${PV} file://CVE-2026-46572_CVE-2026-42617_p1.patch \ file://CVE-2026-46572_CVE-2026-42617_p2.patch \ file://CVE-2026-46572_CVE-2026-42617_p3.patch \ + file://CVE-2026-46571.patch \ " SRCREV = "78414d93613532fd82f3a82aba5d4a1c32898781" From patchwork Mon Oct 19 05:07:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 101236 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 7F56DCCF2DF for ; Mon, 19 Oct 2026 05:07:58 +0000 (UTC) Received: from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.28001.1792386476653493246 for ; Sun, 18 Oct 2026 22:07:56 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: message contains an insecure body length tag" header.i=@cisco.com header.s=iport01 header.b=GFJm3uRu; spf=pass (domain: cisco.com, ip: 173.37.86.72, mailfrom: dkelaiya@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=3291; q=dns/txt; s=iport01; t=1792386476; x=1793596076; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MRIJJzscUGGMuqH2hmWH7OOzG57Ot9BGe0QCwF7ceW0=; b=GFJm3uRuQqVKoxAl5Lv8xwYmvwkMQeEkk/JBaGMgWzFTn1F6GWsEJU0x r/ViIeJoPaGehojRUWTSB4R8dkPdy4+Yj+zqZ7ePdjBnT3ZaTALSl5bnu 6l+4xyktnbxlbwP3eEoE3GQ5A/Y2KYsD8+xkhBd+LdTmya65K46rGfPeY SLaDNxBT4sFYh1JNzWP4xmPXQVK/9/RJzRyhwn2CWwoSAVq+Qpm67t7HV 2YSwfKgHHU3zN34RcBj29+cdDRHSS2NEEXVZgXR0y+37hAARl3I55atNL KgAESTD9jXrUyl6L+jvgqcFEEeUiDsuMcENLtA8F3VaBzDPpJtN/aaK8A w==; X-CSE-ConnectionGUID: RZsuxFRUTUSB+cLQV2b65Q== X-CSE-MsgGUID: V2i7AkalReSwEp/DZpVJaQ== X-IPAS-Result: A0BGAgAppdVq/5D/Ja1aglmCV3VgQ0mWTZ4cgX4PAQEBD0QNBAEBhQUCjhUCJjQJDgECBAMCAwEBAQEBAQEBAQEBAQoBAQUBAQECAQcFgQ4Thk8NkBIBAgEDJwsBRhAcAwECLysjCBmDAgGCdAMRvWCBeTOBAYN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hVte4RQoEFI= IronPort-HdrOrdr: A9a23:8NfO9a6/YObkBVPb4wPXwOrXdLJyesId70hD6qm+c3Nom6uj5q eTdZsgtCMc5Ax9ZJhko6HjBEDiewK5yXcK2+ks1N6ZNWGM0ldAbrsSiLcKqAePJ8SRzIJgPN 9bAstDIey1K0RmhsDn5wT9OdMhzN6btJ2Mv47lvhFQpcUAUdAZ0++/YTzra3FLeA== X-Talos-CUID: 9a23:9+zNj2C+ymaHoQf6ExNV71MENPoYTkDm5jTbB3aGU2w3FYTAHA== X-Talos-MUID: 9a23:chWqRAoNpE493jDKp6gezw84NZhB4K2qMk02jrge/OW2LRJSMg7I2Q== X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,167,1787011200"; d="scan'208";a="536976343" Received: from rcdn-l-core-07.cisco.com ([173.37.255.144]) by rcdn-iport-1.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 19 Oct 2026 05:07:55 +0000 Received: from sjc-ads-5675.cisco.com (sjc-ads-5675.cisco.com [10.28.88.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by rcdn-l-core-07.cisco.com (Postfix) with ESMTPS id 9B7E4180003DC; Mon, 19 Oct 2026 05:07:55 +0000 (GMT) Received: by sjc-ads-5675.cisco.com (Postfix, from userid 1887444) id 44232CBF203; Sun, 18 Oct 2026 22:07:55 -0700 (PDT) From: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-devel@lists.openembedded.org Cc: Darsh Kelaiya Subject: [oe][meta-filesystems][wrynose][PATCH 3/7] ntfs-3g-ntfsprogs: fix CVE-2026-46570 Date: Sun, 18 Oct 2026 22:07:37 -0700 Message-Id: <20261019050741.1688261-4-dkelaiya@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261019050741.1688261-1-dkelaiya@cisco.com> References: <20261019050741.1688261-1-dkelaiya@cisco.com> MIME-Version: 1.0 X-Outbound-Client-TLS: ANONYMOUS;sjc-ads-5675.cisco.com [10.28.88.189];TLSv1.3;TLS_AES_256_GCM_SHA384;256 X-Outbound-SMTP-Client: 10.28.88.189, sjc-ads-5675.cisco.com X-Outbound-Node: rcdn-l-core-07.cisco.com 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 ; Mon, 19 Oct 2026 05:07:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/131110 From: Darsh Kelaiya This patch applies the upstream fix shown in [1]. The NVD record describing the vulnerability is referenced in [2]. [1] https://github.com/tuxera/ntfs-3g/commit/5ab37421ebbcbf33bf96876c7a034393bda05a25 [2] https://nvd.nist.gov/vuln/detail/CVE-2026-46570 Signed-off-by: Darsh Kelaiya --- .../files/CVE-2026-46570.patch | 42 +++++++++++++++++++ .../ntfs-3g-ntfsprogs_2022.10.3.bb | 1 + 2 files changed, 43 insertions(+) create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46570.patch diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46570.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46570.patch new file mode 100644 index 0000000000..fb76bc80b1 --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46570.patch @@ -0,0 +1,42 @@ +From bb4da656cab16325002eaf785ca967d426510e94 Mon Sep 17 00:00:00 2001 +From: Rakesh Pandit +Date: Mon, 8 Jun 2026 14:24:54 +0300 +Subject: [PATCH] Cap B tree depth in ntfs_index_walk_down to MAX_PARENT_VCN. + +ntfs_index_walk_down() incremented ictx->pindex and wrote into +ictx->parent_pos[] / parent_vcn[] (both sized MAX_PARENT_VCN) without +checking the bound. A B+tree deeper than MAX_PARENT_VCN levels then +overflowed both arrays and since parent_vcn[32] overlaps the pindex +field the OOB write gave an attacker control over the next iteration's +offset and value. + +Thanks to Alexandro Calo' from Nozomi Networks Labs for reporting this +issue. + +CVE: CVE-2026-46570 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/5ab37421ebbcbf33bf96876c7a034393bda05a25] + +(cherry picked from commit 5ab37421ebbcbf33bf96876c7a034393bda05a25) +Signed-off-by: Darsh Kelaiya +--- + libntfs-3g/index.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libntfs-3g/index.c b/libntfs-3g/index.c +index c9651a62..9c11a45c 100644 +--- a/libntfs-3g/index.c ++++ b/libntfs-3g/index.c +@@ -2105,6 +2105,13 @@ static INDEX_ENTRY *ntfs_index_walk_down(INDEX_ENTRY *ie, + /* down from non-zero level */ + + ictx->pindex++; ++ if (ictx->pindex >= MAX_PARENT_VCN) { ++ errno = EOPNOTSUPP; ++ ntfs_log_perror("Index is over %d level deep", ++ MAX_PARENT_VCN); ++ entry = (INDEX_ENTRY*)NULL; ++ break; ++ } + } + ictx->parent_pos[ictx->pindex] = 0; + ictx->parent_vcn[ictx->pindex] = vcn; diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb index 1e1b5bc54a..e17c3d2481 100644 --- a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb @@ -13,6 +13,7 @@ SRC_URI = "git://github.com/tuxera/ntfs-3g;protocol=https;branch=edge;tag=${PV} file://CVE-2026-46572_CVE-2026-42617_p2.patch \ file://CVE-2026-46572_CVE-2026-42617_p3.patch \ file://CVE-2026-46571.patch \ + file://CVE-2026-46570.patch \ " SRCREV = "78414d93613532fd82f3a82aba5d4a1c32898781" From patchwork Mon Oct 19 05:07:38 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 101241 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 5DDBACCF2E9 for ; Mon, 19 Oct 2026 05:08:00 +0000 (UTC) Received: from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.28001.1792386476653493246 for ; Sun, 18 Oct 2026 22:07:58 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: message contains an insecure body length tag" header.i=@cisco.com header.s=iport01 header.b=S/Wdb/C5; spf=pass (domain: cisco.com, ip: 173.37.86.72, mailfrom: dkelaiya@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=4138; q=dns/txt; s=iport01; t=1792386477; x=1793596077; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=n72nMOKVGVYKeC+AY2WgDkEDk4eZJINskLtl4MTyUvM=; b=S/Wdb/C5bvlXKjnVkJdJ5JfdV0ZIWd1gh+6ppw7jy56VfocyhBY6Y/SW y/+nUiPI+MD0tFCv/TEWuhuOZJpKwK7vaJMMjDMKn7MIHGRl9xwMMH5D1 SiXqYHPP8ef/G7CZpOr1e5oJ9ofFPinC3EQmfmREtDHL9YTcQGDYFH4OP Nqnfuu8SYy0zxOBWKZzfAi8QH+LLtPl3wbuGZe8lSUsAOLlmzItAX0cPE Rc+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QgXe0Ew/ypWZcWq9FJbSJSymZT78qHIT5fj695cUhpuHYIqwLwtUTxep KAnEyEyQSnW0opawJrjIgVtrt4oIM+uOMYUvWttiGmGS/0nWpvEBa7N4Le03h9p2ZsIRqmYP ZdEL2MzMHwsYDUXUrsTIJ49keOhh2j2WzZZs1mS46Ew5gA/ySQsi+a8b4SOJoDiqcN9mn2bo nvHzTzCXwBCPoCtkwiHyFa8v7qa9c/8cMdIfFGizdZtmFCVy2kZBREaWFf+rfSnh0qWX9NEN 1dS/TIjq6U3/kGnQtTxGRqirxa5UgU0QdFcFag+rQqK0KeRu1nfDWkfRTkHY9sj3CMreQEXO payt4uBLVRSXHe9ExpxKp/8QeuOBBUo IronPort-HdrOrdr: A9a23:qS6XZaC8bPVstfHlHemO55DYdb4zR+YMi2TDGXofdfUzSL3+qy nAppUmPHPP5Qr5HUtQ++xoW5PwJU80i6QU3WB5B97LN2PbUSmTXeRfBODZrQEIdReTygck79 YCT4FOTPvtEFN9kcH2pCO8E9om3Z271ZrAv5a585+oJjsaE52JKGxCe3+mLnE= X-Talos-CUID: 9a23:poN/R2/YvSvkQfD1OsaVv2UmRJt9UnLv9i2KcxKoWDpWc6yqZmbFrQ== X-Talos-MUID: 9a23:UpKGEg7VOonRO49K3zUvhFU0xoxs2KeqEUE/ya5bqpGOaR4qCTWnqCSOF9o= X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,167,1787011200"; d="scan'208";a="536976344" Received: from rcdn-l-core-07.cisco.com ([173.37.255.144]) by rcdn-iport-1.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 19 Oct 2026 05:07:55 +0000 Received: from sjc-ads-5675.cisco.com (sjc-ads-5675.cisco.com [10.28.88.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by rcdn-l-core-07.cisco.com (Postfix) with ESMTPS id 9E76D1800049C; Mon, 19 Oct 2026 05:07:55 +0000 (GMT) Received: by sjc-ads-5675.cisco.com (Postfix, from userid 1887444) id 4A042CBF204; Sun, 18 Oct 2026 22:07:55 -0700 (PDT) From: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-devel@lists.openembedded.org Cc: Darsh Kelaiya Subject: [oe][meta-filesystems][wrynose][PATCH 4/7] ntfs-3g-ntfsprogs: fix CVE-2026-46569 Date: Sun, 18 Oct 2026 22:07:38 -0700 Message-Id: <20261019050741.1688261-5-dkelaiya@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261019050741.1688261-1-dkelaiya@cisco.com> References: <20261019050741.1688261-1-dkelaiya@cisco.com> MIME-Version: 1.0 X-Outbound-Client-TLS: ANONYMOUS;sjc-ads-5675.cisco.com [10.28.88.189];TLSv1.3;TLS_AES_256_GCM_SHA384;256 X-Outbound-SMTP-Client: 10.28.88.189, sjc-ads-5675.cisco.com X-Outbound-Node: rcdn-l-core-07.cisco.com 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 ; Mon, 19 Oct 2026 05:08:00 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/131115 From: Darsh Kelaiya This patch applies the upstream fix shown in [1]. The NVD record describing the vulnerability is referenced in [2]. [1] https://github.com/tuxera/ntfs-3g/commit/961ed5c2fa2f36ef6a347f04e1fa586113c97e7c [2] https://nvd.nist.gov/vuln/detail/CVE-2026-46569 Signed-off-by: Darsh Kelaiya --- .../files/CVE-2026-46569.patch | 62 +++++++++++++++++++ .../ntfs-3g-ntfsprogs_2022.10.3.bb | 1 + 2 files changed, 63 insertions(+) create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46569.patch diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46569.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46569.patch new file mode 100644 index 0000000000..5c496159ec --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-46569.patch @@ -0,0 +1,62 @@ +From 677d21be1ac7ec0a59cfbed8e26d1ffbf0922ac1 Mon Sep 17 00:00:00 2001 +From: Rakesh Pandit +Date: Mon, 8 Jun 2026 10:34:38 +0300 +Subject: [PATCH] Bound tail_size in ntfs_ib_copy_tail against destination + capacity. + +A crafted source INDX block can drive tail_size past the freshly +allocated destination's usable space and overflow the memcpy. Add +a capacity check (and a < 0 guard against sign-extension at +memcpy). + +Thanks to Alexandro Calo' from Nozomi Networks Labs for reporting +this issue. + +CVE: CVE-2026-46569 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/961ed5c2fa2f36ef6a347f04e1fa586113c97e7c] + +(cherry picked from commit 961ed5c2fa2f36ef6a347f04e1fa586113c97e7c) +Signed-off-by: Darsh Kelaiya +--- + libntfs-3g/index.c | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/libntfs-3g/index.c b/libntfs-3g/index.c +index 9c11a45c..347bd408 100644 +--- a/libntfs-3g/index.c ++++ b/libntfs-3g/index.c +@@ -1193,7 +1193,7 @@ static int ntfs_ib_copy_tail(ntfs_index_context *icx, INDEX_BLOCK *src, + { + u8 *ies_end; + INDEX_ENTRY *ie_head; /* first entry after the median */ +- int tail_size, ret; ++ int tail_size, dst_capacity, ret; + INDEX_BLOCK *dst; + + ntfs_log_trace("Entering\n"); +@@ -1207,6 +1207,25 @@ static int ntfs_ib_copy_tail(ntfs_index_context *icx, INDEX_BLOCK *src, + + ies_end = (u8 *)ntfs_ie_get_end(&src->index); + tail_size = ies_end - (u8 *)ie_head; ++ dst_capacity = (int)(le32_to_cpu(dst->index.allocated_size) ++ - le32_to_cpu(dst->index.entries_offset)); ++ ++ /* ++ * src->index.entries_offset (on-disk, only required to be >= ++ * sizeof(INDEX_HEADER) by ntfs_index_block_inconsistent) may be smaller ++ * than dst's, which ntfs_ib_alloc fixes (40 on a 4 KiB block). When ++ * the median lands near the start of the source stream the gap lets ++ * tail_size exceed dst's usable space. The < 0 guard catches a ++ * negative tail_size before memcpy sign-extends it into a huge size_t. ++ */ ++ if (tail_size < 0 || tail_size > dst_capacity) { ++ ntfs_log_error("Invalid tail_size %d (dst capacity %d) in " ++ "ntfs_ib_copy_tail\n", tail_size, dst_capacity); ++ free(dst); ++ errno = EIO; ++ return STATUS_ERROR; ++ } ++ + memcpy(ntfs_ie_get_first(&dst->index), ie_head, tail_size); + + dst->index.index_length = cpu_to_le32(tail_size + diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb index e17c3d2481..f4f4ccfdf1 100644 --- a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb @@ -14,6 +14,7 @@ SRC_URI = "git://github.com/tuxera/ntfs-3g;protocol=https;branch=edge;tag=${PV} file://CVE-2026-46572_CVE-2026-42617_p3.patch \ file://CVE-2026-46571.patch \ file://CVE-2026-46570.patch \ + file://CVE-2026-46569.patch \ " SRCREV = "78414d93613532fd82f3a82aba5d4a1c32898781" From patchwork Mon Oct 19 05:07:39 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 101235 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 0F615CCF2D3 for ; Mon, 19 Oct 2026 05:07:58 +0000 (UTC) Received: from rcdn-iport-5.cisco.com (rcdn-iport-5.cisco.com [173.37.86.76]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.28004.1792386477168280524 for ; Sun, 18 Oct 2026 22:07:57 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: message contains an insecure body length tag" header.i=@cisco.com header.s=iport01 header.b=BcZUU5dA; spf=pass (domain: cisco.com, ip: 173.37.86.76, mailfrom: dkelaiya@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=13412; q=dns/txt; s=iport01; t=1792386477; x=1793596077; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qfMPH0g2ysjWEIFYxk12kIHbCYr8bGe1QNsi5zH6/80=; b=BcZUU5dA7mt2Xxoxd9jV7LyxCek01/f0e6S8owrVaxICZN3BxHIIMchQ Dz0cMFSNljgsha/zeG5O7TAeKfH1ukR6poCKl+zmr3MLfVuDoeh/iDlMr UkLpEJnncyYjlJPPF2DqXfLOj/dPLCSKai4XD9x3hGZecR/kpo5051Hx0 KIHX6shTbjwKwRGkZ0w8G/kvWiwKHdasAVS6rubfCCB85dg7EC5UoTjvi H5QpU6GgENHSdtdwYaFnoYg/Tzi9659S8MkkWXtLtFEe5iVQax5vFRP4G hjYVroi5zewnVlG4uDZ3sj/mUGWI+RU4L33opurJlhCpws7vGkShuq65V g==; X-CSE-ConnectionGUID: auhFLYsNTfS/klVwbftUNg== X-CSE-MsgGUID: u31sLa1aR+2D7O/CvhC+Uw== X-IPAS-Result: A0AnAACipNVq/4v/Ja1aHQEBAQEJARIBBQUBgXwIAQsBglZ1YENJjHKJWAOBE5A3jFIUgWoPAQEBD0QNBAEBhQUCjhUCJjQJDgEC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8EvC+jtnhJtqBjJroAJMzURTVa9rPyzh0KyVt4aJ 0EK9y4Gqakp6FftScHwWRC9qnOIshMQHd1KHIUHBBql0KHY5UOdQ2MDVDMEMIZgv84tTjts3 ViM9z/0OQFSXHSuYSr13t+pQfmaYED58Udqifc4cDY4 IronPort-HdrOrdr: A9a23:5sFk2KzrlUldhtD8duH4KrPwDr1zdoMgy1knxilNoNJuHfBw8P re+8jzuiWUtN98YhwdcJW7Scu9qBDnhPpICPcqXYtKNTOO0ADDEGgh1/qG/9SKIUPDH4BmuZ uIC5IOa+HYPBxdkdvw5hW+HpILxdmK973tuMLlpk0dKz2Dr8pbnn9E4sHxKDwOeDV7 X-Talos-CUID: 9a23:AgGIF2szHyNci1OhfU9k6vJy6Issb33z6EbLBXO2MiFqTIOKQ1GMxYVrxp8= X-Talos-MUID: 9a23:ziVw0A320dd//1ko8T3Rfb9dMzUj/v/3E2QEyJw8+JOoags3ECmdp3eKXdpy X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,167,1787011200"; d="scan'208";a="537450159" Received: from rcdn-l-core-02.cisco.com ([173.37.255.139]) by rcdn-iport-5.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 19 Oct 2026 05:07:56 +0000 Received: from sjc-ads-5675.cisco.com (sjc-ads-5675.cisco.com [10.28.88.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by rcdn-l-core-02.cisco.com (Postfix) with ESMTPS id 0492F18000347; Mon, 19 Oct 2026 05:07:56 +0000 (GMT) Received: by sjc-ads-5675.cisco.com (Postfix, from userid 1887444) id 526FBCBF21E; Sun, 18 Oct 2026 22:07:55 -0700 (PDT) From: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-devel@lists.openembedded.org Cc: Darsh Kelaiya Subject: [oe][meta-filesystems][wrynose][PATCH 5/7] ntfs-3g-ntfsprogs: fix CVE-2026-42618 Date: Sun, 18 Oct 2026 22:07:39 -0700 Message-Id: <20261019050741.1688261-6-dkelaiya@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261019050741.1688261-1-dkelaiya@cisco.com> References: <20261019050741.1688261-1-dkelaiya@cisco.com> MIME-Version: 1.0 X-Outbound-Client-TLS: ANONYMOUS;sjc-ads-5675.cisco.com [10.28.88.189];TLSv1.3;TLS_AES_256_GCM_SHA384;256 X-Outbound-SMTP-Client: 10.28.88.189, sjc-ads-5675.cisco.com X-Outbound-Node: rcdn-l-core-02.cisco.com 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 ; Mon, 19 Oct 2026 05:07:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/131114 From: Darsh Kelaiya This patch applies the upstream fixes shown in [1] and [2]. The NVD record describing the vulnerability is referenced in [3]. [1] https://github.com/tuxera/ntfs-3g/commit/e021cbe3d7a42963110e4561f2a1327614c20a00 [2] https://github.com/tuxera/ntfs-3g/commit/6aa66d98980ac1d966d7977c7b079f4fe380eb42 [3] https://nvd.nist.gov/vuln/detail/CVE-2026-42618 Signed-off-by: Darsh Kelaiya --- .../files/CVE-2026-42618_p1.patch | 53 +++++ .../files/CVE-2026-42618_p2.patch | 221 ++++++++++++++++++ .../ntfs-3g-ntfsprogs_2022.10.3.bb | 2 + 3 files changed, 276 insertions(+) create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42618_p1.patch create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42618_p2.patch diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42618_p1.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42618_p1.patch new file mode 100644 index 0000000000..15aad65234 --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42618_p1.patch @@ -0,0 +1,53 @@ +From fbc829df733e7aa960780e0c60d26a0b63786a38 Mon Sep 17 00:00:00 2001 +From: Erik Larsson +Date: Fri, 24 Apr 2026 12:06:24 +0300 +Subject: [PATCH] compress.c: Fix incorrect comparison in destination bounds + check. + +When checking whether 'dest' was at or past the end of the destination +buffer we were checking if 'dest' was larger then 'dest_sb_end', however +'dest_sb_end' is already past the end of the destination buffer since +it is constructed with 'dest + dest_size', i.e. dereferencing +'dest_sb_end' is invalid. Fixed by using '>=' instead of '>'. + +Thanks to Alexandro Calo' from Nozomi Networks Labs for reporting this +issue. + +CVE: CVE-2026-42618 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/e021cbe3d7a42963110e4561f2a1327614c20a00] + +Backport Changes: +- Upstream e021cbe3 follows the indentation changes in 6c67a098. + Apply its two bounds checks to the original ntfs_decompress() layout + in libntfs-3g/compress.c from NTFS-3G 2022.10.3. +- Preserve both upstream dest >= dest_sb_end checks so the tag and + token paths stop before accessing the end of the destination buffer. + +(cherry picked from commit e021cbe3d7a42963110e4561f2a1327614c20a00) +Signed-off-by: Darsh Kelaiya +--- + libntfs-3g/compress.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libntfs-3g/compress.c b/libntfs-3g/compress.c +index 390b2d97..5f4df0ea 100644 +--- a/libntfs-3g/compress.c ++++ b/libntfs-3g/compress.c +@@ -546,7 +546,7 @@ do_next_tag: + goto do_next_sb; + } + /* Check we are still in range. */ +- if (cb > cb_sb_end || dest > dest_sb_end) ++ if (cb > cb_sb_end || dest >= dest_sb_end) + goto return_overflow; + /* Get the next tag and advance to first token. */ + tag = *cb++; +@@ -557,7 +557,7 @@ do_next_tag: + u8 *dest_back_addr; + + /* Check if we are done / still in range. */ +- if (cb >= cb_sb_end || dest > dest_sb_end) ++ if (cb >= cb_sb_end || dest >= dest_sb_end) + break; + /* Determine token type and parse appropriately.*/ + if ((tag & NTFS_TOKEN_MASK) == NTFS_SYMBOL_TOKEN) { diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42618_p2.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42618_p2.patch new file mode 100644 index 0000000000..92db9bb78c --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42618_p2.patch @@ -0,0 +1,221 @@ +From 8221131a1dea1a06e7a8134a04b0a68975f58829 Mon Sep 17 00:00:00 2001 +From: Rakesh Pandit +Date: Thu, 30 Apr 2026 19:33:52 +0300 +Subject: [PATCH] compress.c: Harden LZNT1 sub-block decompression bounds + checks. + +ntfs_decompress() could continue decoding tokens after the current +4 KiB destination sub-block was already full. If the next token was a +symbol token, the decoder wrote one byte at dest_sb_end, outside the +valid destination range. + +Finish the current compressed sub-block when either its compressed input +is exhausted or its output sub-block is full. If the output fills +first, skip the remaining bytes in that compressed sub-block so they are +not interpreted as more tags or tokens. + +While here, read the sub-block header only after verifying that two +input bytes remain, reuse the decoded header value, and reject truncated +phrase tokens before reading their two-byte compressed word. + +Also fix the function comment to match the userspace return convention: +return 0 on success, or return -1 with errno set to EOVERFLOW on +malformed compressed input. + +Thanks to Alexandro Calo' from Nozomi Networks Labs for reporting this +issue. + +CVE: CVE-2026-42618 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/6aa66d98980ac1d966d7977c7b079f4fe380eb42] + +Backport Changes: +- Upstream 6aa66d98 follows the formatting changes in 6c67a098. + Apply its ntfs_decompress() changes in libntfs-3g/compress.c to + the original 2022.10.3 layout, omitting the three extra scopes and + loop indentation introduced by that formatting commit. +- Retarget the end-of-block and phrase-token comment edits to the + original wrapping. This adds three comment lines that are unchanged + context in upstream's patch. +- The older conditions, sub-block end expression, comments and debug + strings occupy four fewer removed lines than the upstream layout. + Together these wrapping differences change the patch statistics + from +65/-37 upstream to +68/-33 here; decoder logic is unchanged. + +(cherry picked from commit 6aa66d98980ac1d966d7977c7b079f4fe380eb42) +Signed-off-by: Darsh Kelaiya +--- + libntfs-3g/compress.c | 101 ++++++++++++++++++++++++++++-------------- + 1 file changed, 68 insertions(+), 33 deletions(-) + +diff --git a/libntfs-3g/compress.c b/libntfs-3g/compress.c +index 5f4df0ea..e32c2288 100644 +--- a/libntfs-3g/compress.c ++++ b/libntfs-3g/compress.c +@@ -459,7 +459,8 @@ static unsigned int ntfs_compress_block(const char *inbuf, const int bufsize, + * @cb_start is a pointer to the compression block which needs decompressing + * and @cb_size is the size of @cb_start in bytes (8-64kiB). + * +- * Return 0 if success or -EOVERFLOW on error in the compressed stream. ++ * Return 0 on success. On error in the compressed stream, set errno to ++ * EOVERFLOW and return -1. + */ + static int ntfs_decompress(u8 *dest, const u32 dest_size, + u8 *const cb_start, const u32 cb_size) +@@ -479,23 +480,29 @@ static int ntfs_decompress(u8 *dest, const u32 dest_size, + /* Variables for tag and token parsing. */ + u8 tag; /* Current tag. */ + int token; /* Loop counter for the eight tokens in tag. */ ++ u16 hdr; /* Current sub-block header. */ + + ntfs_log_trace("Entering, cb_size = 0x%x.\n", (unsigned)cb_size); + do_next_sb: + ntfs_log_debug("Beginning sub-block at offset = %d in the cb.\n", + (int)(cb - cb_start)); + /* +- * Have we reached the end of the compression block or the end of the +- * decompressed data? The latter can happen for example if the current +- * position in the compression block is one byte before its end so the +- * first two checks do not detect it. ++ * Have we reached the end of the compression block or the end ++ * of the decompressed data? ++ * ++ * Check dest == dest_end before reading the next two-byte sub- ++ * block header. The compressed pointer can legally be near the ++ * end of the buffer when the requested output has already been ++ * produced. + */ +- if (cb == cb_end || !le16_to_cpup((le16*)cb) || dest == dest_end) { +- if (dest_end > dest) +- memset(dest, 0, dest_end - dest); +- ntfs_log_debug("Completed. Returning success (0).\n"); +- return 0; +- } ++ if (cb == cb_end || dest == dest_end) ++ goto complete; ++ /* A sub-block header is two bytes. */ ++ if ((size_t)(cb_end - cb) < 2) ++ goto return_overflow; ++ hdr = le16_to_cpup((le16*)cb); ++ if (!hdr) ++ goto complete; + /* Setup offset for the current sub-block destination. */ + dest_sb_start = dest; + dest_sb_end = dest + NTFS_SB_SIZE; +@@ -503,16 +510,15 @@ do_next_sb: + if (dest_sb_end > dest_end) + goto return_overflow; + /* Does the minimum size of a compressed sb overflow valid range? */ +- if (cb + 6 > cb_end) ++ if ((size_t)(cb_end - cb) < 6) + goto return_overflow; + /* Setup the current sub-block source pointers and validate range. */ + cb_sb_start = cb; +- cb_sb_end = cb_sb_start + (le16_to_cpup((le16*)cb) & NTFS_SB_SIZE_MASK) +- + 3; ++ cb_sb_end = cb_sb_start + (hdr & NTFS_SB_SIZE_MASK) + 3; + if (cb_sb_end > cb_end) + goto return_overflow; + /* Now, we are ready to process the current sub-block (sb). */ +- if (!(le16_to_cpup((le16*)cb) & NTFS_SB_IS_COMPRESSED)) { ++ if (!(hdr & NTFS_SB_IS_COMPRESSED)) { + ntfs_log_debug("Found uncompressed sub-block.\n"); + /* This sb is not compressed, just copy it into destination. */ + /* Advance source position to first data byte. */ +@@ -532,22 +538,18 @@ do_next_sb: + /* Forward to the first tag in the sub-block. */ + cb += 2; + do_next_tag: +- if (cb == cb_sb_end) { +- /* Check if the decompressed sub-block was not full-length. */ +- if (dest < dest_sb_end) { +- int nr_bytes = dest_sb_end - dest; +- +- ntfs_log_debug("Filling incomplete sub-block with zeroes.\n"); +- /* Zero remainder and update destination position. */ +- memset(dest, 0, nr_bytes); +- dest += nr_bytes; +- } +- /* We have finished the current sub-block. */ +- goto do_next_sb; +- } + /* Check we are still in range. */ +- if (cb > cb_sb_end || dest >= dest_sb_end) ++ if (cb > cb_sb_end || dest > dest_sb_end) + goto return_overflow; ++ /* ++ * Finish this compressed sub-block when either its ++ * compressed input is exhausted or its 4 KiB output ++ * slot is full. If output becomes full first, skip the ++ * remaining compressed bytes in this sub-block instead ++ * of interpreting them as more tags/tokens. ++ */ ++ if (cb == cb_sb_end || dest == dest_sb_end) ++ goto finish_compressed_sb; + /* Get the next tag and advance to first token. */ + tag = *cb++; + /* Parse the eight tokens described by the tag. */ +@@ -557,8 +559,10 @@ do_next_tag: + u8 *dest_back_addr; + + /* Check if we are done / still in range. */ +- if (cb >= cb_sb_end || dest >= dest_sb_end) +- break; ++ if (cb > cb_sb_end || dest > dest_sb_end) ++ goto return_overflow; ++ if (cb == cb_sb_end || dest == dest_sb_end) ++ goto finish_compressed_sb; + /* Determine token type and parse appropriately.*/ + if ((tag & NTFS_TOKEN_MASK) == NTFS_SYMBOL_TOKEN) { + /* +@@ -570,11 +574,21 @@ do_next_tag: + continue; + } + /* +- * We have a phrase token. Make sure it is not the first tag in +- * the sb as this is illegal and would confuse the code below. ++ * We have a phrase token. Make sure it is not ++ * the first token in the sb as this is illegal ++ * and would confuse the code below. + */ + if (dest == dest_sb_start) + goto return_overflow; ++ /* ++ * A phrase token is a two-byte compressed word. ++ * The generic token check above only proves ++ * that at least one byte remains, which is ++ * enough for a symbol token but not for a ++ * phrase token. ++ */ ++ if ((size_t)(cb_sb_end - cb) < 2) ++ goto return_overflow; + /* + * Determine the number of bytes to go back (p) and the number + * of bytes to copy (l). We use an optimized algorithm in which +@@ -626,6 +640,27 @@ do_next_tag: + } + /* No tokens left in the current tag. Continue with the next tag. */ + goto do_next_tag; ++finish_compressed_sb: ++ /* Check if the decompressed sub-block was not full-length. */ ++ if (dest < dest_sb_end) { ++ size_t nr_bytes = dest_sb_end - dest; ++ ++ ntfs_log_debug("Filling incomplete sub-block with zeroes.\n"); ++ /* Zero remainder and update destination position. */ ++ memset(dest, 0, nr_bytes); ++ dest += nr_bytes; ++ } ++ /* ++ * If the output sub-block filled before the compressed sub-block input ++ * was exhausted, skip the remaining compressed bytes in this sub-block. ++ */ ++ cb = cb_sb_end; ++ goto do_next_sb; ++complete: ++ if (dest_end > dest) ++ memset(dest, 0, dest_end - dest); ++ ntfs_log_debug("Completed. Returning success (0).\n"); ++ return 0; + return_overflow: + errno = EOVERFLOW; + ntfs_log_perror("Failed to decompress file"); diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb index f4f4ccfdf1..85f355ca64 100644 --- a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb @@ -15,6 +15,8 @@ SRC_URI = "git://github.com/tuxera/ntfs-3g;protocol=https;branch=edge;tag=${PV} file://CVE-2026-46571.patch \ file://CVE-2026-46570.patch \ file://CVE-2026-46569.patch \ + file://CVE-2026-42618_p1.patch \ + file://CVE-2026-42618_p2.patch \ " SRCREV = "78414d93613532fd82f3a82aba5d4a1c32898781" From patchwork Mon Oct 19 05:07:40 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 101240 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 78F0CCCF2E3 for ; Mon, 19 Oct 2026 05:07:59 +0000 (UTC) Received: from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.28002.1792386477035233401 for ; Sun, 18 Oct 2026 22:07:57 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: message contains an insecure body length tag" header.i=@cisco.com header.s=iport01 header.b=Oq2Azy2l; spf=pass (domain: cisco.com, ip: 173.37.86.75, mailfrom: dkelaiya@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=6875; q=dns/txt; s=iport01; t=1792386477; x=1793596077; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pBft9lFwyrHPK6v4gP+hGYgl9mgS9VqDUkqTX3URLzE=; b=Oq2Azy2l/+JCVUxJArhvtUYKLSfRDioCDnGdWjZflUcehjgbtjFLUVg8 LA2zCtiifq4K6Xltw3xgf5hfkvnX/LOFFMlBSdclsRxLD6D9y2J6drOyB YcFy9L3eN5hNEpMozParIMiYH/PhXl4EN92CszP7r79H5amqqhB6hxjaN 3XilPuKJ1mQiwHTYpxxj1ec94fyB/dxjKUcEoTwug7aowNM/m8z+1oIcz 2fuiWHJ8/CkQ9UsC74RD615kA583ruwfmWNF7PP1FgBc5TQyH4gS2uULK /sOvpj5Hx1wlsn9N4VIrDenHg3e0UaCyS9QU0i7eaN8UT/5cPfKdl5nDG Q==; X-CSE-ConnectionGUID: rrv0fgd2TyWTgZ++bmaM9w== X-CSE-MsgGUID: OXSH4rYcTO6vV0rjUIsV1w== X-IPAS-Result: A0BHAgAspNVq/5P/Ja1aglmCV3VgQ0mWSgOeHIF+DwEBAQ9EDQQBAYUFAo4VAiY0CQ4BAgQDAgMBAQEBAQEBAQEBAQEKAQEFAQEBAgEHBYEOE4ZPDZASAQIBAycLAUYQHAMBAi8rIwgZgwIBgnQDEb1fgXkzgQGDaQJDUNsyAQsUAYE4hUCII10YAYR8JxsbgXKBFYNpgQWBXAEBgTeGTCIEgiJ6EoFaHpU/SIEeA1ksAVUTDQoLBwWBaAM1EioVbjIdgSM+F4EHGwYFgR2BIIIWIxk2eoEJXoErKWABEBeBCYIHAoJUggACAUlBDgdFUwklQxJHJiIIEgkBExowC4EbODwJKEEXDHMMHQVyCAINCQdNGA1IESw3FRkEPm4Hkioeg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-Talos-CUID: 9a23:wjKieW5+T6sg6Yd9d9ss7lQKQs4qfifh3UjsLH37SmxsQZjEVgrF X-Talos-MUID: 9a23:lSCtQArW0RkAlUrUJa8ezxZSD+c0+ZWlNGdTj6teocu5FDdOYijI2Q== X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,167,1787011200"; d="scan'208";a="537201270" Received: from rcdn-l-core-10.cisco.com ([173.37.255.147]) by rcdn-iport-4.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 19 Oct 2026 05:07:56 +0000 Received: from sjc-ads-5675.cisco.com (sjc-ads-5675.cisco.com [10.28.88.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by rcdn-l-core-10.cisco.com (Postfix) with ESMTPS id 05D2F18000267; Mon, 19 Oct 2026 05:07:56 +0000 (GMT) Received: by sjc-ads-5675.cisco.com (Postfix, from userid 1887444) id 57EC7CBEF8A; Sun, 18 Oct 2026 22:07:55 -0700 (PDT) From: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-devel@lists.openembedded.org Cc: Darsh Kelaiya Subject: [oe][meta-filesystems][wrynose][PATCH 6/7] ntfs-3g-ntfsprogs: fix CVE-2026-42616 Date: Sun, 18 Oct 2026 22:07:40 -0700 Message-Id: <20261019050741.1688261-7-dkelaiya@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261019050741.1688261-1-dkelaiya@cisco.com> References: <20261019050741.1688261-1-dkelaiya@cisco.com> MIME-Version: 1.0 X-Outbound-Client-TLS: ANONYMOUS;sjc-ads-5675.cisco.com [10.28.88.189];TLSv1.3;TLS_AES_256_GCM_SHA384;256 X-Outbound-SMTP-Client: 10.28.88.189, sjc-ads-5675.cisco.com X-Outbound-Node: rcdn-l-core-10.cisco.com 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 ; Mon, 19 Oct 2026 05:07:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/131112 From: Darsh Kelaiya This patch applies the upstream fix shown in [1]. The NVD record describing the vulnerability is referenced in [3]. The follow-up in [2] is included to close the opened attribute when malloc fails and use a common cleanup path for the attribute and buffer. [1] https://github.com/tuxera/ntfs-3g/commit/dc1b682e99b6c055b0281ca543a8420b698420d1 [2] https://github.com/tuxera/ntfs-3g/commit/8cd4718cad4941ef49ea5b3af8cd9ec68a46af7a [3] https://nvd.nist.gov/vuln/detail/CVE-2026-42616 Signed-off-by: Darsh Kelaiya --- .../files/CVE-2026-42616_p1.patch | 70 ++++++++++++++++ .../files/CVE-2026-42616_p2.patch | 79 +++++++++++++++++++ .../ntfs-3g-ntfsprogs_2022.10.3.bb | 2 + 3 files changed, 151 insertions(+) create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42616_p1.patch create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42616_p2.patch diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42616_p1.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42616_p1.patch new file mode 100644 index 0000000000..26858a3537 --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42616_p1.patch @@ -0,0 +1,70 @@ +From 96f3c15677c6aa0251798eef74a5a4c376523ee3 Mon Sep 17 00:00:00 2001 +From: Erik Larsson +Date: Fri, 24 Apr 2026 12:18:24 +0300 +Subject: [PATCH] ntfscat.c: Fix reading outside the buffer when block size > + buffer size. + +The block size may be read from the index root's 'index_block_size' +member, and isn't guaranteed to be >= 4096 (as far as I can tell it +could be larger). This would for MST protected records lead to storing +data past the end of the allocated buffer. + +Fixed by allocating the necessary amount of buffer space for the case +when the block size exceeds 4096. + +Thanks to Alexandro Calo' from Nozomi Networks Labs for reporting this +issue. + +CVE: CVE-2026-42616 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/dc1b682e99b6c055b0281ca543a8420b698420d1] + +(cherry picked from commit dc1b682e99b6c055b0281ca543a8420b698420d1) +Signed-off-by: Darsh Kelaiya +--- + ntfsprogs/ntfscat.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/ntfsprogs/ntfscat.c b/ntfsprogs/ntfscat.c +index b8af2503..0f711815 100644 +--- a/ntfsprogs/ntfscat.c ++++ b/ntfsprogs/ntfscat.c +@@ -334,22 +334,17 @@ static int index_get_size(ntfs_inode *inode) + static int cat(ntfs_volume *vol, ntfs_inode *inode, ATTR_TYPES type, + ntfschar *name, int namelen) + { +- const int bufsize = 4096; + char *buffer; + ntfs_attr *attr; + s64 bytes_read, written; + s64 offset; + u32 block_size; +- +- buffer = malloc(bufsize); +- if (!buffer) +- return 1; ++ u32 bufsize = 4096; + + attr = ntfs_attr_open(inode, type, name, namelen); + if (!attr) { + ntfs_log_error("Cannot find attribute type 0x%x.\n", + le32_to_cpu(type)); +- free(buffer); + return 1; + } + +@@ -360,6 +355,15 @@ static int cat(ntfs_volume *vol, ntfs_inode *inode, ATTR_TYPES type, + else + block_size = 0; + ++ if (bufsize < block_size) { ++ bufsize = block_size; ++ } ++ ++ buffer = malloc(bufsize); ++ if (!buffer) { ++ return 1; ++ } ++ + offset = 0; + for (;;) { + if (!opts.raw && block_size > 0) { diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42616_p2.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42616_p2.patch new file mode 100644 index 0000000000..68cdd1dd0c --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-42616_p2.patch @@ -0,0 +1,79 @@ +From 8cd4718cad4941ef49ea5b3af8cd9ec68a46af7a Mon Sep 17 00:00:00 2001 +From: Erik Larsson +Date: Thu, 20 Aug 2026 15:52:23 +0300 +Subject: [PATCH] ntfscat.c: Fix missing cleanup of opened attribute on malloc + error. + +Reported as github issue #212. Impact is limited to non-existent as +'malloc' doesn't fail in modern general-purpose operating systems. +Additionally even if it does fail, process teardown will clean up any +remaining resources allocated to the attribute, but it is technically a +memory leak. + +CVE: CVE-2026-42616 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/8cd4718cad4941ef49ea5b3af8cd9ec68a46af7a] + +(cherry picked from commit 8cd4718cad4941ef49ea5b3af8cd9ec68a46af7a) +Signed-off-by: Darsh Kelaiya +--- + ntfsprogs/ntfscat.c | 23 +++++++++++++++-------- + 1 file changed, 15 insertions(+), 8 deletions(-) + +diff --git a/ntfsprogs/ntfscat.c b/ntfsprogs/ntfscat.c +index 0f711815..2bf5a2aa 100644 +--- a/ntfsprogs/ntfscat.c ++++ b/ntfsprogs/ntfscat.c +@@ -334,8 +334,9 @@ static int index_get_size(ntfs_inode *inode) + static int cat(ntfs_volume *vol, ntfs_inode *inode, ATTR_TYPES type, + ntfschar *name, int namelen) + { +- char *buffer; +- ntfs_attr *attr; ++ int ret = 0; ++ ntfs_attr *attr = NULL; ++ char *buffer = NULL; + s64 bytes_read, written; + s64 offset; + u32 block_size; +@@ -345,7 +346,8 @@ static int cat(ntfs_volume *vol, ntfs_inode *inode, ATTR_TYPES type, + if (!attr) { + ntfs_log_error("Cannot find attribute type 0x%x.\n", + le32_to_cpu(type)); +- return 1; ++ ret = 1; ++ goto out; + } + + if ((inode->mft_no < 2) && (attr->type == AT_DATA)) +@@ -361,7 +363,8 @@ static int cat(ntfs_volume *vol, ntfs_inode *inode, ATTR_TYPES type, + + buffer = malloc(bufsize); + if (!buffer) { +- return 1; ++ ret = 1; ++ goto out; + } + + offset = 0; +@@ -389,10 +392,14 @@ static int cat(ntfs_volume *vol, ntfs_inode *inode, ATTR_TYPES type, + } + offset += bytes_read; + } +- +- ntfs_attr_close(attr); +- free(buffer); +- return 0; ++out: ++ if (buffer) { ++ free(buffer); ++ } ++ if (attr) { ++ ntfs_attr_close(attr); ++ } ++ return ret; + } + + /** +-- +2.35.6 + diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb index 85f355ca64..3ba45438bd 100644 --- a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb @@ -17,6 +17,8 @@ SRC_URI = "git://github.com/tuxera/ntfs-3g;protocol=https;branch=edge;tag=${PV} file://CVE-2026-46569.patch \ file://CVE-2026-42618_p1.patch \ file://CVE-2026-42618_p2.patch \ + file://CVE-2026-42616_p1.patch \ + file://CVE-2026-42616_p2.patch \ " SRCREV = "78414d93613532fd82f3a82aba5d4a1c32898781" From patchwork Mon Oct 19 05:07:41 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 101237 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 221D3CCF2DB for ; Mon, 19 Oct 2026 05:07:58 +0000 (UTC) Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.28003.1792386477074421207 for ; Sun, 18 Oct 2026 22:07:57 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: message contains an insecure body length tag" header.i=@cisco.com header.s=iport01 header.b=H7K+g6Sp; spf=pass (domain: cisco.com, ip: 173.37.86.79, mailfrom: dkelaiya@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=6431; q=dns/txt; s=iport01; t=1792386477; x=1793596077; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VzjiczNmOzkBd+PnNgMsFrd4eS3+4jfBMRdzHg2jq7M=; b=H7K+g6SpRn3M6cnZeCr2zUEh0LlGvfMdGNjFa3qBqwmVdnIkiYGgG65R l571ZYG8lanPYUs1VwtSCHihswQ4j4fvrbpOnxZIk/XxqsiTA+1DDgi1I welQmE+e/N2ICKaLxYgOwY26VSB1IIbC3coo6lBLuqui0UAhJlWT/LSxh CquPuy16fhag8b1hB2WL9YGjELrGtjLBkEV7kU9R4rMqv2xETrhmwLev8 WGvK99n6N//pcmFZyzL/pwnYiNNGQ4ywCi52/jlmqbVuNsbDSJarvWHQ1 M0qH1SPOCu9u+W9R2UDRKeH9Xs21zmH4c9ykd0bKaaxRZh+xBe+A0jY5t g==; X-CSE-ConnectionGUID: TTBOzgBTT1i7CdeoJtjtqg== X-CSE-MsgGUID: cqBvGUTdQkGqzV47m110SA== X-IPAS-Result: A0BGAgAppdVq/4v/Ja1aHgEBCxIMggULgld1YENJlkoDnhyBfg8BAQEPRA0EAQGFBQKOFQImNAkOAQIEAwIDAQEBAQEBAQEBAQEBCgEBBQEBAQIBBwWBDhOGTw2QEgECAQMyAUYQHAMBAi8rIwgZgwIBgnQDEb1ggiyBAYNpAkNQ2zIBCxQBgTiFQIgjXRgBhHwnGxuBcoEVg2mBBYFcAQGIAyIEgiJ6EoFaHmWUWkiBHgNZLAFVEw0KCwcFgWgDNRIqFW4yHYEjPheBBxsGBYEdgSCCFiMZNnqBCV6BKylgARAXg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ks1N6ZNWGM0ldAbrsSiLcKqAePJ8SRzIJgPN 9bAstDIey1K0RmhsDn5wT9OdMhzN6btJ2Mv47lvhFQpcUAUdAZ0++/YTzra3FLeA== X-Talos-CUID: 9a23:AzyClWyX8oVKkn0szoBlBgUoJuoCYHL38EuJIhCTBWtuaqGXVUafrfY= X-Talos-MUID: 9a23:CqxatQWlKAuoYYbq/DT1ri9NCftk2qeBEVIzzcoD4pDcDgUlbg== X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,167,1787011200"; d="scan'208";a="529009636" Received: from rcdn-l-core-02.cisco.com ([173.37.255.139]) by rcdn-iport-8.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 19 Oct 2026 05:07:56 +0000 Received: from sjc-ads-5675.cisco.com (sjc-ads-5675.cisco.com [10.28.88.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by rcdn-l-core-02.cisco.com (Postfix) with ESMTPS id 05A2118000348; Mon, 19 Oct 2026 05:07:56 +0000 (GMT) Received: by sjc-ads-5675.cisco.com (Postfix, from userid 1887444) id 5CDB3CBEF98; Sun, 18 Oct 2026 22:07:55 -0700 (PDT) From: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-devel@lists.openembedded.org Cc: Darsh Kelaiya Subject: [oe][meta-filesystems][wrynose][PATCH 7/7] ntfs-3g-ntfsprogs: fix CVE-2026-40706 Date: Sun, 18 Oct 2026 22:07:41 -0700 Message-Id: <20261019050741.1688261-8-dkelaiya@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261019050741.1688261-1-dkelaiya@cisco.com> References: <20261019050741.1688261-1-dkelaiya@cisco.com> MIME-Version: 1.0 X-Outbound-Client-TLS: ANONYMOUS;sjc-ads-5675.cisco.com [10.28.88.189];TLSv1.3;TLS_AES_256_GCM_SHA384;256 X-Outbound-SMTP-Client: 10.28.88.189, sjc-ads-5675.cisco.com X-Outbound-Node: rcdn-l-core-02.cisco.com 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 ; Mon, 19 Oct 2026 05:07:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/131113 From: Darsh Kelaiya This patch applies the upstream allocation fix shown in [1]. The NVD record describing the vulnerability is referenced in [3]. The fix in [1] allocates space for the worst-case number of POSIX ACL entries in ntfs_build_permissions_posix(). The follow-up in [2] is included to handle allocation failure: check the malloc result, set errno to ENOMEM, and return NULL before using the descriptor. [1] https://github.com/tuxera/ntfs-3g/commit/e48e1ef2a1fcff13a590c2224ec21c5bd5d3e92e [2] https://github.com/tuxera/ntfs-3g/commit/c5413e242309f88ce5a83c0c2538184b19eea1bc [3] https://nvd.nist.gov/vuln/detail/CVE-2026-40706 Signed-off-by: Darsh Kelaiya --- .../files/CVE-2026-40706_p1.patch | 60 +++++++++++++++++++ .../files/CVE-2026-40706_p2.patch | 34 +++++++++++ .../ntfs-3g-ntfsprogs_2022.10.3.bb | 2 + 3 files changed, 96 insertions(+) create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-40706_p1.patch create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-40706_p2.patch diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-40706_p1.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-40706_p1.patch new file mode 100644 index 0000000000..22ece5aca3 --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-40706_p1.patch @@ -0,0 +1,60 @@ +From 696eb743bd94ddbb86e84e544e152845b92a8a7f Mon Sep 17 00:00:00 2001 +From: Erik Larsson +Date: Tue, 24 Feb 2026 10:04:31 +0200 +Subject: [PATCH] acls.c: Fix heap buffer overflow in + 'ntfs_build_permissions_posix'. + +The root cause was that the memory allocated for the ACE entries was +insufficient for the worst case scenario when group entries were added +for mask entries that didn't have a corresponding group entry already. +Fixed by allocating space for the worst case number of ACE entries. + +This was reported by Andrea Bocchetti with a thorough report which made +it very easy to fix. + +CVE: CVE-2026-40706 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/e48e1ef2a1fcff13a590c2224ec21c5bd5d3e92e] + +(cherry picked from commit e48e1ef2a1fcff13a590c2224ec21c5bd5d3e92e) +Signed-off-by: Darsh Kelaiya +--- + libntfs-3g/acls.c | 25 ++++++++++++++++++++----- + 1 file changed, 20 insertions(+), 5 deletions(-) + +diff --git a/libntfs-3g/acls.c b/libntfs-3g/acls.c +index 9f16fecd..4cf534bf 100644 +--- a/libntfs-3g/acls.c ++++ b/libntfs-3g/acls.c +@@ -3716,12 +3716,27 @@ struct POSIX_SECURITY *ntfs_build_permissions_posix( + /* + * Build a raw posix security descriptor + * by just translating permissions and ids +- * Add 2 to the count of ACE to be able to insert +- * a group ACE later in access and default ACLs +- * and add 2 more to be able to insert ACEs for owner +- * and 2 more for other ++ * ++ * The worst case number of ACE entries consists of: ++ * - 'acecount' ACE entries from the main loop (see below) ++ * iterating over the 'securattr' array. ++ * - 1 ACE entry which may be added when creating world ++ * permissions if none exist. ++ * - 1 ACE entry which may be added when setting basic owner ++ * permissions if none exist (both lists). ++ * - 1 ACE entry which may be added when duplicating world ++ * permissions as group_obj permissions if none exist. ++ * - 'acecount + 2' ACE entries which may be added when ++ * duplicating world permissions as group permissions if they ++ * were converted to masks and the masks are not followed by a ++ * group entry. ++ * - 1 ACE entry which may be added when inserting a default ++ * mask if none is present and there are designated users or ++ * groups. ++ * ++ * This amounts to 2*acecnt + 6 ACE entries in the worst case. + */ +- alloccnt = acecnt + 6; ++ alloccnt = 2*acecnt + 6; + pxdesc = (struct POSIX_SECURITY*)malloc( + sizeof(struct POSIX_SECURITY) + + alloccnt*sizeof(struct POSIX_ACE)); diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-40706_p2.patch b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-40706_p2.patch new file mode 100644 index 0000000000..f19f9370bf --- /dev/null +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/CVE-2026-40706_p2.patch @@ -0,0 +1,34 @@ +From a0842353864ad42abc30119af2fa5b9f5751d66b Mon Sep 17 00:00:00 2001 +From: Erik Larsson +Date: Tue, 24 Feb 2026 16:35:21 +0200 +Subject: [PATCH] acls.c: Add 'malloc' return value check when allocating POSIX + ACL. + +CVE: CVE-2026-40706 +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/c5413e242309f88ce5a83c0c2538184b19eea1bc] + +(cherry picked from commit c5413e242309f88ce5a83c0c2538184b19eea1bc) +Signed-off-by: Darsh Kelaiya +--- + libntfs-3g/acls.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/libntfs-3g/acls.c b/libntfs-3g/acls.c +index 4cf534bf..2d24d65e 100644 +--- a/libntfs-3g/acls.c ++++ b/libntfs-3g/acls.c +@@ -3740,6 +3740,14 @@ struct POSIX_SECURITY *ntfs_build_permissions_posix( + pxdesc = (struct POSIX_SECURITY*)malloc( + sizeof(struct POSIX_SECURITY) + + alloccnt*sizeof(struct POSIX_ACE)); ++ if (!pxdesc) { ++ ntfs_log_perror("Unable to allocate %zu bytes for " ++ "POSIX_SECURITY structure", ++ (size_t)(sizeof(struct POSIX_SECURITY) + ++ alloccnt*sizeof(struct POSIX_ACE))); ++ errno = ENOMEM; ++ return NULL; ++ } + k = 0; + l = alloccnt; + for (i=0; i<2; i++) { diff --git a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb index 3ba45438bd..a29be8ab90 100644 --- a/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb +++ b/meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb @@ -19,6 +19,8 @@ SRC_URI = "git://github.com/tuxera/ntfs-3g;protocol=https;branch=edge;tag=${PV} file://CVE-2026-42618_p2.patch \ file://CVE-2026-42616_p1.patch \ file://CVE-2026-42616_p2.patch \ + file://CVE-2026-40706_p1.patch \ + file://CVE-2026-40706_p2.patch \ " SRCREV = "78414d93613532fd82f3a82aba5d4a1c32898781"