Skip to content

Commit 289a86d

Browse files
committed
[202305] Support FIPS for armhf (sonic-net#18283)
* [Security] Fix the krb5 vulnerability issue (sonic-net#17914) Fix the krb5 vulnerable issue CVE-2021-36222 allows remote attackers to cause a NULL pointer dereference and daemon crash CVE-2021-37750 NULL pointer dereference in kdc/do_tgs_req.c via a FAST inner body that lacks a server field DSA 5286-1 remote code execution - Microsoft ADO **(number only)**: 26577929 Upgrade the krb5 version to 1.18.3-6+deb11u14+fips. * [Build] Fix krb5 package not found issue (sonic-net#17926) Why I did it Fix the build issue caused by the wrong version specified. See the build error logs: Try 4: /usr/bin/wget --retry-connrefused failed to get: -O --2024-01-26 11:38:23-- https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.10/amd64/libk5crypto3_1.18.3-6+deb11u14+fips_amd64.deb Resolving sonicstorage.blob.core.windows.net (sonicstorage.blob.core.windows.net)... 20.60.59.131 Connecting to sonicstorage.blob.core.windows.net (sonicstorage.blob.core.windows.net)|20.60.59.131|:443... connected. HTTP request sent, awaiting response... 404 The specified blob does not exist. 2024-01-26 11:38:23 ERROR 404: The specified blob does not exist.. Try 5: /usr/bin/wget --retry-connrefused failed to get: -O make[1]: *** [Makefile:12: /sonic/target/debs/bullseye/symcrypt-openssl_0.10_amd64.deb] Error 8 make[1]: Leaving directory '/sonic/src/sonic-fips' Work item tracking Microsoft ADO (number only): 26577929 The package not installed but PR passed issue is traced in another issue sonic-net#17927 How I did it Add the libkrb5-dev and the depended packages to fix docker-sonic-vs build failure. The package libzmq3-dev has dependency on the libkrb5-dev. * [202305] Support FIPS for armhf * Remove no use mirror * Fix fips options issue
1 parent 74b81ff commit 289a86d

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

Makefile.work

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ rules/config.user:
145145

146146
include rules/config
147147
-include rules/config.user
148+
include rules/sonic-fips.mk
148149

149150
ifneq ($(DEFAULT_CONTAINER_REGISTRY),)
150151
override DEFAULT_CONTAINER_REGISTRY := $(DEFAULT_CONTAINER_REGISTRY)/
@@ -185,12 +186,6 @@ endif
185186
SLAVE_IMAGE = $(SLAVE_BASE_IMAGE)-$(USER_LC)
186187
DOCKER_ROOT = $(PWD)/fsroot.docker.$(BLDENV)
187188

188-
# Support FIPS feature, armhf not supported yet
189-
ifeq ($(PLATFORM_ARCH),armhf)
190-
INCLUDE_FIPS := n
191-
ENABLE_FIPS := n
192-
endif
193-
194189
ifeq ($(INCLUDE_FIPS), n)
195190
ifeq ($(ENABLE_FIPS), y)
196191
$(error Cannot set fips config ENABLE_FIPS=y when INCLUDE_FIPS=n)
@@ -225,6 +220,8 @@ $(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) \
225220
DOCKER_EXTRA_OPTS=$(DOCKER_EXTRA_OPTS) \
226221
DEFAULT_CONTAINER_REGISTRY=$(DEFAULT_CONTAINER_REGISTRY) \
227222
GZ_COMPRESS_PROGRAM=$(GZ_COMPRESS_PROGRAM) \
223+
FIPS_VERSION=$(FIPS_VERSION) \
224+
FIPS_GOLANG_VERSION=$(FIPS_GOLANG_VERSION) \
228225
j2 $(SLAVE_DIR)/Dockerfile.j2 > $(SLAVE_DIR)/Dockerfile)
229226

230227
$(shell CONFIGURED_ARCH=$(CONFIGURED_ARCH) \

platform/vs/docker-sonic-vs/Dockerfile.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN apt-get install -y net-tools \
6363
libasan6 \
6464
{%- endif %}
6565
dbus \
66-
redis-server\
66+
redis-server \
6767
# For libkrb5-dev
6868
comerr-dev \
6969
libgssrpc4 \

sonic-slave-bullseye/Dockerfile.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@ RUN eatmydata apt-get install -y kernel-wedge
480480
# For gobgp and telemetry build
481481
RUN eatmydata apt-get install -y golang-1.15 && ln -s /usr/lib/go-1.15 /usr/local/go
482482
{%- if INCLUDE_FIPS == "y" %}
483-
RUN wget -O golang-go.deb 'https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.1/{{ CONFIGURED_ARCH }}/golang-1.15-go_1.15.15-1~deb11u4%2Bfips_{{ CONFIGURED_ARCH }}.deb' \
484-
&& wget -O golang-src.deb 'https://sonicstorage.blob.core.windows.net/public/fips/bullseye/0.1/{{ CONFIGURED_ARCH }}/golang-1.15-src_1.15.15-1~deb11u4%2Bfips_{{ CONFIGURED_ARCH }}.deb' \
483+
RUN wget -O golang-go.deb 'https://sonicstorage.blob.core.windows.net/public/fips/bullseye/{{ FIPS_VERSION }}/{{ CONFIGURED_ARCH }}/golang-1.15-go_{{ FIPS_GOLANG_VERSION }}_{{ CONFIGURED_ARCH }}.deb' \
484+
&& wget -O golang-src.deb 'https://sonicstorage.blob.core.windows.net/public/fips/bullseye/{{ FIPS_VERSION }}/{{ CONFIGURED_ARCH }}/golang-1.15-src_{{ FIPS_GOLANG_VERSION }}_{{ CONFIGURED_ARCH }}.deb' \
485485
&& eatmydata dpkg -i golang-go.deb golang-src.deb \
486486
&& ln -sf /usr/lib/go-1.15 /usr/local/go \
487487
&& rm golang-go.deb golang-src.deb

0 commit comments

Comments
 (0)