πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #6175

Bug#1155345: trixie-pu: package buildstream/1.6.9-2+deb13u1

#6175
From: Theodore Tucker
Date: Wed, 25 Nov 2026 19:20
98 lines
9166 bytes
Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: buildstream@packages.debian.org, theodore@tti0.net
Control: affects -1 + src:buildstream
User: release.debian.org@packages.debian.org
Usertags: pu

Hi,

I am requesting an update to buildstream in trixie to deal with
a moderate-severity CVE, which was resolved as no-DSA by the
security team. This is my first upload to proposed-updates, so
I apologise for any mistakes.

The CVE is CVE-2026-104813, which is a symlink traversal
vulerability allowing a malicious remote execution API server
to write files anywhere on the client's machine, not just inside
the build sandbox that buildstream provides. The upstream mailing
list post is https://lists.apache.org/thread/7l4mswynvvf3z9jp43kyky2zh23y98tt
and the Debian bug is https://bugs.debian.org/1155343.

This was fixed in unstable with a new upstream version 2.8.2,
and I discussed backporting a patch to 1.6.9 for trixie with
the upstream maintainers, the debdiff follows. Details of 
the equivalent upstream change are in the added patch, which
is minimal and low-risk, despite the fact that we cannot run
upstream's tests in Debian due to some missing deps.

I also prepared the change in Salsa: https://salsa.debian.org/gnome-team/buildstream/-/merge_requests/13.

Thank you and kind regards,

Theodore

---

diff -Nru buildstream-1.6.9/debian/changelog buildstream-1.6.9/debian/changelog
--- buildstream-1.6.9/debian/changelog  2026-09-24 08:01:40.000000000 +0100
+++ buildstream-1.6.9/debian/changelog  2026-11-13 16:31:19.000000000 +0000
@@ -1,3 +1,10 @@
+buildstream (1.6.9-2+deb13u2) trixie; urgency=medium
+
+  * Team upload
+  * Backport upstream patch for CVE-2026-104813 (Closes: #1155343)
+
+ -- Theodore Tucker <theodore@tti0.net>  Fri, 13 Nov 2026 16:31:19 +0000
+
 buildstream (1.6.9-2+deb13u1) trixie-security; urgency=high

   * Team upload
diff -Nru buildstream-1.6.9/debian/patches/cascache.py-Validate-Directory-node-names-in-checkou.patch buildstream-1.6.9/debian/patches/cascache.py-Validate-Directory-node-names-in-checkou.patch
--- buildstream-1.6.9/debian/patches/cascache.py-Validate-Directory-node-names-in-checkou.patch 1970-01-01 01:00:00.000000000 +0100
+++ buildstream-1.6.9/debian/patches/cascache.py-Validate-Directory-node-names-in-checkou.patch 2026-11-13 16:31:19.000000000 +0000
@@ -0,0 +1,70 @@
+From 010d73d3ef9e8d1217bac8c3ed43be143165ab52 Mon Sep 17 00:00:00 2001
+From: Theodore Tucker <theodore@tti0.net>
+Date: Fri, 13 Nov 2026 16:21:43 +0000
+Subject: [PATCH] cascache.py: Validate Directory node names in checkout()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Forwarded: https://github.com/apache/buildstream/pull/2219
+
+The REAPI spec requires that every child in the directory must have a
+path of exactly one segment. Raise an error if a `Directory` message
+violates the spec.
+
+This backports an upstream patch (for the 2.x series) to resolve
+CVE-2026-104813: https://github.com/apache/buildstream/pull/2219/commits/494123d83b53879b5c34a4c7c6a597688b13a973
+
+Reported-by: MopMonk-AI <mopmonk-ai@tophant.com>
+Co-authored-by: JΓΌrg Billeter <j@bitron.ch>
+---
+ buildstream/_artifactcache/cascache.py | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/buildstream/_artifactcache/cascache.py b/buildstream/_artifactcache/cascache.py
+index 0799f1d16..36c9a985d 100644
+--- a/buildstream/_artifactcache/cascache.py
++++ b/buildstream/_artifactcache/cascache.py
+@@ -649,6 +649,8 @@ class CASCache():
+             directory.ParseFromString(f.read())
+
+         for filenode in directory.files:
++            _validate_cas_node_name(filenode.name)
++
+             # regular file, create hardlink
+             fullpath = os.path.join(dest, filenode.name)
+             os.link(self.objpath(filenode.digest), fullpath)
+@@ -658,11 +660,13 @@ class CASCache():
+                          stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
+
+         for dirnode in directory.directories:
++            _validate_cas_node_name(dirnode.name)
+             fullpath = os.path.join(dest, dirnode.name)
+             self._checkout(fullpath, dirnode.digest)
+
+         for symlinknode in directory.symlinks:
+             # symlink
++            _validate_cas_node_name(symlinknode.name)
+             fullpath = os.path.join(dest, symlinknode.name)
+             os.symlink(symlinknode.target, fullpath)
+
+@@ -1262,3 +1266,17 @@ def _grouper(iterable, n):
+         except StopIteration:
+             return
+         yield itertools.chain([current], itertools.islice(iterable, n - 1))
++
++
++# _validate_cas_node_name():
++#
++# Validates that a CAS Directory entry name is a single path segment.
++#
++# Args:
++#    name (str): The name of a CAS Directory entry
++#
++def _validate_cas_node_name(name: str):
++    if os.path.basename(name) != name or name in ("", ".", ".."):
++        raise CASError(
++            f"Invalid name in a CAS Directory node: '{name}' (every child in the directory must have a path of exactly one segment)"
++        )
+--
+2.47.3
+
diff -Nru buildstream-1.6.9/debian/patches/series buildstream-1.6.9/debian/patches/series
--- buildstream-1.6.9/debian/patches/series     2026-09-24 08:01:40.000000000 +0100
+++ buildstream-1.6.9/debian/patches/series     2026-11-13 16:31:19.000000000 +0000
@@ -1,2 +1,3 @@
 adjust-test-dependencies.patch
 tar.py-Use-custom-extraction-filter.patch
+cascache.py-Validate-Directory-node-names-in-checkou.patch
Technical Details
Message-ID: <O3qH7-e7IO-5@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!srl.newsdeef.eu!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod
From: Theodore Tucker <theodore@tti0.net>
Newsgroups: linux.debian.bugs.dist,linux.debian.devel.release
Subject: Bug#1155345: trixie-pu: package buildstream/1.6.9-2+deb13u1
Date: Wed, 25 Nov 2026 20:20:01 +0100
Message-ID: <O3qH7-e7IO-5@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Wed Nov 25 19:17:09 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.641
Reply-To: Theodore Tucker <theodore@tti0.net>, 1155345@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: buildstream@packages.debian.org, theodore@tti0.net, debian-release@lists.debian.org
X-Debian-Pr-Message: report 1155345
X-Debian-Pr-Package: release.debian.org
X-Debian-Pr-Keywords: trixie
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
X-Mailer: reportbug 13.2.0
X-Crossassassin-Score: 2
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2005021
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 98
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Wed, 25 Nov 2026 19:15:47 +0000
X-Original-Message-ID: <179563414742.17194.4022686552301898854.reportbug@TGT-HP14.localdomain>