From cc1cc98d51bed1e56a25033c0c7598c4bd0bbcee Mon Sep 17 00:00:00 2001 From: Darsh Kelaiya Date: Sun, 18 Oct 2026 22:07:37 -0700 Subject: [PATCH] ntfs-3g-ntfsprogs: fix CVE-2026-46570 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 Signed-off-by: Anuj Mittal --- .../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"