Skip to content

Commit 485647a

Browse files
containerd2: build with default Go toolchain to fix stdlib CVEs
Drop 'BuildRequires: golang < 1.25' and set GOEXPERIMENT=ms_nocgo_opensslcrypto (Microsoft Go 1.25+ defaults to systemcrypto which needs CGO_ENABLED=1; containerd builds CGO_ENABLED=0). Resolves Go stdlib CVE-2026-25679, CVE-2026-27139, CVE-2026-33811, CVE-2026-39836 (was built on Go 1.24.13).
1 parent 6626bc9 commit 485647a

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

SPECS/containerd2/containerd2.spec

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Summary: Industry-standard container runtime
66
Name: %{upstream_name}2
77
Version: 2.2.4
8-
Release: 4%{?dist}
8+
Release: 5%{?dist}
99
License: ASL 2.0
1010
Group: Tools/Container
1111
URL: https://www.containerd.io
@@ -35,7 +35,7 @@ Patch15: CVE-2026-42502.patch
3535

3636
%{?systemd_requires}
3737

38-
BuildRequires: golang < 1.25
38+
BuildRequires: golang
3939
BuildRequires: go-md2man
4040
BuildRequires: make
4141
BuildRequires: systemd-rpm-macros
@@ -69,10 +69,15 @@ used directly by developers or end-users.
6969

7070
%build
7171
export BUILDTAGS="-mod=vendor"
72+
# cgo-less OpenSSL backend for our CGO_ENABLED=0 build (Go 1.26 systemcrypto needs cgo).
73+
# Go 1.26-only flag: remove at golang >= 1.27 (auto-selected there; else build fails).
74+
# Ref: https://github.com/microsoft/go/blob/microsoft/main/eng/doc/NocgoOpenSSL.md
75+
export GOEXPERIMENT=ms_nocgo_opensslcrypto
7276
make VERSION="%{version}" REVISION="%{commit_hash}" binaries man
7377

7478
%check
7579
export BUILDTAGS="-mod=vendor"
80+
export GOEXPERIMENT=ms_nocgo_opensslcrypto
7681
make VERSION="%{version}" REVISION="%{commit_hash}" test
7782

7883
%install
@@ -108,6 +113,10 @@ fi
108113
%dir /opt/containerd/lib
109114

110115
%changelog
116+
* Thu Jul 09 2026 Aadhar Agarwal <aadagarwal@microsoft.com> - 2.2.4-5
117+
- Remove 'BuildRequires: golang < 1.25' and set GOEXPERIMENT=ms_nocgo_opensslcrypto
118+
to build with the default Go toolchain, resolving Go stdlib CVE-2026-25679,
119+
CVE-2026-27139, CVE-2026-33811, CVE-2026-39836 (was built on Go 1.24.13).
111120

112121
* Fri Jun 19 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 2.2.4-4
113122
- Patch for CVE-2026-42502, CVE-2026-25681, CVE-2026-25680

0 commit comments

Comments
 (0)