Skip to content

Commit 23a97a3

Browse files
committed
fwTPM v185: Fix CI
1 parent 2914a77 commit 23a97a3

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

.github/workflows/pqc-examples.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,21 @@ jobs:
102102
exit $rc
103103
104104
# ----- Tier 5: full run_examples.sh sweep -----
105-
- name: Stop fwtpm_server before run_examples.sh re-spawns its own
105+
# run_examples.sh does not start its own TPM — it expects one already
106+
# listening. Reuse the fwtpm_server started in Tier 2.
107+
- name: run_examples.sh full pass (auto-detects v1.85, runs 18-way matrix)
108+
env:
109+
WOLFSSL_PATH: ${{ github.workspace }}/wolfssl
110+
run: ./examples/run_examples.sh
111+
112+
- name: Stop fwtpm_server
106113
if: always()
107114
run: |
108115
if [ -f /tmp/fwtpm_server.pid ]; then
109116
kill $(cat /tmp/fwtpm_server.pid) 2>/dev/null || true
110117
rm -f /tmp/fwtpm_server.pid
111118
fi
112119
113-
- name: run_examples.sh full pass (auto-detects v1.85, runs 18-way matrix)
114-
env:
115-
WOLFSSL_PATH: ${{ github.workspace }}/wolfssl
116-
run: ./examples/run_examples.sh
117-
118120
- name: Upload failure logs
119121
if: failure()
120122
uses: actions/upload-artifact@v4

.github/workflows/sanitizer.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ jobs:
4343
wolftpm_extra_config: "--enable-v185"
4444
wolfssl_extra_config: "--enable-dilithium --enable-mlkem --enable-experimental --enable-harden"
4545

46-
# UBSan-v185: same flags as the classical UBSan lane (no `integer`
47-
# sanitizer — pre-existing wolfSSL UB at misc.c:117 in Hash_df).
46+
# UBSan-v185: drops `integer` (wolfSSL Hash_df 440<<24) and
47+
# `alignment` (wolfSSL dilithium internal sword32 reads from
48+
# byte buffers) — both pre-existing wolfSSL UB.
4849
- name: "UBSan-v185"
4950
cc: clang
50-
cflags: "-fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer -g"
51+
cflags: "-fsanitize=undefined -fno-sanitize=alignment -fno-sanitize-recover=all -fno-omit-frame-pointer -g"
5152
ldflags: "-fsanitize=undefined"
5253
ubsan_options: "halt_on_error=1:print_stacktrace=1"
5354
wolftpm_extra_config: "--enable-v185"

src/fwtpm/fwtpm_command.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ static int FwComputeSessionHmac(FWTPM_Session* sess,
558558
hmacKeySz += authValueSz;
559559
}
560560

561-
FWTPM_ALLOC_VAR(hmac, Hmac);
561+
FWTPM_CALLOC_VAR(hmac, Hmac);
562562

563563
rc = wc_HmacInit(hmac, NULL, INVALID_DEVID);
564564

@@ -6578,7 +6578,7 @@ static TPM_RC FwCmd_HMAC(FWTPM_CTX* ctx, TPM2_Packet* cmd,
65786578
enum wc_HashType ht;
65796579

65806580
FWTPM_ALLOC_BUF(dataBuf, FWTPM_MAX_DATA_BUF);
6581-
FWTPM_ALLOC_VAR(hmac, Hmac);
6581+
FWTPM_CALLOC_VAR(hmac, Hmac);
65826582

65836583
if (cmdSize < TPM2_HEADER_SIZE + 4) {
65846584
rc = TPM_RC_COMMAND_SIZE;

0 commit comments

Comments
 (0)