πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.devel.release
2 messages
2 total messages Started by Theodore Tucker Wed, 25 Nov 2026 19:20
Bug#1155345: trixie-pu: package buildstream/1.6.9-2+deb13u1
#1161
Author: 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
Processed: trixie-pu: package buildstream/1.6.9-2+deb13u1
#1162
Author: Debian Bug Tracking System
Date: Wed, 25 Nov 2026 19:20
11 lines
2275 bytes
Processing control commands:

> affects -1 + src:buildstream
Bug #1155345 [release.debian.org] trixie-pu: package buildstream/1.6.9-2+deb13u1
Added indication that 1155345 affects src:buildstream

-- 
1155345: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1155345
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads