diff --git a/.github/workflows/publish-current-server.yml b/.github/workflows/publish-current-server.yml index 27fb82248f..ad7307ee60 100644 --- a/.github/workflows/publish-current-server.yml +++ b/.github/workflows/publish-current-server.yml @@ -263,6 +263,18 @@ jobs: "$evidence/brotli-runtime.txt" grep -Fx 'PASS: truncated ordinary input rejected' "$evidence/brotli-runtime.txt" + - name: Verify rsync on the flattened candidate + shell: bash + run: | + set -Eeuo pipefail + evidence="$RUNNER_TEMP/server-evidence" + mkdir -p "$evidence/rsync-backport" + docker run --rm --network none --entrypoint /bin/sh "$CANDIDATE_IMAGE" -ec ' + cd / + sha256sum -c /usr/share/pasturestack/security/rsync-backport/runtime.sha256 + /bin/sh /usr/local/libexec/pasturestack/verify-rsync-runtime.sh + ' | tee "$evidence/rsync-backport/qualified-runtime.txt" + - name: Start, restart, and export the candidate shell: bash run: | @@ -683,7 +695,7 @@ jobs: (cd "$evidence/server-consumer-tools" && sha256sum verify-server-backport-consumer.py \ ubuntu-backports/bundle/verify-consumer-evidence.py > SHA256SUMS) tar -cf "$evidence/ubuntu-backports-evidence.tar" -C "$evidence" \ - ubuntu-backports bundle-tools ubuntu-backports-validation.json brotli-official server-consumer-tools + ubuntu-backports bundle-tools ubuntu-backports-validation.json brotli-official server-consumer-tools rsync-backport docker run --rm \ -v "$RUNNER_TEMP/server-rootfs:/rootfs:ro" \ diff --git a/.github/workflows/rsync-ubuntu.yml b/.github/workflows/rsync-ubuntu.yml new file mode 100644 index 0000000000..32efcf758f --- /dev/null +++ b/.github/workflows/rsync-ubuntu.yml @@ -0,0 +1,19 @@ +name: Rsync Ubuntu 26.04 +on: + pull_request: + paths: + - 'server/security/ubuntu-backports/rsync/**' + - 'server/Dockerfile.web-compose-release' + - '.github/workflows/rsync-ubuntu.yml' +permissions: + contents: read +jobs: + native: + runs-on: ubuntu-24.04 + timeout-minutes: 20 + steps: + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5 + - name: Build and test the Ubuntu rsync package + run: | + docker buildx build --platform linux/amd64 --target rsync_security_package \ + --file server/Dockerfile.web-compose-release server diff --git a/docs/releases/server-1.6.602.md b/docs/releases/server-1.6.602.md new file mode 100644 index 0000000000..b1ac6f0401 --- /dev/null +++ b/docs/releases/server-1.6.602.md @@ -0,0 +1,15 @@ +# Server v1.6.602 + +## Ubuntu 26.04 rsync + +This release rebuilds the Ubuntu 26.04 rsync package at +`3.4.1+ds1-7ubuntu0.3+pasturestack.1` with the +[upstream bounds-check fix for CVE-2026-70457](https://github.com/RsyncProject/rsync/commit/defd7110ac9bd60529b3d39cfd5cafe8cc5716de). +The build verifies signed Ubuntu source indexes, pinned source checksums, +package identity, and ordinary local transfer compatibility. + +The rsync 3.5.2 CVE-2026-119741 change remains tracked pending a compatible +Ubuntu package or separately qualified backport. OpenSSL updates remain +tracked for the supported distribution packages. + +See the [upgrade guide](../upgrades/README.md) for volume preservation and rollback. diff --git a/server/Dockerfile.web-compose-release b/server/Dockerfile.web-compose-release index 09aefd4121..31442b55fa 100644 --- a/server/Dockerfile.web-compose-release +++ b/server/Dockerfile.web-compose-release @@ -553,6 +553,76 @@ RUN set -eux; \ "${PER_HOST_SUBNET_RELEASE_BASE_URL%/}/v${PER_HOST_SUBNET_VERSION}/per-host-subnet-${PER_HOST_SUBNET_VERSION}-windows-amd64.zip" \ "per-host-subnet-${PER_HOST_SUBNET_VERSION}-windows-amd64.zip" "${PER_HOST_SUBNET_ARCHIVE_SHA256}" /out/per-host-subnet.zip +# Build the Ubuntu rsync package with the exact upstream bounds-check hunk. +FROM ${UBUNTU_SECURITY_IMAGE} AS rsync_security_package +ENV DEBIAN_FRONTEND=noninteractive +WORKDIR /build +ADD --checksum=sha256:5b6326f1932cfd7be57130561dc78192f09ed9f58bfbe6606ed0c50510c3b6cd \ + https://snapshot.ubuntu.com/ubuntu/20261104T000000Z/pool/main/c/ca-certificates/ca-certificates_20260816ubuntu0.26.04.1_all.deb /tmp/ca.deb +COPY security/ubuntu-backports/rsync/ /backport/ +RUN <<'SH' +set -eu +. /etc/os-release +test "$VERSION_ID" = '26.04' +test "$(dpkg --print-architecture)" = amd64 +mkdir -p /tmp/ca-bootstrap /etc/ssl/certs +dpkg-deb --extract /tmp/ca.deb /tmp/ca-bootstrap +find /tmp/ca-bootstrap/usr/share/ca-certificates -type f -name '*.crt' | LC_ALL=C sort | + while IFS= read -r certificate; do sed -e '$a\' "$certificate"; done >/etc/ssl/certs/ca-certificates.crt +printf '%s\n' 'Acquire::https::CaInfo "/etc/ssl/certs/ca-certificates.crt";' \ + 'Acquire::https::Verify-Peer "true";' 'Acquire::https::Verify-Host "true";' \ + 'Acquire::AllowInsecureRepositories "false";' 'APT::Get::AllowUnauthenticated "false";' \ + >/etc/apt/apt.conf.d/80pasturestack-rsync +rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*.sources /etc/apt/sources.list.d/*.list +cat > /etc/apt/sources.list.d/pasturestack-rsync.sources <<'APT' +Types: deb deb-src +URIs: https://snapshot.ubuntu.com/ubuntu/20261023T000000Z +Suites: resolute resolute-updates resolute-security +Components: main universe +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg +Snapshot: no +Check-Valid-Until: no +APT +apt-get -o Acquire::Retries=3 -o APT::Update::Error-Mode=any update +apt-get install --no-install-recommends -y build-essential debhelper dpkg-dev fakeroot patch xz-utils +version='3.4.1+ds1-7ubuntu0.3' +export DEB_BUILD_OPTIONS='nocheck parallel=2' +apt-get build-dep --no-install-recommends --arch-only -y "rsync=$version" +apt-get source --download-only "rsync=$version" +printf '%s %s\n' \ + 7cd9244dff9c3e2323eef4fc11ae89c87ceafac0f264f0bba015c287c95fa0a5 "rsync_$version.dsc" \ + bb9e2dda7e79d9639bc04bdafff6bb0b06a606ed915358b574696384215c9e5c rsync_3.4.1+ds1.orig.tar.xz \ + 4e7a250a1cbcbdf47813147b1e969eb112542a5e7f99b74d39d99cb81a345cb4 "rsync_$version.debian.tar.xz" \ + 4edce63aa9547fd4e00c928f69a8174636555f1b35e7fb2a271658199097ca74 /backport/cve-2026-70457.patch | sha256sum -c - +dpkg-source -x "rsync_$version.dsc" source +cd source +export QUILT_PATCHES=debian/patches +# Build from an applied Ubuntu source tree. dpkg-buildpackage is binary-only. +patch --fuzz=0 -p1 --batch --forward -i /backport/cve-2026-70457.patch +custom_version="$version+pasturestack.1" +{ + printf 'rsync (%s) resolute; urgency=medium\n\n' "$custom_version" + printf ' * Backport the upstream CVE-2026-70457 bounds check from defd7110ac9b.\n\n' + printf ' -- PastureStack Maintainers Mon, 16 Nov 2026 00:00:00 +0000\n\n' + cat debian/changelog +} > debian/changelog.new +mv debian/changelog.new debian/changelog +dpkg-buildpackage --build=binary -us -uc -j2 +cd /build +package="rsync_${custom_version}_amd64.deb" +test "$(dpkg-deb -f "$package" Package)" = rsync +test "$(dpkg-deb -f "$package" Version)" = "$custom_version" +test "$(dpkg-deb -f "$package" Architecture)" = amd64 +apt-get install --no-install-recommends -y "./$package" +sh /backport/verify-rsync-runtime.sh +mkdir /rsync-out +install -m 0644 "$package" /rsync-out/rsync.deb +install -m 0644 /backport/cve-2026-70457.patch /rsync-out/cve-2026-70457.patch +cd /rsync-out +sha256sum rsync.deb cve-2026-70457.patch > SHA256SUMS +sha256sum /usr/bin/rsync > runtime.sha256 +SH + FROM ${UBUNTU_SECURITY_IMAGE} AS runtime_security_packages ARG PCRE2_PACKAGE_VERSION=10.46-1build1+pasturestack.1 @@ -788,7 +858,7 @@ ARG PER_HOST_SUBNET_VERSION=0.2.6 ARG PER_HOST_SUBNET_PRODUCER_COMMIT=05c69dba52ab770062e81a9b60b69408cbe58218 ARG PER_HOST_SUBNET_ARCHIVE_SHA256=a3a7592582c443f4f36b31c54a0a3c87d5961d664e3604b20acb97dec55725be ARG PER_HOST_SUBNET_PROVENANCE_SHA256=272ea108e8d938c352cf47a4fa82e0dab3c81b6f3b181d0d12b71e1469f87edd -ARG SERVER_RELEASE_TAG=v1.6.601 +ARG SERVER_RELEASE_TAG=v1.6.602 ARG API_EXPLORER_RELEASE_TAG=v1.1.20 ARG API_EXPLORER_ARTIFACT_SHA256=c989ee12a518f6d9d2b23b1f17f48d781aacf6ec31fb65291dd7de9b1661badb ARG API_EXPLORER_COMMIT=a586f0dc0aa50df579049a8d4bf26f04400fdf75 @@ -1007,6 +1077,21 @@ RUN --mount=from=ubuntu_security_backports,source=/out,target=/opt/pasturestack/ rm -rf /tmp/pasturestack-runtime-security /usr/share/licenses/pasturestack/openssl-3.5.8; \ rm -f /usr/bin/tar +RUN --mount=from=rsync_security_package,source=/rsync-out,target=/tmp/rsync-security,ro \ + --mount=type=bind,source=security/ubuntu-backports/rsync/verify-rsync-runtime.sh,target=/tmp/verify-rsync-runtime.sh,ro \ + set -eu; \ + cd /tmp/rsync-security; \ + sha256sum -c SHA256SUMS; \ + test "$(dpkg-query -W -f='${Version}' rsync)" = 3.4.1+ds1-7ubuntu0.3; \ + dpkg -i rsync.deb; \ + sha256sum -c runtime.sha256; \ + evidence=/usr/share/pasturestack/security/rsync-backport; \ + install -d "$evidence"; \ + install -m 0644 runtime.sha256 cve-2026-70457.patch "$evidence/"; \ + install -D -m 0755 /tmp/verify-rsync-runtime.sh /usr/local/libexec/pasturestack/verify-rsync-runtime.sh; \ + sh /usr/local/libexec/pasturestack/verify-rsync-runtime.sh > "$evidence/runtime.txt" + + COPY --from=release_artifacts /out/web-console/ /tmp/pasturestack-web-console/ RUN rm -rf /tmp/pasturestack-api-ui COPY --from=release_artifacts /out/api-explorer/ /tmp/pasturestack-api-ui/ diff --git a/server/build-api-explorer-patch-image.sh b/server/build-api-explorer-patch-image.sh index c640d802f8..7d306adefe 100755 --- a/server/build-api-explorer-patch-image.sh +++ b/server/build-api-explorer-patch-image.sh @@ -14,7 +14,7 @@ if [[ -n "$(git status --porcelain --untracked-files=normal)" ]]; then fi revision=${PASTURESTACK_SERVER_REVISION:-$(git rev-parse HEAD)} -server_release_tag=${SERVER_RELEASE_TAG:-v1.6.601} +server_release_tag=${SERVER_RELEASE_TAG:-v1.6.602} source_date_epoch=${SOURCE_DATE_EPOCH:-$(git show -s --format=%ct HEAD)} base_image=${BASE_IMAGE:-ghcr.io/pasturestack/server:v1.6.460@sha256:c855af8aea232dacc5bb6df68e2271d482c68b53c43ab0c108ec19118f5ab403} orchestration_engine_release_base_url=${ORCHESTRATION_ENGINE_RELEASE_BASE_URL:-https://github.com/PastureStack/orchestration-engine/releases/download} @@ -134,7 +134,7 @@ usage_telemetry_agent_archive_sha256=${USAGE_TELEMETRY_AGENT_ARCHIVE_SHA256:-c33 usage_telemetry_agent_binary_sha256=${USAGE_TELEMETRY_AGENT_BINARY_SHA256:-48e22a6654c058cef7126dfa7c39da4c98a92bb939d37f09536d992f507f92ca} supported_docker_range='~v1.12.3 || ~v1.13.0 || ~v17.03.0 || ~v17.06.0 || ~v17.09.0 || ~v17.12.0 || ~v18.03.0 || ~v18.06.0 || ~v18.09.0 || ~v19.03.2 || v24.0.9 || >=v29.4.1 <=v29.7.2 || v29.8.0' newest_docker_version=v29.8.0 -image=${IMAGE:-pasturestack-validation/server:v1.6.601} +image=${IMAGE:-pasturestack-validation/server:v1.6.602} build_options=() [[ "$revision" =~ ^[0-9a-f]{40}$ ]] diff --git a/server/security/ubuntu-backports/rsync/.gitattributes b/server/security/ubuntu-backports/rsync/.gitattributes new file mode 100644 index 0000000000..991bc675e1 --- /dev/null +++ b/server/security/ubuntu-backports/rsync/.gitattributes @@ -0,0 +1 @@ +cve-2026-70457.patch text eol=lf whitespace=-space-before-tab diff --git a/server/security/ubuntu-backports/rsync/cve-2026-70457.patch b/server/security/ubuntu-backports/rsync/cve-2026-70457.patch new file mode 100644 index 0000000000..d1187c7f85 --- /dev/null +++ b/server/security/ubuntu-backports/rsync/cve-2026-70457.patch @@ -0,0 +1,12 @@ +diff --git a/options.c b/options.c +--- a/options.c ++++ b/options.c +@@ -1151,6 +1188,8 @@ failure: + min_max, do_big_num(limit, 3, NULL), + unlimited_0 && min_max[1] == 'i' ? " or 0 for unlimited" : ""); + } ++ if (len < 0 || len > (int)sizeof err_buf - 2) ++ len = sizeof err_buf - 2; + err_buf[len] = '\n'; + err_buf[len+1] = '\0'; + return -1; diff --git a/server/security/ubuntu-backports/rsync/verify-rsync-runtime.sh b/server/security/ubuntu-backports/rsync/verify-rsync-runtime.sh new file mode 100644 index 0000000000..46a18c65f6 --- /dev/null +++ b/server/security/ubuntu-backports/rsync/verify-rsync-runtime.sh @@ -0,0 +1,33 @@ +#!/bin/sh +set -eu + +expected_version=3.4.1+ds1-7ubuntu0.3+pasturestack.1 +test "$(dpkg-query -W -f='${Version}' rsync)" = "$expected_version" +test "$(dpkg-query -W -f='${Architecture}' rsync)" = amd64 +# Ubuntu's container dpkg profile excludes docs and manpages. +integrity="$(dpkg --verify rsync)" +unexpected="$(printf '%s\n' "$integrity" | sed -E \ + '/^missing[[:space:]]+\/usr\/share\/doc\/rsync\//d; /^missing[[:space:]]+\/usr\/share\/man\/man[15]\/(rrsync|rsync|rsync-ssl|rsyncd\.conf)\.[15]\.gz$/d')" +if [ -n "$unexpected" ]; then + printf '%s\n' "$unexpected" >&2 + exit 1 +fi +rsync --version | grep -F 'version 3.4.1 ' >/dev/null +fixture="$(mktemp -d)" +trap 'rm -rf "$fixture"' EXIT HUP INT TERM +mkdir "$fixture/source" "$fixture/dest" +printf '%s\n' 'original content' >"$fixture/source/data" +chmod 640 "$fixture/source/data" +ln "$fixture/source/data" "$fixture/source/hardlink" +ln -s data "$fixture/source/link" +rsync -azH "$fixture/source/" "$fixture/dest/" +cmp "$fixture/source/data" "$fixture/dest/data" +test "$(readlink "$fixture/dest/link")" = data +test "$(stat -c '%a' "$fixture/dest/data")" = 640 +test "$(stat -c '%i' "$fixture/dest/data")" = "$(stat -c '%i' "$fixture/dest/hardlink")" +printf '%s\n' 'valid incremental update' >>"$fixture/source/data" +printf '%s\n' 'outdated destination file' >"$fixture/dest/stale" +rsync -azHc --no-whole-file --delete --min-size=1 --max-size=1m "$fixture/source/" "$fixture/dest/" +cmp "$fixture/source/data" "$fixture/dest/data" +test ! -e "$fixture/dest/stale" +printf '%s\n' "PASS: rsync $expected_version Ubuntu package, local compressed copy and incremental sync" diff --git a/server/security/vendor-pending.json b/server/security/vendor-pending.json index 104f81c0f1..7ef39c9996 100644 --- a/server/security/vendor-pending.json +++ b/server/security/vendor-pending.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, - "release": "v1.6.601", + "release": "v1.6.602", "generatedAt": "2026-11-15T09:50:00+00:00", "policy": { "allowedSeverities": [