Skip to content

eBPF-based security platform

ci: pin sanitizer dependencies to a Debian snapshot

Andrea Lattuada757cf279a6ec
diff --git a/.github/scripts/sanitizer-deps.sh b/.github/scripts/sanitizer-deps.sh
new file mode 100644
index 00000000..48989c04
--- /dev/null
+++ b/.github/scripts/sanitizer-deps.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+# SPDX-License-Identifier: BSD-2-Clause
+# Copyright (c) 2026 Authors of shirudo
+#
+# Install the ASan, UBSan and TSan jobs' dependencies in a disposable LVH
+# guest. Keep sid at a known working snapshot: a partial OCaml transition
+# can otherwise make coccinelle uninstallable before the build starts.
+
+set -eu
+
+export DEBIAN_FRONTEND=noninteractive
+
+# Replace all image sources so later installs, including install-clang.sh,
+# use the same package set. Only the snapshot's expiry check is disabled;
+# apt still verifies its signatures and package hashes.
+rm -f /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources
+echo 'deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20261119T120000Z/ sid main' \
+ >/etc/apt/sources.list
+
+apt-get update
+apt-get install -y --no-install-recommends \
+ build-essential \
+ ca-certificates \
+ coccinelle \
+ cryptsetup-bin \
+ e2fsprogs \
+ curl \
+ git \
+ pkg-config \
+ python3 \
+ libcurl4-openssl-dev \
+ libelf-dev \
+ libluajit-5.1-dev \
+ libpython3-dev \
+ libtpms-dev \
+ libtss2-dev \
+ zlib1g-dev
+sh .github/scripts/install-clang.sh libclang-rt-23-dev
diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml
index c30a33d3..c1e4b119 100644
--- a/.github/workflows/sanitizers.yml
+++ b/.github/workflows/sanitizers.yml
@@ -71,25 +71,7 @@ jobs:
}
cd /host
- apt-get update
- apt-get install -y --no-install-recommends \
- build-essential \
- ca-certificates \
- coccinelle \
- cryptsetup-bin \
- e2fsprogs \
- curl \
- git \
- pkg-config \
- python3 \
- libcurl4-openssl-dev \
- libelf-dev \
- libluajit-5.1-dev \
- libpython3-dev \
- libtpms-dev \
- libtss2-dev \
- zlib1g-dev
- sh .github/scripts/install-clang.sh libclang-rt-23-dev
+ sh .github/scripts/sanitizer-deps.sh
git config --global --add safe.directory /host
sh .github/scripts/check-style.sh --types >/dev/null ||
diff --git a/Documentation/contribute/testing/testing.rst b/Documentation/contribute/testing/testing.rst
index 319acf47..8e929717 100644
--- a/Documentation/contribute/testing/testing.rst
+++ b/Documentation/contribute/testing/testing.rst
@@ -297,6 +297,14 @@ installs no signal handler, so it reports nothing today; the ``TSan``
leg of the ``Sanitizers`` workflow runs it with clang so that the first
one added is checked.
+These three CI jobs install dependencies with
+:src:`.github/scripts/sanitizer-deps.sh` inside a disposable LVH guest.
+The script replaces the image's apt sources with the Debian sid snapshot
+``20261119T120000Z`` so an incomplete distribution transition cannot
+break the install. It disables the snapshot's expiry check and keeps
+signature verification. Refresh the snapshot deliberately when updating
+the toolchain; the jobs do not receive package updates automatically.
+
Run under MemorySanitizer
-------------------------