Files
Abdurrahman Kaan DikeçandClaude Opus 5.5 5216a7b0bf Kernel sources: verify kernel.org signatures with pinned keys, fail closed (FINDINGS 161)
upstream/build.sh checked linux-$KV.tar.xz only against sha256sums.asc fetched from
the same host, grepping the whole file and never checking its signature.
upstream/verify-kernel-src.sh now requires both:
- the autosigner's clearsigned sha256sums.asc (gpgv --output: only the signed text
  is searched), with exactly one line matching the tarball's SHA-256;
- the releaser's linux-$KV.tar.sign over the uncompressed tar (Linus, Greg, Sasha).
Each against its own keyring committed in upstream/keys/ (fingerprints from WKD and
the git.kernel.org pgpkeys repo, cross-checked with signature.html), with gpgv's
VALIDSIG primary fingerprint pinned in keys/*.fpr. Any failure, or no gpgv, stops
the build and deletes the download; the tree unpacks beside /src and is moved into
place last. CI and release builds run build.sh, so they are covered as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-16 22:38:48 +03:00

9 lines
634 B
Docker

# Native arm64 build environment for mainline kernels (gcc from Ubuntu 26.04); pahole (dwarves) turns the DWARF
# into the BTF that CONFIG_DEBUG_INFO_BTF puts into the kernel and its modules (eBPF programs such as dae need it)
# gpgv checks the kernel source's signatures (verify-kernel-src.sh; listed although apt already depends on it)
FROM ubuntu:26.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential bc bison flex libssl-dev libelf-dev lz4 cpio kmod python3 curl device-tree-compiler xz-utils ca-certificates dwarves gpgv \
&& rm -rf /var/lib/apt/lists/*