Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/releases/server-1.6.605.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@ v1.6.604 component identities. The complete default Catalog remains pinned to
`8c1c28318580d5ec18c14a13b224ce0e02e40bf8`; no template, scheduler or
load-balancer runtime image changes are introduced by this Server patch.

## Rebuildable Ubuntu security inputs

The disposable build stage downloads its existing security package versions
from the official `20261123T000000Z` Ubuntu snapshot. This avoids depending on
the live index retaining an older exact version. APT still authenticates the
signed index and enforces HTTPS peer/host verification, exact versions,
SHA-256, and package architecture; date and validity checks remain enabled.
The selected snapshot InRelease files have no `Valid-Until` field, so this
change does not introduce a short-lived expiry or disable time validation.

All 24 selected package/version/architecture/SHA-256 identities match the
signed-download manifest retained by the immutable v1.6.604 image. Its
manifest SHA-256 is
`f62b729812334de169b421075048027e32ffa1f24f57300d521f2039d19eeb71`.
The version lock bytes and network-free runtime installer are unchanged;
this build-source correction does not advance the runtime package set.

## Managed load-balancer upgrade and rollback

The Web Console change submits the complete selected primary and secondary
Expand Down
11 changes: 10 additions & 1 deletion scripts/test-offline-ubuntu-security-updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
digest=hashlib.sha256(source.read_bytes()).hexdigest()
if os.environ.get('FIXTURE_BAD_HASH'): digest='0'*64
if '--print-uris' in args:
origin='https://archive.ubuntu.com/ubuntu/'
origin=os.environ.get('FIXTURE_URI', 'https://snapshot.ubuntu.com/ubuntu/20261123T000000Z/')
if os.environ.get('FIXTURE_BAD_URI'): origin='http://untrusted.invalid/'
kind='SHA256'
if 'Acquire::ForceHash=sha256' not in args:
Expand Down Expand Up @@ -215,6 +215,15 @@ def test_default_apt_print_uri_md5_is_not_accepted_as_sha256(self):
def test_downloader_rejects_non_snapshot_or_plain_http_uri(self):
self.assertNotEqual(0, self.download(FIXTURE_BAD_URI='1').returncode)

def test_downloader_rejects_live_archive_instead_of_reviewed_snapshot(self):
self.assertNotEqual(0, self.download(FIXTURE_URI='https://archive.ubuntu.com/ubuntu/').returncode)

def test_downloader_rejects_different_snapshot(self):
self.assertNotEqual(0, self.download(FIXTURE_URI='https://snapshot.ubuntu.com/ubuntu/20261124T000000Z/').returncode)

def test_downloader_rejects_snapshot_over_plain_http(self):
self.assertNotEqual(0, self.download(FIXTURE_URI='http://snapshot.ubuntu.com/ubuntu/20261123T000000Z/').returncode)

def test_production_wiring_and_ldd_guards_are_fail_closed(self):
recipe = RECIPE.read_text().replace('\\\n', ' ')
builder, final = recipe.split('FROM ${UBUNTU_SECURITY_IMAGE} AS runtime_security_packages', 1)[1].split('FROM ${BASE_IMAGE}', 1)
Expand Down
6 changes: 4 additions & 2 deletions server/scripts/download-ubuntu-security-updates.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh
# APT authenticates the official archive only in the disposable Ubuntu build stage.
# Freeze the reviewed signed index so an exact version retired from the live
# index remains rebuildable. Keep native signature, TLS, date and SHA checks.
set -eu
test "$#" -eq 3 || { echo 'usage: download-security-updates LOCK TRUSTED_CA_BUNDLE OUTPUT' >&2; exit 2; }
lock=$1 trusted_ca=$2 output=$3
Expand All @@ -11,7 +13,7 @@ test ! -e "$output"
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT HUP INT TERM
mkdir -p "$tmp/lists/partial" "$tmp/download" "$output"
printf 'Types: deb\nURIs: https://archive.ubuntu.com/ubuntu\nSuites: resolute-updates resolute-security\nComponents: main\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n' > "$tmp/security.sources"
printf 'Types: deb\nURIs: https://snapshot.ubuntu.com/ubuntu/20261123T000000Z\nSuites: resolute-updates resolute-security\nComponents: main\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n' > "$tmp/security.sources"
apt_security() {
apt-get -o Dir::Etc::sourcelist="$tmp/security.sources" \
-o Dir::State::lists="$tmp/lists" \
Expand All @@ -37,7 +39,7 @@ while IFS= read -r entry || test -n "$entry"; do
# --print-uris exposes the SHA-256 from the authenticated Packages index.
apt_security --print-uris download "$entry" > "$tmp/uri"
test "$(wc -l < "$tmp/uri")" -eq 1
grep -F "'https://archive.ubuntu.com/ubuntu/" "$tmp/uri" >/dev/null
grep -F "'https://snapshot.ubuntu.com/ubuntu/20261123T000000Z/" "$tmp/uri" >/dev/null
digest=$(awk '{for(i=1;i<=NF;i++) if($i ~ /^SHA256:/) print substr($i,8)}' "$tmp/uri")
if printf '%s\n' "$digest" | grep -Eq '^[0-9a-f]{64}$'; then :; else
echo "Authenticated index did not provide exactly one SHA256 for $entry" >&2
Expand Down