Skip to content

Commit 90f7496

Browse files
committed
feat: Enable ubsan on bootstrap nodes.
Not all sanitizers are enabled, but the cheap ones are, making the bootstrap node quite a bit more secure at a small runtime cost.
1 parent 89b6450 commit 90f7496

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

other/bootstrap_daemon/docker/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
###########################################################
22
# Builder image: we compile the code here (static build)
3-
FROM alpine:3.18.5 AS build
3+
FROM alpine:3.19.0 AS build
44

55
RUN ["apk", "--no-cache", "add",\
6-
"build-base",\
6+
"clang",\
77
"cmake",\
88
"linux-headers",\
99
"libconfig-dev",\
1010
"libconfig-static",\
1111
"libsodium-dev",\
1212
"libsodium-static",\
13+
"musl-dev",\
1314
"ninja",\
1415
"python3"\
1516
]
@@ -34,9 +35,9 @@ COPY CMakeLists.txt so.version ./
3435
COPY other/bootstrap_daemon/CMakeLists.txt other/bootstrap_daemon/CMakeLists.txt
3536
COPY testing/CMakeLists.txt testing/CMakeLists.txt
3637

37-
RUN cmake -B_build -H. \
38+
RUN CC=clang cmake -B_build -H. \
3839
-GNinja \
39-
-DCMAKE_C_FLAGS="-DTCP_SERVER_USE_EPOLL -fstack-protector-all -fisolate-erroneous-paths-attribute" \
40+
-DCMAKE_C_FLAGS="-DTCP_SERVER_USE_EPOLL -fsanitize=alignment,return,returns-nonnull-attribute,vla-bound,unreachable,float-cast-overflow,null -fsanitize-trap=all -fstack-protector-all" \
4041
-DCMAKE_UNITY_BUILD=ON \
4142
-DCMAKE_BUILD_TYPE=Release \
4243
-DFULLY_STATIC=ON \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5aac1df4d6c1de289e8e9f646d06099c84fd4d9b80d19f45e3254eec3ece2bff /usr/local/bin/tox-bootstrapd
1+
849ec5686eeaea448f4ef99650b016c883e6ea13d5fa2e7b2a344c9275a10431 /usr/local/bin/tox-bootstrapd

0 commit comments

Comments
 (0)