SSL/ACVP Test Integration for FIPS#1503
SSL/ACVP Test Integration for FIPS#1503DimensionWieldr wants to merge 9 commits intoAltinity:releases/25.3.8-fipsfrom
Conversation
Made-with: Cursor Signed-off-by: Julian Huang <jhuang@altinity.com>
Signed-off-by: Julian Huang <jhuang@altinity.com>
b1703f1 to
f4233e2
Compare
zvonand
left a comment
There was a problem hiding this comment.
Why do we have two identic glibc_compat.c files? Can it be moved into one place?
…ndshaker Move the identical glibc_compat.c files from ssl-shim/ and ssl-handshaker/ into a shared programs/ssl-common/ directory. Also add the gtest include path required by test_util.cc to both CMakeLists. Signed-off-by: Julian Huang <jhuang@altinity.com>
The FIPS 2.0.0 shim sources do not include any gtest headers, so this include path is not needed. Signed-off-by: Julian Huang <jhuang@altinity.com>
7e737fe to
4e4f1cf
Compare
Signed-off-by: Julian Huang <jhuang@altinity.com>
|
Quick review notes (actionable):
The |
|
Follow-up finding on I checked upstream musl, and yes — the original full implementation includes the full file-actions path ( For the split-handshake path in AWS-LC (which relies on Useful upstream references:
Notably, upstream also has robustness around file-actions potentially clobbering the internal error-reporting pipe fd during spawn. |
Gate ssl-shim/ssl-handshaker/acvp-server declarations in main.cpp with per-target ENABLE_CLICKHOUSE_* defines (via config_tools.h) that match the exact CMake conditions under which targets are created, preventing unresolved symbols when FIPS_CLICKHOUSE is set without AWSLC_SRC_DIR or on non-Linux platforms. Move the --allow-multiple-definition linker flag from the global clickhouse target into each of the three library targets as an INTERFACE property, so the flag only enters the link when those specific libraries are actually consumed. Signed-off-by: Julian Huang <jhuang@altinity.com> Made-with: Cursor
Replace the partial posix_spawn with the complete upstream musl implementation (https://git.musl-libc.org/cgit/musl/tree/src/process/posix_spawn.c), adapted for the glibc sysroot headers used by ClickHouse. Key safety improvements from upstream: - Pipe fd clobbering protection: if a file action targets the error-reporting pipe fd, dup it to an unoccupied fd first - Close-on-exec set after file actions (pipe may have been moved) - Block all signals before pipe2/clone; unblock after exec - EPIPE-aware error reporting back to parent - Support for POSIX_SPAWN_SETSID, SETPGROUP, RESETIDS, SETSIGDEF - Larger stack (1024 + PATH_MAX) Adaptations from upstream musl: - Uses glibc sysroot field names (__ss/__sd vs __mask/__def) - Keeps __posix_spawnx exec-function parameter (glibc attr has no __fn) - Omits LOCK(__abort_lock) (musl-internal, not available) - Omits __get_handler_set (musl-internal; signals are blocked for the child's brief pre-exec window so parent handlers cannot fire) - Uses clone() instead of musl-internal __clone() Signed-off-by: Julian Huang <jhuang@altinity.com> Made-with: Cursor
…2, used only for ssl/acvp tests Signed-off-by: Julian Huang <jhuang@altinity.com>
…t the rest of CH Signed-off-by: Julian Huang <jhuang@altinity.com>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
./runner_binary -shim-path .../build/programs/clickhouse-ssl-shim -handshaker-path .../build/programs/clickhouse-ssl-handshakergo run check_expected.go -tool .../aws-lc/build/acvptool -module-wrappers "modulewrapper:/whereveryoubuiltCH/programs/clickhouse-acvp-server,testmodulewrapper:/aws-lc/build/testmodulewrapper" -tests tests.jsonCI/CD Options
Exclude tests:
Regression jobs to run: