diff --git a/.clusterfuzzlite/Dockerfile b/.clusterfuzzlite/Dockerfile new file mode 100644 index 000000000..0282bcf74 --- /dev/null +++ b/.clusterfuzzlite/Dockerfile @@ -0,0 +1,6 @@ +# ClusterFuzzLite build image for the om/tls fuzz targets (black-box: driver coverage only). +FROM gcr.io/oss-fuzz-base/base-builder +RUN apt-get update && apt-get install -y qemu-user-static zip +COPY . $SRC/omega-mv +WORKDIR $SRC/omega-mv +COPY .clusterfuzzlite/build.sh $SRC/ diff --git a/.clusterfuzzlite/build.sh b/.clusterfuzzlite/build.sh new file mode 100644 index 000000000..8b1a3a8de --- /dev/null +++ b/.clusterfuzzlite/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash -eu +# DRAFT (never submitted). OSS-Fuzz / ClusterFuzzLite build: compile each om/tls fuzz target with the pinned +# omc (aarch64, run through qemu-aarch64-static), then one labelled host-tooling libFuzzer driver per target. +# Guide: https://google.github.io/oss-fuzz/getting-started/new-project-guide/ +cd "$SRC/omega-mv" +F=om/tls/test/fuzz +# om/tls/build.sh execs "$1" as one argv. A space-joined qemu command is looked up as a +# single filename and fails with "not found" (PR address check, job 121881757564). +cat > "$WORK/omc-qemu" << EOF +#!/bin/sh +exec qemu-aarch64-static "$SRC/omega-mv/seed/out/omc" "\$@" +EOF +chmod +x "$WORK/omc-qemu" +for t in fz_flight fz_hs fz_x509 fz_pem fz_dns fz_http fz_https; do + cat seed/net/http.om seed/net/https.om $F/common.om $F/$t.om > "$WORK/$t.prog.om" + sh om/tls/build.sh "$WORK/omc-qemu" "$WORK/$t.prog.om" "$OUT/$t.om.bin" + $CC $CFLAGS -c $F/oss-fuzz/omexec_fuzzer.c -o "$WORK/omexec.o" + $CXX $CXXFLAGS "$WORK/omexec.o" $LIB_FUZZING_ENGINE -o "$OUT/$t" + case $t in fz_flight|fz_hs|fz_x509) a=fzstore.pem;; fz_pem) a=chain.bin;; *) a=;; esac + [ -n "$a" ] && cp $F/seeds/$a "$OUT/$a" + printf '[libfuzzer]\nmax_len = 65536\n' > "$OUT/$t.options" + [ -n "$a" ] && printf '%s\n' "$OUT/$a" > "$OUT/$t.arg" + (cd $F/seeds/$t && zip -q "$OUT/${t}_seed_corpus.zip" *) +done diff --git a/.clusterfuzzlite/project.yaml b/.clusterfuzzlite/project.yaml new file mode 100644 index 000000000..b455aa397 --- /dev/null +++ b/.clusterfuzzlite/project.yaml @@ -0,0 +1 @@ +language: c diff --git a/.crumb b/.crumb index f3e51fe46..e2a691c66 100644 --- a/.crumb +++ b/.crumb @@ -72,38 +72,38 @@ }, { "digest": "f765ad87fdddd9b47f690b07298c951a0f7e7675dc5de4ffe44e33a0c14b1986", - "last_commit": "a8a6a3d3c", + "last_commit": "62d1d0d66", "name": "spec", "purpose": "Directory spec. Purpose not yet described by a human." }, { "digest": "aaf5acb82fd4c720cd60c85fd6087f636c72a98e2f3740c9295dcfa525dc64d7", - "last_commit": "bf54b19fa", + "last_commit": "089e5b053", "name": "src", "purpose": "Directory src. Purpose not yet described by a human." }, { "digest": "5395ff8ff9afceebe8e453788f80a3064b831513cc4cb92fd55869115e06b874", - "last_commit": "a8a6a3d3c", + "last_commit": "62d1d0d66", "name": "tests", "purpose": "Directory tests. Purpose not yet described by a human." }, { "digest": "308db0e6cf45c0a48f01f5f5f228450f191389de68006915b9ecf9c65b9a2e29", - "last_commit": "a8a6a3d3c", + "last_commit": "62d1d0d66", "name": "tools", "purpose": "Directory tools. Purpose not yet described by a human." } ], "children_root": "sha256:07bf1706dcffbad66c0353871ff67a6749055da03cee8d8ebdf9a4c91e36bddc", - "compiled_at": "2026-10-30T12:31:50Z", + "compiled_at": "2026-10-30T16:55:26Z", "compiler": "crumb-compile/1", - "digest": "sha256:904fca8c0e0cf3e3a5e5adb73393e01c7018b920bb542d289904240f70e400d6", - "evidence_files": 12622, - "evidence_root": "sha256:b1a08e2ce56e6feada0d8a31f06fbd7adee57adc1c1ad8dec220293ee5d439f9", - "files": 17849, - "generated_at_commit": "52a82f392fa513ebbc2d9d719a0f14c385289b06", - "source_tree": "sha256:75458da6553a0ee5ea2af95f46afb658e8a3f6e53cca6e3b4b9874035f78c2ed" + "digest": "sha256:c6ac8fc0aad8f90ad6d1ebe756b38817e8448b0250bc4beffaca7320bb289cbf", + "evidence_files": 12656, + "evidence_root": "sha256:bd79e810bc611ab613b60be67f849ec2c282dbb851493508b6ca3798bb338183", + "files": 18213, + "generated_at_commit": "9e24b074455942f99d26d7aed4752e07bcdb7d22", + "source_tree": "sha256:cc9903e7f2d9538d51c018530cc5c4fc037950073bec4f126525d7a49f16b157" }, "owner_lane": "", "provenance": { diff --git a/.github/workflows/cflite_pr.yml b/.github/workflows/cflite_pr.yml new file mode 100644 index 000000000..95c554125 --- /dev/null +++ b/.github/workflows/cflite_pr.yml @@ -0,0 +1,35 @@ +# ClusterFuzzLite PR fuzzing for the om/tls fuzz targets. Actions pinned by commit sha. +# Black-box: libFuzzer sees the labelled host-tooling driver (om/tls/test/fuzz/oss-fuzz/omexec_fuzzer.c), +# not .om coverage; a target exit >= 100 (Omega trap) aborts the driver and is reported as a crash. +name: ClusterFuzzLite PR fuzzing +on: + pull_request: + paths: ['om/tls/**', 'seed/net/**', '.clusterfuzzlite/**'] +permissions: read-all +jobs: + PR: + runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + strategy: + fail-fast: false + matrix: + sanitizer: [address] + steps: + - name: Build fuzzers + id: build + uses: google/clusterfuzzlite/actions/build_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1 + with: + language: c + github-token: ${{ secrets.GITHUB_TOKEN }} + sanitizer: ${{ matrix.sanitizer }} + - name: Run fuzzers + id: run + uses: google/clusterfuzzlite/actions/run_fuzzers@884713a6c30a92e5e8544c39945cd7cb630abcd1 # v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + fuzz-seconds: 600 + mode: code-change + sanitizer: ${{ matrix.sanitizer }} + output-sarif: true diff --git a/.github/workflows/om-tls-arm64.yml b/.github/workflows/om-tls-arm64.yml new file mode 100644 index 000000000..6b2c1b9be --- /dev/null +++ b/.github/workflows/om-tls-arm64.yml @@ -0,0 +1,45 @@ +# om-tls-arm64: independent ARM64 rerun of the om/tls suite (RFC 8448 vectors, DNS unit, DIT probe, +# interop against openssl s_server and the Python fake server, secret-residue scan, 26 mutants) and +# of the seed/net HTTP/HTTPS check on a GitHub-hosted ubuntu-24.04-arm machine, with the pinned omc +# (om/units.sh OMC_PIN). Network stages stay NOT_RUN (TLS_NET unset). Logs are uploaded as artifacts. +# Advisory, like AIEN Checks: GitHub gates no merge (Alpha does). +name: om-tls-arm64 +on: + pull_request: + paths: ["om/tls/**", "seed/net/**", "seed/json/**", "seed/out/omc", "om/units.sh", ".github/workflows/om-tls-arm64.yml"] + push: + branches: [main] +permissions: + contents: read +jobs: + om-tls: + runs-on: ubuntu-24.04-arm + timeout-minutes: 45 + steps: + - uses: actions/checkout@v4 + - name: machine and tools + run: | + uname -a; nproc; openssl version; python3 --version + python3 -c 'import cryptography' 2>/dev/null || sudo apt-get install -y -q python3-cryptography + python3 -c 'import cryptography; print("cryptography", cryptography.__version__)' + - name: omc pin + run: | + pin=$(sed -n 's/^OMC_PIN=//p' om/units.sh | tr -d '"') + got=$(sha256sum seed/out/omc | cut -c1-64) + echo "pin $pin"; echo "got $got" + [ "$pin" = "$got" ] || { echo "seed/out/omc does not match OMC_PIN"; exit 1; } + chmod +x seed/out/omc + - name: om/tls suite + run: mkdir -p build && sh om/tls/test/tls/run.sh "$PWD/seed/out/omc" 2>&1 | tee build/om-tls-run.log; test "${PIPESTATUS[0]}" = 0 + - name: seed/net HTTP and HTTPS check + run: python3 seed/net/tests/check.py --keep build/netcheck 2>&1 | tee build/net-check.log; test "${PIPESTATUS[0]}" = 0 + - name: logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: om-tls-arm64-logs + path: | + build/om-tls-run.log + build/net-check.log + build/tls/tls/*.log + build/tls/tls/interop-table.txt diff --git a/evidence/om-tls-review-2026-10-26/PORTING.md b/evidence/om-tls-review-2026-10-26/PORTING.md new file mode 100644 index 000000000..b5b116154 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/PORTING.md @@ -0,0 +1,57 @@ +# Porting note: catalog.py, omega_projects_pusher.py and allen_relay_mailer.py onto om/tls + +Source: aien-dev/omega-mv PR #813, MERGED as 705c0f010e782408c270f66d67462bb46170e5b5 (2026-10-26). +Pin that merge commit. omc on main is 189ada82…3b54 (suites re-run on it). + +## Build + +- Run `sh om/tls/build.sh OMC your.om OUT`. It composes `om2`, then the nine TLS units, then your + program. +- The units take 329 of omc's 512 functions per unit, which leaves about 180 for your code and + OmegaNet's http/json. +- Local arrays: `c` needs `new uchar 119296` (TLCSZ) and the trust store `new uchar 262144` + (TLSTSZ), together about 372 KiB of the 4 MiB local-array limit. Allocate both in `main`. + Globals cannot be passed (error 19). + +## Calls + +``` +e = tls_store st +e = tls_init c host 1 (1 offers ALPN http/1.1; use 0 for SMTP) +fd = tls_dial host 443 (465 for mail.gandi.net) +tls_deadline c add monons 30000000000 +e = tls_connect c st int fd (0, or a TLS_ERR_* code; tls_errname and tls_detail say why) +n = tls_write c req +n = tls_read c buf (repeat: >0 bytes, 0 = close_notify, <0 = -code) +tls_close c +x = fclose int fd +``` + +## Behaviour to rely on + +- Every failure fails closed. There is no insecure option to look for. +- `TLS_ERR_EOF` (-4 from `tls_read`) means the TCP connection ended without close_notify. Treat it + as truncation, not success. + +## SMTP + +- Port 465 (implicit TLS): the server's banner comes first, then EHLO, AUTH and the rest. +- Port 587 (STARTTLS): do the plaintext exchange on the fd first (banner, EHLO, STARTTLS, 220), + then `tls_connect`. After the handshake the client speaks first. +- `om/tls/test/tls/client.om` modes `smtp` and `tsmtp` show both. They match Python ssl + byte for byte against mail.gandi.net. + +## HTTP + +- The HTTP framing comes from OmegaNet's http.om; it calls `tls_read` and `tls_write` with + `c = part io HTB HTL`. +- `client.om` mode `get` is a working minimal GET that uses `Connection: close`. It matched Python + ssl on bodies of up to 680548 bytes. + +## Limits + +- IPv4 only, with DNS over UDP from `/etc/resolv.conf`. +- No revocation checking. +- No HelloRetryRequest, so servers that refuse x25519 are refused. All three target hosts accept + x25519. +- See `om/tls/README.md`. diff --git a/evidence/om-tls-review-2026-10-26/README.md b/evidence/om-tls-review-2026-10-26/README.md new file mode 100644 index 000000000..9a57419af --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/README.md @@ -0,0 +1,15 @@ +# om/tls security review bundle, 2026-10-26 (imported from /home/drakestapleton/handoffs/omega-tls) + +Prior-lane review reports and raw logs for om/tls at omega-mv main 705c0f01 (omc pin 189ada82), +retained here so an outside auditor can read what the inside review found and reproduce the runs. + +- `security-review.md`, `security-rereview.md`: the two inside review passes and their fix status +- `tls-contract.md`, `PORTING.md`: the port contract and porting notes +- `handoff-evidence/`: raw unit logs (sha2, x25519, chacha, aesgcm, ec, rsa, x509), the interop table, + `tls-run-20261026T1706Z.log` (full suite), `main-pin-189ada82/` and `review-fix/` logs +- `SHA256SUMS`: `sha256sum` of every file above, taken when they were copied (verify with + `sha256sum -c SHA256SUMS` from this directory) + +Evidence level: the logs are MEASURED on the DGX Spark host (arm64, GB10); nothing here is a +hardware or third-party qualification. The outside-review fixes that followed are in the +`audit/tls-outside-review` branch (om/tls/THREAT_MODEL.md, om/tls/AUDIT_SCOPE.md). diff --git a/evidence/om-tls-review-2026-10-26/SHA256SUMS b/evidence/om-tls-review-2026-10-26/SHA256SUMS new file mode 100644 index 000000000..acaef6fea --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/SHA256SUMS @@ -0,0 +1,33 @@ +7aabf89a7979adec1ee810774b8857c9c31aa93dee6d9f6a82d48145d390ea26 ./handoff-evidence/aesgcm.log +e4395706c6508603a87e4a80baa47fc92274b3eade562a77c9ba621b691cb4fa ./handoff-evidence/chacha.log +dfee35d66bfb4b38b6f60d176de854e40d178666c361cb80ea96c92a3924333c ./handoff-evidence/ec.log +e4b6c328ca37acd37d09de2a433fd6984bb16991dbb6a7fbbe1d8880812e7f44 ./handoff-evidence/interop-table.txt +8affc77c543cc124d2c5c507b075dacc46a8844767ad45af6c171f251a048b73 ./handoff-evidence/main-pin-189ada82/aesgcm.log +bb7cc82b5963eedc99153fddb0f7922c3a2c0f7717e4dc11f1eec6e605e757cf ./handoff-evidence/main-pin-189ada82/chacha.log +20db29226c9d0a9d9193cb37a88e96d1bdbe53e6bca8694dc6a90b5e7e050130 ./handoff-evidence/main-pin-189ada82/ec.log +5c7afc1d84f622fe6ec1c129e4b41502e052b748cfada876f02aa04716171ec1 ./handoff-evidence/main-pin-189ada82/interop-table.txt +d191307cf551f0992ef694dd0fab22fd6c5a925ccbf3fb2092a46d20cb1506f0 ./handoff-evidence/main-pin-189ada82/omc.sha256 +86ee51fd497f39ffe64208b0cba9ba603b77d632ab2f1ceea358c1c1de568b0a ./handoff-evidence/main-pin-189ada82/rsa.log +e6e2370c7772dd2eeec12fda6a43da78e431a926848733de5cdeb73a7aa0446e ./handoff-evidence/main-pin-189ada82/sha2.log +ba8ae60e9146a49cf9c184e374a3b1c055ac30d891f2261c641f8123ec421eca ./handoff-evidence/main-pin-189ada82/tls.log +8355d3a4c8eff4f0e0145c97222cf720a24e3e6136cad13c8e7c1bbfd194cebf ./handoff-evidence/main-pin-189ada82/x25519.log +f08b6f2ea5de9e055da7bc9f2f2954182014cea0d3f014da35cad2339270dfce ./handoff-evidence/main-pin-189ada82/x509.log +3f7d7eba1ec3d266752035362d90aa96a8bf94cba2cac89d3f67ce81165c535c ./handoff-evidence/review-fix/aesgcm.log +85ab5e7f1359bb22aba0688ce8d8f0dd2b86cc3de4e4017108e0a80a22ebf36e ./handoff-evidence/review-fix/chacha.log +d01f8c9676fa414a8ea540eafe437b0749c6120d2152e8b900d234b4bd8ba099 ./handoff-evidence/review-fix/ec.log +068cd4f72207bcadc64de7cd90abc42e1b972871b25c824a3cdb6f8380e91373 ./handoff-evidence/review-fix/interop-table.txt +a2c1408f0302775250fde3f20ab42463013e07625ce21ec257ba251b7f6380f2 ./handoff-evidence/review-fix/rsa.log +a884c6abceaa13b379e099fa7bed993bff2f4d79751463169bca52676df34b87 ./handoff-evidence/review-fix/sha2.log +3779dc3496493a0e3943ae75f27e4e4b88532b9daddb40f93a2dd0596a2dc370 ./handoff-evidence/review-fix/tls.log +0742aaad42e40a48477429d0802e55b7bd82c3fd6e1bed8e840cd89fa8af1e6e ./handoff-evidence/review-fix/x25519.log +61a31648cd314650e280f5717f33f2a4600fdd1af59f447d1e06d07061160499 ./handoff-evidence/review-fix/x509.log +fee090a8a808842293352200ac79ca65ec43504688a87fb11a159001977655fa ./handoff-evidence/rsa.log +a884c6abceaa13b379e099fa7bed993bff2f4d79751463169bca52676df34b87 ./handoff-evidence/sha2.log +eb96dd04282fca4a2bec465639f094d89482628e4ac28515b64bd3111a1f6f37 ./handoff-evidence/tls-run-20261026T1706Z.log +8b1a87f15ba77ac7cb5636665dbf2c399a52ea9b3848a804f0bc433d90747484 ./handoff-evidence/x25519.log +affde751ccde591e1404fdb6d5f60bde50af8555aa64e93777f8e1f07336aecf ./handoff-evidence/x509.log +9e594695dd95b2861599d7170081c43beebb9c631153f2fc684203baeae2af6c ./PORTING.md +148bc626ad0ddaadcd982c659189408661e2ba579aa7e4a6bd553a24986f8cd7 ./security-rereview.md +4c88a99fce50837c60f622714d066aaea89fe6a8b723b10b9c9b5f07817f4236 ./security-review.md +db01ad9395e3c7183b735feed14b59e9f230c8fe549cc41986ad499016b68b9b ./tls-contract.md +57090d10d30eafd7177c3f0aa8f9accfaaacccaab56b18ed68e3c09c4901a2f2 README.md diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/aesgcm.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/aesgcm.log new file mode 100644 index 000000000..350dc14e7 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/aesgcm.log @@ -0,0 +1,28 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +library functions 37 +PASS fips197: aesgcm driver: 4 checks, 0 failed +PASS wycheproof: aesgcm driver: 316 checks, 0 failed +PASS gcmEncryptExtIV128: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV192: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV256: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt128: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt192: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt256: aesgcm driver: 7875 checks, 0 failed +nist: 47250 vectors (11908 decrypt vectors expect FAIL) +PASS params: aesgcm driver: 19 checks, 0 failed +PASS speed: aesgcm driver: 3 checks, 0 failed +aesgcm speed bytes=1048576 seal_ns=38564056 open_ns=29788786 seal_MBps=27 open_MBps=35 +aesgcm speed bytes=1048576 seal_ns=20868955 open_ns=20884652 seal_MBps=50 open_MBps=50 +aesgcm speed bytes=1048576 seal_ns=21268959 open_ns=21078718 seal_MBps=49 open_MBps=49 +PASS mutant-sbox: detected, exit 1, 233 MISMATCH (aesgcm driver: 320 checks, 233 failed) +PASS mutant-ghash: detected, exit 1, 226 MISMATCH (aesgcm driver: 320 checks, 226 failed) +PASS mutant-rcon: detected, exit 1, 81 MISMATCH (aesgcm driver: 320 checks, 81 failed) +PASS mutant-tagcheck: detected, exit 1, 310 MISMATCH (aesgcm driver: 320 checks, 310 failed) +PASS mutant-expect: detected, exit 1, 1 MISMATCH (aesgcm driver: 316 checks, 1 failed) +NOT_RUN wycheproof aes_gcm_siv_test.json: AES-GCM-SIV (RFC 8452) is not implemented +NOT_RUN wycheproof aria_gcm_test.json, seed_gcm_test.json, sm4_gcm_test.json: other block ciphers +NOT_RUN wycheproof c2sp_chunked_encryption_aes_{128,256}_gcm_test.json: chunked-encryption construction, not raw AES-GCM +wycheproof: 316 tests: valid 229 passed, invalid 87 refused, acceptable 0 +checks outside the vectors: params=19 speed=3 (both passed) +AESGCM PASS vectors=47570 (fips197=4, nist=47250, wycheproof=316) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/chacha.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/chacha.log new file mode 100644 index 000000000..a2d4d2845 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/chacha.log @@ -0,0 +1,20 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +driver sha256 1130187a2edc36c4b12fbafbe7295a61cbb184fe62891427fdcc0728737dba00 +PASS rfc8439: chacha driver: 36 checks, 0 failed +PASS wycheproof-regenerate: committed conversions equal a fresh conversion at d17cc89fa5c8f4f4d378b5385ebf75da5d0926c9 +PASS wycheproof-chacha20-poly1305: chacha driver: 325 checks, 0 failed +PASS wycheproof-chacha20-counter: chacha driver: 14 checks, 0 failed +NOTE wycheproof chacha20_poly1305_test.json: expected codes 0:256 1:60 2:9; NOT_RUN 0 (0 valid sealed+opened, 1 invalid tag refused, 2 invalid nonce size refused; no acceptable) +NOTE wycheproof chacha20_counter_test.json: expected codes 0:11 2:3; NOT_RUN 28 (NOT_RUN = XChaCha20 groups, not implemented) +PASS cryptography-diff(seed 1): chacha driver: 2709 checks, 0 failed +PASS tamper-refused: chacha driver: 3 checks, 0 failed +PASS tamper-claimed-valid: 3 of 3 tampered records rejected +PASS mutant-expectation: detected, exit 1, 1 MISMATCH (chacha driver: 36 checks, 1 failed) +PASS mutant-qr-rotation: detected, exit 1, 278 MISMATCH (chacha driver: 361 checks, 278 failed) +PASS mutant-poly-clamp: detected, exit 1, 133 MISMATCH (chacha driver: 361 checks, 133 failed) +PASS mutant-poly-fold: detected, exit 1, 267 MISMATCH (chacha driver: 361 checks, 267 failed) +PASS mutant-poly-final: detected, exit 1, 272 MISMATCH (chacha driver: 361 checks, 272 failed) +PASS bench-1MiB: 16 open+reseal rounds restored the plaintext; sealed sha256 314d4f2a5908e50854a934af2df4cee3f86baa891a64a68a384a58432b1e260b equals cryptography +THROUGHPUT bench-1MiB: 33 MiB through seal/open in 170604512 ns = 202.8 MB/s (whole process, incl. start-up and pattern checks) +CHACHA PASS vectors=3087 (wycheproof=339) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/ec.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/ec.log new file mode 100644 index 000000000..9c632a601 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/ec.log @@ -0,0 +1,92 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 functions 27 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +driver e0424968291256158695a6c339806ba158c475144ce13662e8ce8717607b7e66 +PASS cavp_sigver: cases 180 verifies 180 controls 108 mismatches 0 ns 493265566 codes 36 144 0 0 0 0 +PASS edge: cases 56 verifies 56 controls 12 mismatches 0 ns 26344787 codes 4 0 16 20 12 4 +PASS wycheproof_secp256r1_sha256: cases 484 verifies 484 controls 522 mismatches 0 ns 302705888 codes 174 23 221 0 66 0 +PASS wycheproof_secp256r1_sha256_p1363: cases 262 verifies 262 controls 519 mismatches 0 ns 276694216 codes 173 18 21 0 50 0 +PASS wycheproof_secp256r1_sha512: cases 554 verifies 554 controls 729 mismatches 0 ns 406244962 codes 243 25 220 0 66 0 +PASS wycheproof_secp256r1_sha512_p1363: cases 332 verifies 332 controls 726 mismatches 0 ns 356895845 codes 242 19 21 0 50 0 +PASS wycheproof_secp384r1_sha256: cases 472 verifies 472 controls 486 mismatches 0 ns 786480837 codes 162 24 220 0 66 0 +PASS wycheproof_secp384r1_sha384: cases 504 verifies 504 controls 582 mismatches 0 ns 925188254 codes 194 23 221 0 66 0 +PASS wycheproof_secp384r1_sha384_p1363: cases 280 verifies 280 controls 579 mismatches 0 ns 868910628 codes 193 18 19 0 50 0 +PASS wycheproof_secp384r1_sha512: cases 542 verifies 542 controls 693 mismatches 0 ns 1059887025 codes 231 23 221 0 67 0 +PASS wycheproof_secp384r1_sha512_p1363: cases 318 verifies 318 controls 690 mismatches 0 ns 1013540826 codes 230 19 19 0 50 0 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_bitcoin_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256r1_sha3_256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_384_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp521r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_test.json: curve not P-256/P-384 +NOT_RUN cavp SigVer.rsp P-256/P-384 with SHA-1, SHA-224: hash not in om/tls/sha2.om +NOT_RUN cavp SigVer.rsp P-192, P-224, P-521, K-*, B-* sections: curve not P-256/P-384 +NOT_RUN cavp SigVer_TruncatedSHAs.rsp (SHA-512/224, SHA-512/256): hash not in om/tls/sha2.om +PASS mutant-expectation detected: 1 mismatches, cases 484 verifies 484 controls 519 mismatches 1 ns 290819864 codes 174 23 221 0 66 0 +PASS mutant-b256 detected: 696 mismatches, cases 484 verifies 484 controls 522 mismatches 696 ns 10891612 codes 0 0 0 484 0 0 +PASS mutant-padd detected: 194 mismatches, cases 504 verifies 504 controls 582 mismatches 194 ns 901496660 codes 0 217 221 0 66 0 +PASS mutant-n0 detected: 36 mismatches, cases 180 verifies 180 controls 108 mismatches 36 ns 493530663 codes 0 180 0 0 0 0 +PASS mutant-der detected: 2 mismatches, cases 56 verifies 56 controls 12 mismatches 2 ns 17187590 codes 6 0 14 20 12 4 +PASS mutant-digest-column detected: 1 mismatches, cases 504 verifies 504 controls 582 mismatches 1 ns 880274870 codes 194 23 221 0 66 0 +PASS fuzz: cases 3000 verifies 3000 controls 0 mismatches 0 ns 1543832248 codes 0 533 1290 1172 5 0 +TIME secp256r1_sha256: 200 verifies, 309657397 ns total, 1548286 ns per verify +TIME secp384r1_sha384: 200 verifies, 762225788 ns total, 3811128 ns per verify +EC PASS vectors=3984 (wycheproof=3748 cavp=180 edge=56) mutants=6/6 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/interop-table.txt b/evidence/om-tls-review-2026-10-26/handoff-evidence/interop-table.txt new file mode 100644 index 000000000..c9d9c5d3b --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/interop-table.txt @@ -0,0 +1,24 @@ +PASS | good EC chain, chacha | expect OK | got OK +PASS | good EC chain, aes128gcm | expect OK | got OK +PASS | good RSA leaf (rsa_pss) | expect OK | got OK +PASS | expired leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED | got TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED (exit 27) +PASS | not-yet-valid leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 3 | got TLSERR TLS_ERR_CERTIFICATE detail 3 X509_ERR_NOT_YET_VALID (exit 27) +PASS | wrong name | expect TLSERR TLS_ERR_CERTIFICATE detail 4 | got TLSERR TLS_ERR_CERTIFICATE detail 4 X509_ERR_NAME_MISMATCH (exit 27) +PASS | self-signed leaf (CA:TRUE) | expect TLSERR TLS_ERR_CERTIFICATE detail 15 | got TLSERR TLS_ERR_CERTIFICATE detail 15 X509_ERR_LEAF_IS_CA (exit 27) +PASS | self-signed leaf (CA:FALSE) | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | bad cert signature | expect TLSERR TLS_ERR_CERTIFICATE detail 6 | got TLSERR TLS_ERR_CERTIFICATE detail 6 X509_ERR_BAD_SIGNATURE (exit 27) +PASS | unknown issuer | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | missing intermediate | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | TLS 1.2 only server | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 70 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 70 (exit 31) +PASS | AES-256 suite only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | P-256 group only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | fake ServerHello: tls12 | expect TLSERR TLS_ERR_PROTOCOL_VERSION | got TLSERR TLS_ERR_PROTOCOL_VERSION detail 0 (exit 19) +PASS | fake ServerHello: hrr | expect TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED | got TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED detail 0 (exit 23) +PASS | fake ServerHello: suite | expect TLSERR TLS_ERR_CIPHER_SUITE | got TLSERR TLS_ERR_CIPHER_SUITE detail 0 (exit 20) +PASS | fake ServerHello: sid | expect TLSERR TLS_ERR_SESSION_ID_ECHO | got TLSERR TLS_ERR_SESSION_ID_ECHO detail 0 (exit 24) +PASS | fake ServerHello: group | expect TLSERR TLS_ERR_KEY_SHARE | got TLSERR TLS_ERR_KEY_SHARE detail 0 (exit 21) +PASS | fake ServerHello: zero | expect TLSERR TLS_ERR_ZERO_SHARED_SECRET | got TLSERR TLS_ERR_ZERO_SHARED_SECRET detail 0 (exit 25) +PASS | fake ServerHello: dupext | expect TLSERR TLS_ERR_EXTENSION | got TLSERR TLS_ERR_EXTENSION detail 0 (exit 22) +PASS | fake ServerHello: trail | expect TLSERR TLS_ERR_DECODE | got TLSERR TLS_ERR_DECODE detail 0 (exit 18) +PASS | tampered record (proxy) | expect TLSERR TLS_ERR_BAD_RECORD_MAC | got TLSERR TLS_ERR_BAD_RECORD_MAC detail 0 (exit 16) +INTEROP PASS rows=23 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/aesgcm.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/aesgcm.log new file mode 100644 index 000000000..76a86ea7d --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/aesgcm.log @@ -0,0 +1,28 @@ +omc sha256 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +library sha256 b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +library functions 37 +PASS fips197: aesgcm driver: 4 checks, 0 failed +PASS wycheproof: aesgcm driver: 316 checks, 0 failed +PASS gcmEncryptExtIV128: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV192: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV256: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt128: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt192: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt256: aesgcm driver: 7875 checks, 0 failed +nist: 47250 vectors (11908 decrypt vectors expect FAIL) +PASS params: aesgcm driver: 19 checks, 0 failed +PASS speed: aesgcm driver: 3 checks, 0 failed +aesgcm speed bytes=1048576 seal_ns=38392438 open_ns=32630098 seal_MBps=27 open_MBps=32 +aesgcm speed bytes=1048576 seal_ns=19680191 open_ns=19661023 seal_MBps=53 open_MBps=53 +aesgcm speed bytes=1048576 seal_ns=19668047 open_ns=19672063 seal_MBps=53 open_MBps=53 +PASS mutant-sbox: detected, exit 1, 233 MISMATCH (aesgcm driver: 320 checks, 233 failed) +PASS mutant-ghash: detected, exit 1, 226 MISMATCH (aesgcm driver: 320 checks, 226 failed) +PASS mutant-rcon: detected, exit 1, 81 MISMATCH (aesgcm driver: 320 checks, 81 failed) +PASS mutant-tagcheck: detected, exit 1, 310 MISMATCH (aesgcm driver: 320 checks, 310 failed) +PASS mutant-expect: detected, exit 1, 1 MISMATCH (aesgcm driver: 316 checks, 1 failed) +NOT_RUN wycheproof aes_gcm_siv_test.json: AES-GCM-SIV (RFC 8452) is not implemented +NOT_RUN wycheproof aria_gcm_test.json, seed_gcm_test.json, sm4_gcm_test.json: other block ciphers +NOT_RUN wycheproof c2sp_chunked_encryption_aes_{128,256}_gcm_test.json: chunked-encryption construction, not raw AES-GCM +wycheproof: 316 tests: valid 229 passed, invalid 87 refused, acceptable 0 +checks outside the vectors: params=19 speed=3 (both passed) +AESGCM PASS vectors=47570 (fips197=4, nist=47250, wycheproof=316) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/chacha.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/chacha.log new file mode 100644 index 000000000..c9e0f566d --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/chacha.log @@ -0,0 +1,20 @@ +omc sha256 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +library sha256 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +driver sha256 1130187a2edc36c4b12fbafbe7295a61cbb184fe62891427fdcc0728737dba00 +PASS rfc8439: chacha driver: 36 checks, 0 failed +PASS wycheproof-regenerate: committed conversions equal a fresh conversion at d17cc89fa5c8f4f4d378b5385ebf75da5d0926c9 +PASS wycheproof-chacha20-poly1305: chacha driver: 325 checks, 0 failed +PASS wycheproof-chacha20-counter: chacha driver: 14 checks, 0 failed +NOTE wycheproof chacha20_poly1305_test.json: expected codes 0:256 1:60 2:9; NOT_RUN 0 (0 valid sealed+opened, 1 invalid tag refused, 2 invalid nonce size refused; no acceptable) +NOTE wycheproof chacha20_counter_test.json: expected codes 0:11 2:3; NOT_RUN 28 (NOT_RUN = XChaCha20 groups, not implemented) +PASS cryptography-diff(seed 1): chacha driver: 2709 checks, 0 failed +PASS tamper-refused: chacha driver: 3 checks, 0 failed +PASS tamper-claimed-valid: 3 of 3 tampered records rejected +PASS mutant-expectation: detected, exit 1, 1 MISMATCH (chacha driver: 36 checks, 1 failed) +PASS mutant-qr-rotation: detected, exit 1, 278 MISMATCH (chacha driver: 361 checks, 278 failed) +PASS mutant-poly-clamp: detected, exit 1, 133 MISMATCH (chacha driver: 361 checks, 133 failed) +PASS mutant-poly-fold: detected, exit 1, 267 MISMATCH (chacha driver: 361 checks, 267 failed) +PASS mutant-poly-final: detected, exit 1, 272 MISMATCH (chacha driver: 361 checks, 272 failed) +PASS bench-1MiB: 16 open+reseal rounds restored the plaintext; sealed sha256 314d4f2a5908e50854a934af2df4cee3f86baa891a64a68a384a58432b1e260b equals cryptography +THROUGHPUT bench-1MiB: 33 MiB through seal/open in 166130870 ns = 208.3 MB/s (whole process, incl. start-up and pattern checks) +CHACHA PASS vectors=3087 (wycheproof=339) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/ec.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/ec.log new file mode 100644 index 000000000..40b4115dd --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/ec.log @@ -0,0 +1,92 @@ +omc 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 functions 27 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +driver e0424968291256158695a6c339806ba158c475144ce13662e8ce8717607b7e66 +PASS cavp_sigver: cases 180 verifies 180 controls 108 mismatches 0 ns 472474895 codes 36 144 0 0 0 0 +PASS edge: cases 56 verifies 56 controls 12 mismatches 0 ns 11781302 codes 4 0 16 20 12 4 +PASS wycheproof_secp256r1_sha256: cases 484 verifies 484 controls 522 mismatches 0 ns 264263768 codes 174 23 221 0 66 0 +PASS wycheproof_secp256r1_sha256_p1363: cases 262 verifies 262 controls 519 mismatches 0 ns 250936346 codes 173 18 21 0 50 0 +PASS wycheproof_secp256r1_sha512: cases 554 verifies 554 controls 729 mismatches 0 ns 383287144 codes 243 25 220 0 66 0 +PASS wycheproof_secp256r1_sha512_p1363: cases 332 verifies 332 controls 726 mismatches 0 ns 345547449 codes 242 19 21 0 50 0 +PASS wycheproof_secp384r1_sha256: cases 472 verifies 472 controls 486 mismatches 0 ns 747823734 codes 162 24 220 0 66 0 +PASS wycheproof_secp384r1_sha384: cases 504 verifies 504 controls 582 mismatches 0 ns 857973762 codes 194 23 221 0 66 0 +PASS wycheproof_secp384r1_sha384_p1363: cases 280 verifies 280 controls 579 mismatches 0 ns 858897329 codes 193 18 19 0 50 0 +PASS wycheproof_secp384r1_sha512: cases 542 verifies 542 controls 693 mismatches 0 ns 999816038 codes 231 23 221 0 67 0 +PASS wycheproof_secp384r1_sha512_p1363: cases 318 verifies 318 controls 690 mismatches 0 ns 973452272 codes 230 19 19 0 50 0 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_bitcoin_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256r1_sha3_256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_384_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp521r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_test.json: curve not P-256/P-384 +NOT_RUN cavp SigVer.rsp P-256/P-384 with SHA-1, SHA-224: hash not in om/tls/sha2.om +NOT_RUN cavp SigVer.rsp P-192, P-224, P-521, K-*, B-* sections: curve not P-256/P-384 +NOT_RUN cavp SigVer_TruncatedSHAs.rsp (SHA-512/224, SHA-512/256): hash not in om/tls/sha2.om +PASS mutant-expectation detected: 1 mismatches, cases 484 verifies 484 controls 519 mismatches 1 ns 266099301 codes 174 23 221 0 66 0 +PASS mutant-b256 detected: 696 mismatches, cases 484 verifies 484 controls 522 mismatches 696 ns 23178382 codes 0 0 0 484 0 0 +PASS mutant-padd detected: 194 mismatches, cases 504 verifies 504 controls 582 mismatches 194 ns 873675413 codes 0 217 221 0 66 0 +PASS mutant-n0 detected: 36 mismatches, cases 180 verifies 180 controls 108 mismatches 36 ns 468841393 codes 0 180 0 0 0 0 +PASS mutant-der detected: 2 mismatches, cases 56 verifies 56 controls 12 mismatches 2 ns 34366147 codes 6 0 14 20 12 4 +PASS mutant-digest-column detected: 1 mismatches, cases 504 verifies 504 controls 582 mismatches 1 ns 869240443 codes 194 23 221 0 66 0 +PASS fuzz: cases 3000 verifies 3000 controls 0 mismatches 0 ns 1485590760 codes 0 533 1290 1172 5 0 +TIME secp256r1_sha256: 200 verifies, 267134764 ns total, 1335673 ns per verify +TIME secp384r1_sha384: 200 verifies, 787074708 ns total, 3935373 ns per verify +EC PASS vectors=3984 (wycheproof=3748 cavp=180 edge=56) mutants=6/6 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/interop-table.txt b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/interop-table.txt new file mode 100644 index 000000000..b28158da9 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/interop-table.txt @@ -0,0 +1,39 @@ +PASS | good EC chain, chacha | expect OK | got OK +PASS | good EC chain, aes128gcm | expect OK | got OK +PASS | good RSA leaf (rsa_pss) | expect OK | got OK +PASS | expired leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED | got TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED (exit 27) +PASS | not-yet-valid leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 3 | got TLSERR TLS_ERR_CERTIFICATE detail 3 X509_ERR_NOT_YET_VALID (exit 27) +PASS | wrong name | expect TLSERR TLS_ERR_CERTIFICATE detail 4 | got TLSERR TLS_ERR_CERTIFICATE detail 4 X509_ERR_NAME_MISMATCH (exit 27) +PASS | self-signed leaf (CA:TRUE) | expect TLSERR TLS_ERR_CERTIFICATE detail 15 | got TLSERR TLS_ERR_CERTIFICATE detail 15 X509_ERR_LEAF_IS_CA (exit 27) +PASS | self-signed leaf (CA:FALSE) | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | bad cert signature | expect TLSERR TLS_ERR_CERTIFICATE detail 6 | got TLSERR TLS_ERR_CERTIFICATE detail 6 X509_ERR_BAD_SIGNATURE (exit 27) +PASS | unknown issuer | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | missing intermediate | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | TLS 1.2 only server | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 70 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 70 (exit 31) +PASS | AES-256 suite only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | P-256 group only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | fake ServerHello: tls12 | expect TLSERR TLS_ERR_PROTOCOL_VERSION | got TLSERR TLS_ERR_PROTOCOL_VERSION detail 0 (exit 19) +PASS | fake ServerHello: hrr | expect TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED | got TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED detail 0 (exit 23) +PASS | fake ServerHello: suite | expect TLSERR TLS_ERR_CIPHER_SUITE | got TLSERR TLS_ERR_CIPHER_SUITE detail 0 (exit 20) +PASS | fake ServerHello: sid | expect TLSERR TLS_ERR_SESSION_ID_ECHO | got TLSERR TLS_ERR_SESSION_ID_ECHO detail 0 (exit 24) +PASS | fake ServerHello: group | expect TLSERR TLS_ERR_KEY_SHARE | got TLSERR TLS_ERR_KEY_SHARE detail 0 (exit 21) +PASS | fake ServerHello: zero | expect TLSERR TLS_ERR_ZERO_SHARED_SECRET | got TLSERR TLS_ERR_ZERO_SHARED_SECRET detail 0 (exit 25) +PASS | fake ServerHello: dupext | expect TLSERR TLS_ERR_EXTENSION | got TLSERR TLS_ERR_EXTENSION detail 0 (exit 22) +PASS | fake ServerHello: trail | expect TLSERR TLS_ERR_DECODE | got TLSERR TLS_ERR_DECODE detail 0 (exit 18) +PASS | fakesrv: ok | expect OK | got OK +PASS | fakesrv: empty50 | expect OK | got OK +PASS | fakesrv: ccs2 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccsflood | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccspre | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccslate | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: encccs | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: frag | expect TLSERR TLS_ERR_MESSAGE_TOO_BIG detail 0 (exit 32) | got TLSERR TLS_ERR_MESSAGE_TOO_BIG detail 0 (exit 32) +PASS | fakesrv: cvbad | expect TLSERR TLS_ERR_CERTIFICATE_VERIFY | got TLSERR TLS_ERR_CERTIFICATE_VERIFY detail 6 X509_ERR_BAD_SIGNATURE (exit 29) +PASS | fakesrv: cvkey | expect TLSERR TLS_ERR_CERTIFICATE_VERIFY | got TLSERR TLS_ERR_CERTIFICATE_VERIFY detail 6 X509_ERR_BAD_SIGNATURE (exit 29) +PASS | fakesrv: cvskip | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: empty1500 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: tickets1500 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: closehs | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) | got TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) +PASS | fakesrv: closepre | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) | got TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) +PASS | tampered record (proxy) | expect TLSERR TLS_ERR_BAD_RECORD_MAC | got TLSERR TLS_ERR_BAD_RECORD_MAC detail 0 (exit 16) +INTEROP PASS rows=38 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/omc.sha256 b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/omc.sha256 new file mode 100644 index 000000000..26a0a4762 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/omc.sha256 @@ -0,0 +1 @@ +189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 seed/out/omc diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/rsa.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/rsa.log new file mode 100644 index 000000000..8a450b15e --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/rsa.log @@ -0,0 +1,139 @@ +omc 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +rsa.om 07414c1104f73f3f0d815ce8a7af9e736233c633f4a2ea080e20307ea1919c11 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +functions rsa.om 32 +driver 46ca78f0fcb5429cf80151dc71bce48fb58c02e028d7b6e3cdd2963b309eac63 +PASS wycheproof/rsa_pkcs1_1024_sig_gen_test: cases 17 verifies 17 mismatches 0 controls 17 ns 1799184 +PASS wycheproof/rsa_pkcs1_1536_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 5436224 +PASS wycheproof/rsa_pkcs1_2048_sig_gen_test: cases 27 verifies 27 mismatches 0 controls 27 ns 23692020 +PASS wycheproof/rsa_pkcs1_3072_sig_gen_test: cases 26 verifies 26 mismatches 0 controls 26 ns 22294807 +PASS wycheproof/rsa_pkcs1_4096_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 36936041 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_params_test: cases 103 verifies 103 mismatches 0 controls 61 ns 39060266 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_test: cases 103 verifies 103 mismatches 0 controls 61 ns 38973147 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 59191843 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 40977118 +PASS wycheproof/rsa_pss_2048_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 69974702 +PASS wycheproof/rsa_pss_2048_sha512_mgf1sha256_32_params_test: cases 178 verifies 178 mismatches 0 controls 132 ns 79329859 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 90709818 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 92144035 +PASS wycheproof/rsa_pss_4096_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 157593127 +PASS wycheproof/rsa_pss_4096_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 226596211 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_params_test: cases 177 verifies 177 mismatches 0 controls 132 ns 268860553 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_test: cases 177 verifies 177 mismatches 0 controls 132 ns 280380262 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_params_test: cases 179 verifies 179 mismatches 0 controls 132 ns 268821538 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_test: cases 179 verifies 179 mismatches 0 controls 132 ns 284644202 +PASS wycheproof/rsa_pss_misc_params_test: cases 54 verifies 54 mismatches 0 controls 54 ns 21757391 +PASS wycheproof/rsa_pss_misc_test: cases 54 verifies 54 mismatches 0 controls 54 ns 21760499 +PASS wycheproof/rsa_signature_2048_sha256_test: cases 259 verifies 259 mismatches 0 controls 9 ns 99577947 +PASS wycheproof/rsa_signature_2048_sha384_test: cases 258 verifies 258 mismatches 0 controls 7 ns 130817381 +PASS wycheproof/rsa_signature_2048_sha512_test: cases 259 verifies 259 mismatches 0 controls 8 ns 101090009 +PASS wycheproof/rsa_signature_3072_sha256_test: cases 259 verifies 259 mismatches 0 controls 8 ns 222348673 +PASS wycheproof/rsa_signature_3072_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 247576579 +PASS wycheproof/rsa_signature_3072_sha512_test: cases 260 verifies 260 mismatches 0 controls 8 ns 239450070 +PASS wycheproof/rsa_signature_4096_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 390380926 +PASS wycheproof/rsa_signature_4096_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 409010525 +PASS wycheproof/rsa_signature_4096_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 390005424 +PASS wycheproof/rsa_signature_8192_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 1533767267 +PASS wycheproof/rsa_signature_8192_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1562265104 +PASS wycheproof/rsa_signature_8192_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1584891699 +PASS edge: cases 48 verifies 48 mismatches 0 controls 1 ns 3619327 +PASS pyca_gen: cases 324 verifies 324 mismatches 0 controls 324 ns 1176259438 +PASS fuzz: cases 864 verifies 864 mismatches 0 controls 0 ns 104480800 +NOT_RUN rsa_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha384_test.json tests=34 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha512_224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha512_256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha512_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_misc_test.json tests=395 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1536_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_3072_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_4096_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_params_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha256_mgf1sha1_20_test.json tests=108 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_224_mgf1_28_test.json tests=100 reason: hash SHA-512/224 mgf1 SHA-512/224: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_256_mgf1_32_test.json tests=115 reason: hash SHA-512/256 mgf1 SHA-512/256: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_2048_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_4096_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha224_test.json tests=258 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_224_test.json tests=258 reason: SHA3-224: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_256_test.json tests=257 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_384_test.json tests=258 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_512_test.json tests=258 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_224_test.json tests=258 reason: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_256_test.json tests=257 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_256_test.json tests=258 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_384_test.json tests=259 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_512_test.json tests=259 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_4096_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_three_primes_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_3072_sha224_mgf1sha224_test.json tests=38 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_4096_sha256_mgf1sha256_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +WYCHEPROOF valid=1556 invalid=3636 acceptable=58 (accepted 46: SmallModulus/SmallPublicKey; refused 12: MissingNull) +PASS mutant-expectation detected: 1 mismatches, cases 259 verifies 259 mismatches 1 controls 8 ns 99981777 +PASS mutant-mont-carry detected: 9 mismatches, cases 259 verifies 259 mismatches 9 controls 0 ns 130126329 +PASS mutant-digestinfo detected: 10 mismatches, cases 259 verifies 259 mismatches 10 controls 0 ns 133351929 +PASS mutant-mgf1-counter detected: 63 mismatches, cases 108 verifies 108 mismatches 63 controls 0 ns 41096610 +TIME rsa_signature_2048_sha256_test: 100 verifies, 40037365 ns total, 400373 ns per verify (nice 19) +TIME rsa_signature_4096_sha256_test: 100 verifies, 154989206 ns total, 1549892 ns per verify (nice 19) +TIME rsa_pss_2048_sha256_mgf1_32_test: 100 verifies, 40294391 ns total, 402943 ns per verify (nice 19) +TIME rsa_pss_4096_sha256_mgf1_32_test: 100 verifies, 156028015 ns total, 1560280 ns per verify (nice 19) +CONTROLS flipped-signature-byte controls=1927 (all refused) +RSA PASS vectors=6486 (wycheproof=5250) mutants=4/4 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/sha2.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/sha2.log new file mode 100644 index 000000000..7b303f901 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/sha2.log @@ -0,0 +1,25 @@ +omc sha256 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +sha2.om sha256 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om sha256 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +PASS nist-sha256-ShortMsg: 65 vectors, sha2 driver: 130 checks, 0 failed +PASS nist-sha256-LongMsg: 64 vectors, sha2 driver: 128 checks, 0 failed +PASS nist-sha256-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha384-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha384-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha384-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha512-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha512-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha512-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS rfc4231-hmac: 21 vectors, sha2 driver: 42 checks, 0 failed +PASS rfc5869-hkdf: 6 vectors, sha2 driver: 9 checks, 0 failed +PASS generated-long: 33 vectors, sha2 driver: 33 checks, 0 failed +PASS wycheproof-hmac: 522 vectors, sha2 driver: 720 checks, 0 failed +PASS wycheproof-hkdf: 252 vectors, sha2 driver: 495 checks, 0 failed +PASS mutant-sha256-k0: detected (130 failure lines; sha2 driver: 130 checks, 130 failed) +PASS mutant-sha512-k0: detected (258 failure lines; sha2 driver: 258 checks, 258 failed) +PASS mutant-hmac-ipad: detected (21 failure lines; sha2 driver: 42 checks, 21 failed) +PASS mutant-hkdf-ctr: detected (243 failure lines; sha2 driver: 495 checks, 243 failed) +PASS mutant-expect: detected (2 failure lines; sha2 driver: 130 checks, 2 failed) +PASS neg-malformed: detected (1 failure lines; sha2 driver: 1 checks, 1 failed) +PASS neg-tag-flip: detected (1 failure lines; sha2 driver: 42 checks, 1 failed) +SHA2 PASS vectors=1777 (wycheproof=774) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/tls.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/tls.log new file mode 100644 index 000000000..06c5a40d0 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/tls.log @@ -0,0 +1,40 @@ +omc 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +chacha.om 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +aesgcm.om b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 +rsa.om 07414c1104f73f3f0d815ce8a7af9e736233c633f4a2ea080e20307ea1919c11 +x509.om 193a8cd93638d85e4256d4d298ea00bb1c60d9e154efe81dd2f88827f093f8be +tls.om 72ca585b4e55413a8a67c7743f8e8c00fb50da334231739ec590864a12e68545 +PASS rfc8448: tls kat: 24 checks, 0 failed +PASS expectation mutant detected: 2 mismatches +PASS mutant label c hs traffic detected: 5 mismatches +PASS mutant nonce ignores seq detected: 1 mismatches +PASS mutant label length detected: 21 mismatches +PASS mutant finished key detected: 2 mismatches +PASS dns: dns unit: 23 checks, 0 failed +PASS mutant dns flags only QR detected: 4 mismatches +PASS mutant dns owner ignored detected: 6 mismatches +PASS mutant dns label cap gone detected: trap (exit 104) +PASS mutant dns_a4 name length unchecked detected: trap (exit 103) +PASS interop: INTEROP PASS rows=38 +PASS mutant chain result ignored detected: 8 rows fail +PASS mutant CertificateVerify ignored detected: 2 rows fail +PASS mutant CCS count not checked detected: 4 rows fail +PASS mutant close revives failed detected: 33 rows fail +PASS mutant read record cap gone detected: 2 rows fail +PASS mutant handshake record cap gone detected: 1 rows fail +PASS mutant handshake close_notify unmapped detected: 2 rows fail +PASS mutant version not checked detected: 4 rows fail +PASS mutant record MAC ignored detected: 1 rows fail +PASS mutant session id not checked detected: 1 rows fail +PARITY PASS https://api.github.com/licenses/mit status='HTTP/1.1 200 OK' bytes=1956/1956 sha256=15b2a5994e7c6e3d/15b2a5994e7c6e3d +PARITY PASS https://api.github.com/licenses/apache-2.0 status='HTTP/1.1 200 OK' bytes=12478/12478 sha256=c9fb7d13de08da3c/c9fb7d13de08da3c +PARITY PASS https://api.github.com/repos/torvalds/linux/license status='HTTP/1.1 200 OK' bytes=1528/1528 sha256=afc6dbc05fb592ec/afc6dbc05fb592ec +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/README status='HTTP/1.1 200 OK' bytes=727/727 sha256=bad58d396f62102b/bad58d396f62102b +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/MAINTAINERS status='HTTP/1.1 200 OK' bytes=680548/680548 sha256=2e65a67b1f2ecd4e/2e65a67b1f2ecd4e +PARITY PASS smtp://mail.gandi.net:465 exit=0 bytes=194/194 sha256=d5fbda7743efc6b0/d5fbda7743efc6b0 +PARITY PASS tsmtp://mail.gandi.net:587 exit=0 bytes=383/383 sha256=b618c769ed2c6b81/b618c769ed2c6b81 +TLS PASS vectors=24 (rfc8448) dns=23 interop=38 net=PASS mutants=19/19 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x25519.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x25519.log new file mode 100644 index 000000000..c6c2a43b4 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x25519.log @@ -0,0 +1,16 @@ +omc 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +driver 863448df5f4f1c76016be39a278d9bf5cd9136680f6a8c0daee60576d91d4ae2 +PASS rfc7748: cases 9 calls 13 mismatches 0 ns 176309040 +PASS wycheproof: cases 518 calls 518 mismatches 0 ns 116202826 +NOTE rfc7748-iter1m not run (opt-in: X25519_ITER1M=1) +PASS negative-control detected: 1 mismatches, cases 9 calls 13 mismatches 1 ns 200687658 +PASS mutant-expectation detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 90631283 +PASS mut-a24 detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 175737645 +PASS mut-step detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 202900253 +PASS mut-clamp detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 90933803 +PASS mut-zero detected: 518 mismatches, cases 518 calls 518 mismatches 518 ns 115503269 +PASS mut-canon detected: 34 mismatches, cases 518 calls 518 mismatches 34 ns 116374221 +TIME low-weight scalar (clamped weight 1): 400 calls, 71006872 ns, 177517 ns per call +TIME high-weight scalar (clamped weight 252): 400 calls, 70965015 ns, 177412 ns per call +X25519 PASS vectors=531 (wycheproof=518) mutants=7/7 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x509.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x509.log new file mode 100644 index 000000000..7dd3dfcf0 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/main-pin-189ada82/x509.log @@ -0,0 +1,40 @@ +omc sha256 189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54 +library sha256 193a8cd93638d85e4256d4d298ea00bb1c60d9e154efe81dd2f88827f093f8be (70 functions) +driver sha256 68ac1629bbb735399ad0a459e77d16463441e02aeffd717b6f74a6114c6acf3a +PASS cases.txt: x509 driver: 187 checks, 0 failed +PASS fuzz fuzz_rsa n=300 rejected=300 +PASS fuzz fuzz_ec n=300 rejected=300 +PASS fuzz fuzz_pss n=200 rejected=200 +openssl OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024) +DIFF wildcard_partial x509=reject openssl=accept +DIFF no_san x509=reject openssl=accept +DIFF name_constraints_critical x509=reject openssl=accept +DIFF depth_8_intermediates x509=reject openssl=accept +DIFF leaf_is_ca x509=reject openssl=accept +DIFF leaf_ku_no_digsig x509=reject openssl=accept +DIFF rsa_1024_leaf x509=reject openssl=accept +DIFF sha1_signed x509=reject openssl=accept +DIFF rsassa_pss_key x509=reject openssl=accept +DIFF ed25519_key x509=reject openssl=accept +DIFF leaf_too_big x509=reject openssl=accept +DIFF name_constraints_noncritical x509=reject openssl=accept +DIFF rsa_6144_leaf x509=reject openssl=accept +DIFF rsa_e_2_32_plus_1_leaf x509=reject openssl=accept +DIFF rsa_e_even_leaf x509=reject openssl=accept +DIFF rsa_e_1_leaf x509=reject openssl=accept +DIFF rsa_6144_intermediate x509=reject openssl=accept +DIFF rsa_e_2_32_plus_1_intermediate x509=reject openssl=accept +PASS mutant name-wildcard-labels detected (2 MISMATCH: wildcard_one_label_parent wild_one_label_parent ) +PASS mutant date-not-after detected (76 MISMATCH: rsa_good rsa_good_apex ) +PASS mutant date-at-not-after detected (1 MISMATCH: at_not_after ) +PASS mutant anchor-self-issued detected (1 MISMATCH: store_intermediate_anchor ) +PASS mutant bc-ca-flag detected (1 MISMATCH: intermediate_not_ca ) +PASS mutant unique-id-order detected (driver trapped, exit 104, after 3 MISMATCH) +PASS mutant name-constraints-noncritical detected (3 MISMATCH: name_constraints_critical name_constraints_noncritical ) +PASS mutant rsa-modulus-max detected (8 MISMATCH: rsa_6144_leaf rsa_e_2_32_plus_1_leaf ) +PASS mutant rsa-exponent detected (2 MISMATCH: rsa_e_even_leaf rsa_e_1_leaf ) +PASS mutant leaf-size detected (1 MISMATCH: leaf_too_big ) +PASS mutant elemcap detected (driver trapped, exit 104, after 0 MISMATCH) +PASS mutant expectation detected +driver checks=187 fuzz-mutations=800 +X509 PASS cases=91 (openssl-parity=73/91) mutants=12/12 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/aesgcm.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/aesgcm.log new file mode 100644 index 000000000..0871603c1 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/aesgcm.log @@ -0,0 +1,28 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +library functions 37 +PASS fips197: aesgcm driver: 4 checks, 0 failed +PASS wycheproof: aesgcm driver: 316 checks, 0 failed +PASS gcmEncryptExtIV128: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV192: aesgcm driver: 7875 checks, 0 failed +PASS gcmEncryptExtIV256: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt128: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt192: aesgcm driver: 7875 checks, 0 failed +PASS gcmDecrypt256: aesgcm driver: 7875 checks, 0 failed +nist: 47250 vectors (11908 decrypt vectors expect FAIL) +PASS params: aesgcm driver: 19 checks, 0 failed +PASS speed: aesgcm driver: 3 checks, 0 failed +aesgcm speed bytes=1048576 seal_ns=38532788 open_ns=30423231 seal_MBps=27 open_MBps=34 +aesgcm speed bytes=1048576 seal_ns=19704742 open_ns=19679509 seal_MBps=53 open_MBps=53 +aesgcm speed bytes=1048576 seal_ns=19681333 open_ns=19686230 seal_MBps=53 open_MBps=53 +PASS mutant-sbox: detected, exit 1, 233 MISMATCH (aesgcm driver: 320 checks, 233 failed) +PASS mutant-ghash: detected, exit 1, 226 MISMATCH (aesgcm driver: 320 checks, 226 failed) +PASS mutant-rcon: detected, exit 1, 81 MISMATCH (aesgcm driver: 320 checks, 81 failed) +PASS mutant-tagcheck: detected, exit 1, 310 MISMATCH (aesgcm driver: 320 checks, 310 failed) +PASS mutant-expect: detected, exit 1, 1 MISMATCH (aesgcm driver: 316 checks, 1 failed) +NOT_RUN wycheproof aes_gcm_siv_test.json: AES-GCM-SIV (RFC 8452) is not implemented +NOT_RUN wycheproof aria_gcm_test.json, seed_gcm_test.json, sm4_gcm_test.json: other block ciphers +NOT_RUN wycheproof c2sp_chunked_encryption_aes_{128,256}_gcm_test.json: chunked-encryption construction, not raw AES-GCM +wycheproof: 316 tests: valid 229 passed, invalid 87 refused, acceptable 0 +checks outside the vectors: params=19 speed=3 (both passed) +AESGCM PASS vectors=47570 (fips197=4, nist=47250, wycheproof=316) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/chacha.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/chacha.log new file mode 100644 index 000000000..f67400df3 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/chacha.log @@ -0,0 +1,20 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +driver sha256 1130187a2edc36c4b12fbafbe7295a61cbb184fe62891427fdcc0728737dba00 +PASS rfc8439: chacha driver: 36 checks, 0 failed +PASS wycheproof-regenerate: committed conversions equal a fresh conversion at d17cc89fa5c8f4f4d378b5385ebf75da5d0926c9 +PASS wycheproof-chacha20-poly1305: chacha driver: 325 checks, 0 failed +PASS wycheproof-chacha20-counter: chacha driver: 14 checks, 0 failed +NOTE wycheproof chacha20_poly1305_test.json: expected codes 0:256 1:60 2:9; NOT_RUN 0 (0 valid sealed+opened, 1 invalid tag refused, 2 invalid nonce size refused; no acceptable) +NOTE wycheproof chacha20_counter_test.json: expected codes 0:11 2:3; NOT_RUN 28 (NOT_RUN = XChaCha20 groups, not implemented) +PASS cryptography-diff(seed 1): chacha driver: 2709 checks, 0 failed +PASS tamper-refused: chacha driver: 3 checks, 0 failed +PASS tamper-claimed-valid: 3 of 3 tampered records rejected +PASS mutant-expectation: detected, exit 1, 1 MISMATCH (chacha driver: 36 checks, 1 failed) +PASS mutant-qr-rotation: detected, exit 1, 278 MISMATCH (chacha driver: 361 checks, 278 failed) +PASS mutant-poly-clamp: detected, exit 1, 133 MISMATCH (chacha driver: 361 checks, 133 failed) +PASS mutant-poly-fold: detected, exit 1, 267 MISMATCH (chacha driver: 361 checks, 267 failed) +PASS mutant-poly-final: detected, exit 1, 272 MISMATCH (chacha driver: 361 checks, 272 failed) +PASS bench-1MiB: 16 open+reseal rounds restored the plaintext; sealed sha256 314d4f2a5908e50854a934af2df4cee3f86baa891a64a68a384a58432b1e260b equals cryptography +THROUGHPUT bench-1MiB: 33 MiB through seal/open in 195200809 ns = 177.3 MB/s (whole process, incl. start-up and pattern checks) +CHACHA PASS vectors=3087 (wycheproof=339) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/ec.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/ec.log new file mode 100644 index 000000000..00d21416f --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/ec.log @@ -0,0 +1,92 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 functions 27 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +driver e0424968291256158695a6c339806ba158c475144ce13662e8ce8717607b7e66 +PASS cavp_sigver: cases 180 verifies 180 controls 108 mismatches 0 ns 497966202 codes 36 144 0 0 0 0 +PASS edge: cases 56 verifies 56 controls 12 mismatches 0 ns 26370382 codes 4 0 16 20 12 4 +PASS wycheproof_secp256r1_sha256: cases 484 verifies 484 controls 522 mismatches 0 ns 262771851 codes 174 23 221 0 66 0 +PASS wycheproof_secp256r1_sha256_p1363: cases 262 verifies 262 controls 519 mismatches 0 ns 262806634 codes 173 18 21 0 50 0 +PASS wycheproof_secp256r1_sha512: cases 554 verifies 554 controls 729 mismatches 0 ns 357329144 codes 243 25 220 0 66 0 +PASS wycheproof_secp256r1_sha512_p1363: cases 332 verifies 332 controls 726 mismatches 0 ns 343345966 codes 242 19 21 0 50 0 +PASS wycheproof_secp384r1_sha256: cases 472 verifies 472 controls 486 mismatches 0 ns 732528833 codes 162 24 220 0 66 0 +PASS wycheproof_secp384r1_sha384: cases 504 verifies 504 controls 582 mismatches 0 ns 872948271 codes 194 23 221 0 66 0 +PASS wycheproof_secp384r1_sha384_p1363: cases 280 verifies 280 controls 579 mismatches 0 ns 829943693 codes 193 18 19 0 50 0 +PASS wycheproof_secp384r1_sha512: cases 542 verifies 542 controls 693 mismatches 0 ns 1013958873 codes 231 23 221 0 67 0 +PASS wycheproof_secp384r1_sha512_p1363: cases 318 verifies 318 controls 690 mismatches 0 ns 980163019 codes 230 19 19 0 50 0 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP256r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP320r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP384r1_sha3_384_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_brainpoolP512r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp160r2_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp192r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_224_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp224r1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_bitcoin_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake128_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256k1_shake256_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp256r1_sha3_256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp256r1_shake128_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_384_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_sha3_512_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_p1363_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp384r1_shake256_test.json: hash not SHA-256/384/512 (om/tls/sha2.om) +NOT_RUN wycheproof ecdsa_secp521r1_sha3_512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_sha512_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_p1363_test.json: curve not P-256/P-384 +NOT_RUN wycheproof ecdsa_secp521r1_shake256_test.json: curve not P-256/P-384 +NOT_RUN cavp SigVer.rsp P-256/P-384 with SHA-1, SHA-224: hash not in om/tls/sha2.om +NOT_RUN cavp SigVer.rsp P-192, P-224, P-521, K-*, B-* sections: curve not P-256/P-384 +NOT_RUN cavp SigVer_TruncatedSHAs.rsp (SHA-512/224, SHA-512/256): hash not in om/tls/sha2.om +PASS mutant-expectation detected: 1 mismatches, cases 484 verifies 484 controls 519 mismatches 1 ns 268251909 codes 174 23 221 0 66 0 +PASS mutant-b256 detected: 696 mismatches, cases 484 verifies 484 controls 522 mismatches 696 ns 10736618 codes 0 0 0 484 0 0 +PASS mutant-padd detected: 194 mismatches, cases 504 verifies 504 controls 582 mismatches 194 ns 872094358 codes 0 217 221 0 66 0 +PASS mutant-n0 detected: 36 mismatches, cases 180 verifies 180 controls 108 mismatches 36 ns 473762523 codes 0 180 0 0 0 0 +PASS mutant-der detected: 2 mismatches, cases 56 verifies 56 controls 12 mismatches 2 ns 17032702 codes 6 0 14 20 12 4 +PASS mutant-digest-column detected: 1 mismatches, cases 504 verifies 504 controls 582 mismatches 1 ns 854205109 codes 194 23 221 0 66 0 +PASS fuzz: cases 3000 verifies 3000 controls 0 mismatches 0 ns 1525378854 codes 0 533 1290 1172 5 0 +TIME secp256r1_sha256: 200 verifies, 285225654 ns total, 1426128 ns per verify +TIME secp384r1_sha384: 200 verifies, 767543963 ns total, 3837719 ns per verify +EC PASS vectors=3984 (wycheproof=3748 cavp=180 edge=56) mutants=6/6 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/interop-table.txt b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/interop-table.txt new file mode 100644 index 000000000..986fba6b6 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/interop-table.txt @@ -0,0 +1,38 @@ +PASS | good EC chain, chacha | expect OK | got OK +PASS | good EC chain, aes128gcm | expect OK | got OK +PASS | good RSA leaf (rsa_pss) | expect OK | got OK +PASS | expired leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED | got TLSERR TLS_ERR_CERTIFICATE detail 2 X509_ERR_EXPIRED (exit 27) +PASS | not-yet-valid leaf | expect TLSERR TLS_ERR_CERTIFICATE detail 3 | got TLSERR TLS_ERR_CERTIFICATE detail 3 X509_ERR_NOT_YET_VALID (exit 27) +PASS | wrong name | expect TLSERR TLS_ERR_CERTIFICATE detail 4 | got TLSERR TLS_ERR_CERTIFICATE detail 4 X509_ERR_NAME_MISMATCH (exit 27) +PASS | self-signed leaf (CA:TRUE) | expect TLSERR TLS_ERR_CERTIFICATE detail 15 | got TLSERR TLS_ERR_CERTIFICATE detail 15 X509_ERR_LEAF_IS_CA (exit 27) +PASS | self-signed leaf (CA:FALSE) | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | bad cert signature | expect TLSERR TLS_ERR_CERTIFICATE detail 6 | got TLSERR TLS_ERR_CERTIFICATE detail 6 X509_ERR_BAD_SIGNATURE (exit 27) +PASS | unknown issuer | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | missing intermediate | expect TLSERR TLS_ERR_CERTIFICATE detail 5 | got TLSERR TLS_ERR_CERTIFICATE detail 5 X509_ERR_UNKNOWN_ISSUER (exit 27) +PASS | TLS 1.2 only server | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 70 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 70 (exit 31) +PASS | AES-256 suite only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | P-256 group only | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 40 | got TLSERR TLS_ERR_ALERT_RECEIVED detail 40 (exit 31) +PASS | fake ServerHello: tls12 | expect TLSERR TLS_ERR_PROTOCOL_VERSION | got TLSERR TLS_ERR_PROTOCOL_VERSION detail 0 (exit 19) +PASS | fake ServerHello: hrr | expect TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED | got TLSERR TLS_ERR_HELLO_RETRY_UNSUPPORTED detail 0 (exit 23) +PASS | fake ServerHello: suite | expect TLSERR TLS_ERR_CIPHER_SUITE | got TLSERR TLS_ERR_CIPHER_SUITE detail 0 (exit 20) +PASS | fake ServerHello: sid | expect TLSERR TLS_ERR_SESSION_ID_ECHO | got TLSERR TLS_ERR_SESSION_ID_ECHO detail 0 (exit 24) +PASS | fake ServerHello: group | expect TLSERR TLS_ERR_KEY_SHARE | got TLSERR TLS_ERR_KEY_SHARE detail 0 (exit 21) +PASS | fake ServerHello: zero | expect TLSERR TLS_ERR_ZERO_SHARED_SECRET | got TLSERR TLS_ERR_ZERO_SHARED_SECRET detail 0 (exit 25) +PASS | fake ServerHello: dupext | expect TLSERR TLS_ERR_EXTENSION | got TLSERR TLS_ERR_EXTENSION detail 0 (exit 22) +PASS | fake ServerHello: trail | expect TLSERR TLS_ERR_DECODE | got TLSERR TLS_ERR_DECODE detail 0 (exit 18) +PASS | fakesrv: ok | expect OK | got OK +PASS | fakesrv: empty50 | expect OK | got OK +PASS | fakesrv: ccs2 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccsflood | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccspre | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: ccslate | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: encccs | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: frag | expect TLSERR TLS_ERR_MESSAGE_TOO_BIG detail 0 (exit 32) | got TLSERR TLS_ERR_MESSAGE_TOO_BIG detail 0 (exit 32) +PASS | fakesrv: cvbad | expect TLSERR TLS_ERR_CERTIFICATE_VERIFY | got TLSERR TLS_ERR_CERTIFICATE_VERIFY detail 6 X509_ERR_BAD_SIGNATURE (exit 29) +PASS | fakesrv: cvkey | expect TLSERR TLS_ERR_CERTIFICATE_VERIFY | got TLSERR TLS_ERR_CERTIFICATE_VERIFY detail 6 X509_ERR_BAD_SIGNATURE (exit 29) +PASS | fakesrv: empty1500 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: tickets1500 | expect TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) | got TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17) +PASS | fakesrv: closehs | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) | got TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) +PASS | fakesrv: closepre | expect TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) | got TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31) +PASS | tampered record (proxy) | expect TLSERR TLS_ERR_BAD_RECORD_MAC | got TLSERR TLS_ERR_BAD_RECORD_MAC detail 0 (exit 16) +INTEROP PASS rows=37 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/rsa.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/rsa.log new file mode 100644 index 000000000..6b141c215 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/rsa.log @@ -0,0 +1,139 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +rsa.om 07414c1104f73f3f0d815ce8a7af9e736233c633f4a2ea080e20307ea1919c11 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +functions rsa.om 32 +driver 46ca78f0fcb5429cf80151dc71bce48fb58c02e028d7b6e3cdd2963b309eac63 +PASS wycheproof/rsa_pkcs1_1024_sig_gen_test: cases 17 verifies 17 mismatches 0 controls 17 ns 3988689 +PASS wycheproof/rsa_pkcs1_1536_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 5435485 +PASS wycheproof/rsa_pkcs1_2048_sig_gen_test: cases 27 verifies 27 mismatches 0 controls 27 ns 23694249 +PASS wycheproof/rsa_pkcs1_3072_sig_gen_test: cases 26 verifies 26 mismatches 0 controls 26 ns 31090874 +PASS wycheproof/rsa_pkcs1_4096_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 53488674 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_params_test: cases 103 verifies 103 mismatches 0 controls 61 ns 39062909 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_test: cases 103 verifies 103 mismatches 0 controls 61 ns 55002442 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 49406871 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 60033768 +PASS wycheproof/rsa_pss_2048_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 72011942 +PASS wycheproof/rsa_pss_2048_sha512_mgf1sha256_32_params_test: cases 178 verifies 178 mismatches 0 controls 132 ns 69347671 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 90319245 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 102401681 +PASS wycheproof/rsa_pss_4096_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 178433650 +PASS wycheproof/rsa_pss_4096_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 229789232 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_params_test: cases 177 verifies 177 mismatches 0 controls 132 ns 281768330 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_test: cases 177 verifies 177 mismatches 0 controls 132 ns 265669696 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_params_test: cases 179 verifies 179 mismatches 0 controls 132 ns 287865808 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_test: cases 179 verifies 179 mismatches 0 controls 132 ns 288134867 +PASS wycheproof/rsa_pss_misc_params_test: cases 54 verifies 54 mismatches 0 controls 54 ns 21743719 +PASS wycheproof/rsa_pss_misc_test: cases 54 verifies 54 mismatches 0 controls 54 ns 21761142 +PASS wycheproof/rsa_signature_2048_sha256_test: cases 259 verifies 259 mismatches 0 controls 9 ns 99736535 +PASS wycheproof/rsa_signature_2048_sha384_test: cases 258 verifies 258 mismatches 0 controls 7 ns 127825544 +PASS wycheproof/rsa_signature_2048_sha512_test: cases 259 verifies 259 mismatches 0 controls 8 ns 129381629 +PASS wycheproof/rsa_signature_3072_sha256_test: cases 259 verifies 259 mismatches 0 controls 8 ns 244487966 +PASS wycheproof/rsa_signature_3072_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 249852116 +PASS wycheproof/rsa_signature_3072_sha512_test: cases 260 verifies 260 mismatches 0 controls 8 ns 223655243 +PASS wycheproof/rsa_signature_4096_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 387240722 +PASS wycheproof/rsa_signature_4096_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 409458540 +PASS wycheproof/rsa_signature_4096_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 391504416 +PASS wycheproof/rsa_signature_8192_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 1551655291 +PASS wycheproof/rsa_signature_8192_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1567093093 +PASS wycheproof/rsa_signature_8192_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1555646948 +PASS edge: cases 48 verifies 48 mismatches 0 controls 1 ns 3621166 +PASS pyca_gen: cases 324 verifies 324 mismatches 0 controls 324 ns 1179266022 +PASS fuzz: cases 864 verifies 864 mismatches 0 controls 0 ns 75690126 +NOT_RUN rsa_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha384_test.json tests=34 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha512_224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha512_256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha512_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_misc_test.json tests=395 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1536_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_3072_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_4096_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_params_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha256_mgf1sha1_20_test.json tests=108 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_224_mgf1_28_test.json tests=100 reason: hash SHA-512/224 mgf1 SHA-512/224: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_256_mgf1_32_test.json tests=115 reason: hash SHA-512/256 mgf1 SHA-512/256: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_2048_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_4096_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha224_test.json tests=258 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_224_test.json tests=258 reason: SHA3-224: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_256_test.json tests=257 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_384_test.json tests=258 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_512_test.json tests=258 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_224_test.json tests=258 reason: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_256_test.json tests=257 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_256_test.json tests=258 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_384_test.json tests=259 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_512_test.json tests=259 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_4096_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_three_primes_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_3072_sha224_mgf1sha224_test.json tests=38 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_4096_sha256_mgf1sha256_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +WYCHEPROOF valid=1556 invalid=3636 acceptable=58 (accepted 46: SmallModulus/SmallPublicKey; refused 12: MissingNull) +PASS mutant-expectation detected: 1 mismatches, cases 259 verifies 259 mismatches 1 controls 8 ns 126659721 +PASS mutant-mont-carry detected: 9 mismatches, cases 259 verifies 259 mismatches 9 controls 0 ns 129549625 +PASS mutant-digestinfo detected: 10 mismatches, cases 259 verifies 259 mismatches 10 controls 0 ns 99852363 +PASS mutant-mgf1-counter detected: 63 mismatches, cases 108 verifies 108 mismatches 63 controls 0 ns 71220463 +TIME rsa_signature_2048_sha256_test: 100 verifies, 39662847 ns total, 396628 ns per verify (nice 19) +TIME rsa_signature_4096_sha256_test: 100 verifies, 153638178 ns total, 1536381 ns per verify (nice 19) +TIME rsa_pss_2048_sha256_mgf1_32_test: 100 verifies, 48270665 ns total, 482706 ns per verify (nice 19) +TIME rsa_pss_4096_sha256_mgf1_32_test: 100 verifies, 155259521 ns total, 1552595 ns per verify (nice 19) +CONTROLS flipped-signature-byte controls=1927 (all refused) +RSA PASS vectors=6486 (wycheproof=5250) mutants=4/4 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/sha2.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/sha2.log new file mode 100644 index 000000000..224818cdd --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/sha2.log @@ -0,0 +1,25 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +sha2.om sha256 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om sha256 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +PASS nist-sha256-ShortMsg: 65 vectors, sha2 driver: 130 checks, 0 failed +PASS nist-sha256-LongMsg: 64 vectors, sha2 driver: 128 checks, 0 failed +PASS nist-sha256-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha384-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha384-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha384-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha512-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha512-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha512-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS rfc4231-hmac: 21 vectors, sha2 driver: 42 checks, 0 failed +PASS rfc5869-hkdf: 6 vectors, sha2 driver: 9 checks, 0 failed +PASS generated-long: 33 vectors, sha2 driver: 33 checks, 0 failed +PASS wycheproof-hmac: 522 vectors, sha2 driver: 720 checks, 0 failed +PASS wycheproof-hkdf: 252 vectors, sha2 driver: 495 checks, 0 failed +PASS mutant-sha256-k0: detected (130 failure lines; sha2 driver: 130 checks, 130 failed) +PASS mutant-sha512-k0: detected (258 failure lines; sha2 driver: 258 checks, 258 failed) +PASS mutant-hmac-ipad: detected (21 failure lines; sha2 driver: 42 checks, 21 failed) +PASS mutant-hkdf-ctr: detected (243 failure lines; sha2 driver: 495 checks, 243 failed) +PASS mutant-expect: detected (2 failure lines; sha2 driver: 130 checks, 2 failed) +PASS neg-malformed: detected (1 failure lines; sha2 driver: 1 checks, 1 failed) +PASS neg-tag-flip: detected (1 failure lines; sha2 driver: 42 checks, 1 failed) +SHA2 PASS vectors=1777 (wycheproof=774) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/tls.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/tls.log new file mode 100644 index 000000000..ff4dbff22 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/tls.log @@ -0,0 +1,39 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +chacha.om 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +aesgcm.om b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 +rsa.om 07414c1104f73f3f0d815ce8a7af9e736233c633f4a2ea080e20307ea1919c11 +x509.om 74faef7d459134c02ecea6c070eb4230b752b430225d939b51ba74fbeaf0bf28 +tls.om 20dcede61db68979c767af172ee3616cb2f089f92cd218ec43e6c545344ef6f0 +PASS rfc8448: tls kat: 24 checks, 0 failed +PASS expectation mutant detected: 2 mismatches +PASS mutant label c hs traffic detected: 5 mismatches +PASS mutant nonce ignores seq detected: 1 mismatches +PASS mutant label length detected: 21 mismatches +PASS mutant finished key detected: 2 mismatches +PASS dns: dns unit: 21 checks, 0 failed +PASS mutant dns flags only QR detected: 4 mismatches +PASS mutant dns owner ignored detected: 6 mismatches +PASS mutant dns label cap gone detected: trap (exit 104) +PASS interop: INTEROP PASS rows=37 +PASS mutant chain result ignored detected: 8 rows fail +PASS mutant CertificateVerify ignored detected: 2 rows fail +PASS mutant CCS count not checked detected: 4 rows fail +PASS mutant close revives failed detected: 32 rows fail +PASS mutant read record cap gone detected: 2 rows fail +PASS mutant handshake record cap gone detected: 1 rows fail +PASS mutant handshake close_notify unmapped detected: 2 rows fail +PASS mutant version not checked detected: 1 rows fail +PASS mutant record MAC ignored detected: 1 rows fail +PASS mutant session id not checked detected: 1 rows fail +PARITY PASS https://api.github.com/licenses/mit status='HTTP/1.1 200 OK' bytes=1956/1956 sha256=15b2a5994e7c6e3d/15b2a5994e7c6e3d +PARITY PASS https://api.github.com/licenses/apache-2.0 status='HTTP/1.1 200 OK' bytes=12478/12478 sha256=c9fb7d13de08da3c/c9fb7d13de08da3c +PARITY PASS https://api.github.com/repos/torvalds/linux/license status='HTTP/1.1 200 OK' bytes=1528/1528 sha256=afc6dbc05fb592ec/afc6dbc05fb592ec +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/README status='HTTP/1.1 200 OK' bytes=727/727 sha256=bad58d396f62102b/bad58d396f62102b +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/MAINTAINERS status='HTTP/1.1 200 OK' bytes=680548/680548 sha256=2e65a67b1f2ecd4e/2e65a67b1f2ecd4e +PARITY PASS smtp://mail.gandi.net:465 exit=0 bytes=194/194 sha256=d5fbda7743efc6b0/d5fbda7743efc6b0 +PARITY PASS tsmtp://mail.gandi.net:587 exit=0 bytes=383/383 sha256=b618c769ed2c6b81/b618c769ed2c6b81 +TLS PASS vectors=24 (rfc8448) dns=21 interop=37 net=PASS mutants=18/18 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x25519.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x25519.log new file mode 100644 index 000000000..bfe89d321 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x25519.log @@ -0,0 +1,16 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +driver 863448df5f4f1c76016be39a278d9bf5cd9136680f6a8c0daee60576d91d4ae2 +PASS rfc7748: cases 9 calls 13 mismatches 0 ns 179977865 +PASS wycheproof: cases 518 calls 518 mismatches 0 ns 90394504 +NOTE rfc7748-iter1m not run (opt-in: X25519_ITER1M=1) +PASS negative-control detected: 1 mismatches, cases 9 calls 13 mismatches 1 ns 190838084 +PASS mutant-expectation detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 90490523 +PASS mut-a24 detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 176293946 +PASS mut-step detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 178534316 +PASS mut-clamp detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 90607196 +PASS mut-zero detected: 518 mismatches, cases 518 calls 518 mismatches 518 ns 115073947 +PASS mut-canon detected: 34 mismatches, cases 518 calls 518 mismatches 34 ns 102675600 +TIME low-weight scalar (clamped weight 1): 400 calls, 71011301 ns, 177528 ns per call +TIME high-weight scalar (clamped weight 252): 400 calls, 70998485 ns, 177496 ns per call +X25519 PASS vectors=531 (wycheproof=518) mutants=7/7 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x509.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x509.log new file mode 100644 index 000000000..d5be839d9 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/review-fix/x509.log @@ -0,0 +1,40 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 74faef7d459134c02ecea6c070eb4230b752b430225d939b51ba74fbeaf0bf28 (68 functions) +driver sha256 9d401e547a08a01591845cbe45bd26f8ff63e0c05af2bd7fe92055be8036c576 +PASS cases.txt: x509 driver: 186 checks, 0 failed +PASS fuzz fuzz_rsa n=300 rejected=300 +PASS fuzz fuzz_ec n=300 rejected=300 +PASS fuzz fuzz_pss n=200 rejected=200 +openssl OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024) +DIFF store_intermediate_anchor x509=accept openssl=reject error 2 at 1 depth lookup: unable to get issuer certificate +DIFF at_not_after x509=accept openssl=reject error 10 at 0 depth lookup: certificate has expired +DIFF wildcard_partial x509=reject openssl=accept +DIFF no_san x509=reject openssl=accept +DIFF name_constraints_critical x509=reject openssl=accept +DIFF depth_8_intermediates x509=reject openssl=accept +DIFF leaf_is_ca x509=reject openssl=accept +DIFF leaf_ku_no_digsig x509=reject openssl=accept +DIFF rsa_1024_leaf x509=reject openssl=accept +DIFF sha1_signed x509=reject openssl=accept +DIFF rsassa_pss_key x509=reject openssl=accept +DIFF ed25519_key x509=reject openssl=accept +DIFF leaf_too_big x509=reject openssl=accept +DIFF name_constraints_noncritical x509=reject openssl=accept +DIFF rsa_6144_leaf x509=reject openssl=accept +DIFF rsa_e_2_32_plus_1_leaf x509=reject openssl=accept +DIFF rsa_e_even_leaf x509=reject openssl=accept +DIFF rsa_e_1_leaf x509=reject openssl=accept +DIFF rsa_6144_intermediate x509=reject openssl=accept +DIFF rsa_e_2_32_plus_1_intermediate x509=reject openssl=accept +PASS mutant name-wildcard-labels detected (2 MISMATCH: wildcard_one_label_parent wild_one_label_parent ) +PASS mutant date-not-after detected (76 MISMATCH: rsa_good rsa_good_apex ) +PASS mutant bc-ca-flag detected (1 MISMATCH: intermediate_not_ca ) +PASS mutant unique-id-order detected (driver trapped, exit 104, after 3 MISMATCH) +PASS mutant name-constraints-noncritical detected (3 MISMATCH: name_constraints_critical name_constraints_noncritical ) +PASS mutant rsa-modulus-max detected (8 MISMATCH: rsa_6144_leaf rsa_e_2_32_plus_1_leaf ) +PASS mutant rsa-exponent detected (2 MISMATCH: rsa_e_even_leaf rsa_e_1_leaf ) +PASS mutant leaf-size detected (1 MISMATCH: leaf_too_big ) +PASS mutant elemcap detected (driver trapped, exit 104, after 0 MISMATCH) +PASS mutant expectation detected +driver checks=186 fuzz-mutations=800 +X509 PASS cases=90 (openssl-parity=70/90) mutants=10/10 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/rsa.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/rsa.log new file mode 100644 index 000000000..f82ec000d --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/rsa.log @@ -0,0 +1,139 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +rsa.om a0e6d53ef3aaac082cbada87ace2efcee4aa7fca199403480eed1f48792d57c9 +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +functions rsa.om 32 +driver 46ca78f0fcb5429cf80151dc71bce48fb58c02e028d7b6e3cdd2963b309eac63 +PASS wycheproof/rsa_pkcs1_1024_sig_gen_test: cases 17 verifies 17 mismatches 0 controls 17 ns 1765250 +PASS wycheproof/rsa_pkcs1_1536_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 12286104 +PASS wycheproof/rsa_pkcs1_2048_sig_gen_test: cases 27 verifies 27 mismatches 0 controls 27 ns 23864296 +PASS wycheproof/rsa_pkcs1_3072_sig_gen_test: cases 26 verifies 26 mismatches 0 controls 26 ns 22744092 +PASS wycheproof/rsa_pkcs1_4096_sig_gen_test: cases 24 verifies 24 mismatches 0 controls 24 ns 37131002 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_params_test: cases 103 verifies 103 mismatches 0 controls 61 ns 56987868 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_0_test: cases 103 verifies 103 mismatches 0 controls 61 ns 57759714 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 58792396 +PASS wycheproof/rsa_pss_2048_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 41454358 +PASS wycheproof/rsa_pss_2048_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 72102557 +PASS wycheproof/rsa_pss_2048_sha512_mgf1sha256_32_params_test: cases 178 verifies 178 mismatches 0 controls 132 ns 70070173 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_params_test: cases 108 verifies 108 mismatches 0 controls 63 ns 91501616 +PASS wycheproof/rsa_pss_3072_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 108637345 +PASS wycheproof/rsa_pss_4096_sha256_mgf1_32_test: cases 108 verifies 108 mismatches 0 controls 63 ns 160493148 +PASS wycheproof/rsa_pss_4096_sha384_mgf1_48_test: cases 141 verifies 141 mismatches 0 controls 95 ns 213213102 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_params_test: cases 177 verifies 177 mismatches 0 controls 132 ns 293392533 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_32_test: cases 177 verifies 177 mismatches 0 controls 132 ns 281782494 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_params_test: cases 179 verifies 179 mismatches 0 controls 132 ns 294832290 +PASS wycheproof/rsa_pss_4096_sha512_mgf1_64_test: cases 179 verifies 179 mismatches 0 controls 132 ns 272763787 +PASS wycheproof/rsa_pss_misc_params_test: cases 54 verifies 54 mismatches 0 controls 54 ns 22328937 +PASS wycheproof/rsa_pss_misc_test: cases 54 verifies 54 mismatches 0 controls 54 ns 21873189 +PASS wycheproof/rsa_signature_2048_sha256_test: cases 259 verifies 259 mismatches 0 controls 9 ns 137111376 +PASS wycheproof/rsa_signature_2048_sha384_test: cases 258 verifies 258 mismatches 0 controls 7 ns 131080475 +PASS wycheproof/rsa_signature_2048_sha512_test: cases 259 verifies 259 mismatches 0 controls 8 ns 129707118 +PASS wycheproof/rsa_signature_3072_sha256_test: cases 259 verifies 259 mismatches 0 controls 8 ns 234007126 +PASS wycheproof/rsa_signature_3072_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 225637917 +PASS wycheproof/rsa_signature_3072_sha512_test: cases 260 verifies 260 mismatches 0 controls 8 ns 253629816 +PASS wycheproof/rsa_signature_4096_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 407754884 +PASS wycheproof/rsa_signature_4096_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 418870482 +PASS wycheproof/rsa_signature_4096_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 425086811 +PASS wycheproof/rsa_signature_8192_sha256_test: cases 258 verifies 258 mismatches 0 controls 7 ns 1594226972 +PASS wycheproof/rsa_signature_8192_sha384_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1596350302 +PASS wycheproof/rsa_signature_8192_sha512_test: cases 259 verifies 259 mismatches 0 controls 7 ns 1607324789 +PASS edge: cases 48 verifies 48 mismatches 0 controls 1 ns 8282161 +PASS pyca_gen: cases 324 verifies 324 mismatches 0 controls 324 ns 1188536475 +PASS fuzz: cases 864 verifies 864 mismatches 0 controls 0 ns 106779407 +NOT_RUN rsa_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha224_mgf1sha224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha384_mgf1sha384_test.json tests=34 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_224_mgf1sha512_224_test.json tests=35 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_2048_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_256_mgf1sha512_256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_3072_sha512_mgf1sha512_test.json tests=33 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha1_test.json tests=32 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha256_mgf1sha256_test.json tests=37 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha1_test.json tests=31 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_4096_sha512_mgf1sha512_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_oaep_misc_test.json tests=395 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1024_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_1536_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_sig_gen_test.json tests=8 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pkcs1_2048_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_3072_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pkcs1_4096_test.json tests=67 reason: RSAES-PKCS1-v1_5 encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_params_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha1_mgf1_20_test.json tests=88 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha256_mgf1sha1_20_test.json tests=108 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_224_mgf1_28_test.json tests=100 reason: hash SHA-512/224 mgf1 SHA-512/224: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_sha512_256_mgf1_32_test.json tests=115 reason: hash SHA-512/256 mgf1 SHA-512/256: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_2048_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_2048_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake128_test.json tests=114 reason: hash SHAKE128 mgf SHAKE128: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_3072_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_4096_shake256_test.json tests=184 reason: hash SHAKE256 mgf SHAKE256: SHAKE (RFC 8702 PSS) not in scope (SHA-256/384/512 with MGF1 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_params_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-224: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-256: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-384: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-1 mgf1 SHA-512: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-1: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-256: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-384: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-224 mgf1 SHA-512: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-256 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-384 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-1: SHA-1: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_pss_misc_test.json tests=6 reason: hash SHA-512 mgf1 SHA-224: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha224_test.json tests=258 reason: SHA-224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_224_test.json tests=258 reason: SHA3-224: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_256_test.json tests=257 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_384_test.json tests=258 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha3_512_test.json tests=258 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_224_test.json tests=258 reason: SHA-512/224: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_2048_sha512_256_test.json tests=257 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_256_test.json tests=258 reason: SHA3-256: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_384_test.json tests=259 reason: SHA3-384: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha3_512_test.json tests=259 reason: SHA3-512: SHA-3 not in scope (sha2.om provides SHA-256/384/512 only) +NOT_RUN rsa_signature_3072_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_signature_4096_sha512_256_test.json tests=258 reason: SHA-512/256: hash not in scope (SHA-256/384/512 only) +NOT_RUN rsa_three_primes_oaep_2048_sha1_mgf1sha1_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_3072_sha224_mgf1sha224_test.json tests=38 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +NOT_RUN rsa_three_primes_oaep_4096_sha256_mgf1sha256_test.json tests=36 reason: RSAES-OAEP encryption/decryption suite: not in scope (signature verification only) +WYCHEPROOF valid=1556 invalid=3636 acceptable=58 (accepted 46: SmallModulus/SmallPublicKey; refused 12: MissingNull) +PASS mutant-expectation detected: 1 mismatches, cases 259 verifies 259 mismatches 1 controls 8 ns 130762907 +PASS mutant-mont-carry detected: 9 mismatches, cases 259 verifies 259 mismatches 9 controls 0 ns 129746524 +PASS mutant-digestinfo detected: 10 mismatches, cases 259 verifies 259 mismatches 10 controls 0 ns 102302841 +PASS mutant-mgf1-counter detected: 63 mismatches, cases 108 verifies 108 mismatches 63 controls 0 ns 41005765 +TIME rsa_signature_2048_sha256_test: 100 verifies, 40019110 ns total, 400191 ns per verify (nice 19) +TIME rsa_signature_4096_sha256_test: 100 verifies, 191659320 ns total, 1916593 ns per verify (nice 19) +TIME rsa_pss_2048_sha256_mgf1_32_test: 100 verifies, 40987919 ns total, 409879 ns per verify (nice 19) +TIME rsa_pss_4096_sha256_mgf1_32_test: 100 verifies, 157838815 ns total, 1578388 ns per verify (nice 19) +CONTROLS flipped-signature-byte controls=1927 (all refused) +RSA PASS vectors=6486 (wycheproof=5250) mutants=4/4 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/sha2.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/sha2.log new file mode 100644 index 000000000..224818cdd --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/sha2.log @@ -0,0 +1,25 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +sha2.om sha256 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om sha256 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +PASS nist-sha256-ShortMsg: 65 vectors, sha2 driver: 130 checks, 0 failed +PASS nist-sha256-LongMsg: 64 vectors, sha2 driver: 128 checks, 0 failed +PASS nist-sha256-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha384-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha384-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha384-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS nist-sha512-ShortMsg: 129 vectors, sha2 driver: 258 checks, 0 failed +PASS nist-sha512-LongMsg: 128 vectors, sha2 driver: 256 checks, 0 failed +PASS nist-sha512-Monte: 100 vectors, sha2 driver: 100 checks, 0 failed +PASS rfc4231-hmac: 21 vectors, sha2 driver: 42 checks, 0 failed +PASS rfc5869-hkdf: 6 vectors, sha2 driver: 9 checks, 0 failed +PASS generated-long: 33 vectors, sha2 driver: 33 checks, 0 failed +PASS wycheproof-hmac: 522 vectors, sha2 driver: 720 checks, 0 failed +PASS wycheproof-hkdf: 252 vectors, sha2 driver: 495 checks, 0 failed +PASS mutant-sha256-k0: detected (130 failure lines; sha2 driver: 130 checks, 130 failed) +PASS mutant-sha512-k0: detected (258 failure lines; sha2 driver: 258 checks, 258 failed) +PASS mutant-hmac-ipad: detected (21 failure lines; sha2 driver: 42 checks, 21 failed) +PASS mutant-hkdf-ctr: detected (243 failure lines; sha2 driver: 495 checks, 243 failed) +PASS mutant-expect: detected (2 failure lines; sha2 driver: 130 checks, 2 failed) +PASS neg-malformed: detected (1 failure lines; sha2 driver: 1 checks, 1 failed) +PASS neg-tag-flip: detected (1 failure lines; sha2 driver: 42 checks, 1 failed) +SHA2 PASS vectors=1777 (wycheproof=774) mutants=5/5 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/tls-run-20261026T1706Z.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/tls-run-20261026T1706Z.log new file mode 100644 index 000000000..782e75fa6 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/tls-run-20261026T1706Z.log @@ -0,0 +1,29 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +sha2.om 5cf0f98116def6917d3a373f2bd4c3932d46e3ff84d9567bbae9e720366fdb33 +hkdf.om 5c3ce5f67627f89ce42961c3076c556d16a2eb6c72d704ff68e13b2819333778 +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +chacha.om 8431257bc8e83474983c572cfdfa7f8f4b62a1b867748868e88fbc9c1b37d3af +aesgcm.om b19d8ce88fc65eb0e69e51f52f3af70b9c46c4bfbbc84004d43e536bf4ced17f +ec.om 909f37c797e187bd0663bde9f57c75d6ce41eb2c9726a6b50d6fc714e424c060 +rsa.om a0e6d53ef3aaac082cbada87ace2efcee4aa7fca199403480eed1f48792d57c9 +x509.om 64aa4ce05f2ff89b9bc608ae9c0431eb64aad7f1f929ebf5804f65b3fb608fdd +tls.om bca405ca0381d8a122b2089f36ead5d6c3fad7df967f50775261f236b7f70ae9 +PASS rfc8448: tls kat: 24 checks, 0 failed +PASS expectation mutant detected: 2 mismatches +PASS mutant label c hs traffic detected: 5 mismatches +PASS mutant nonce ignores seq detected: 1 mismatches +PASS mutant label length detected: 21 mismatches +PASS mutant finished key detected: 2 mismatches +PASS interop: INTEROP PASS rows=23 +PASS mutant chain result ignored detected: 8 rows fail +PASS mutant version not checked detected: 1 rows fail +PASS mutant record MAC ignored detected: 1 rows fail +PASS mutant session id not checked detected: 1 rows fail +PARITY PASS https://api.github.com/licenses/mit status='HTTP/1.1 200 OK' bytes=1956/1956 sha256=15b2a5994e7c6e3d/15b2a5994e7c6e3d +PARITY PASS https://api.github.com/repos/torvalds/linux/license status='HTTP/1.1 200 OK' bytes=1528/1528 sha256=afc6dbc05fb592ec/afc6dbc05fb592ec +PARITY PASS https://api.github.com/octocat status='HTTP/1.1 200 OK' bytes=901/901 sha256=0985c5b7885c921c/0985c5b7885c921c +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/README status='HTTP/1.1 200 OK' bytes=727/727 sha256=bad58d396f62102b/bad58d396f62102b +PARITY PASS https://raw.githubusercontent.com/torvalds/linux/v6.0/MAINTAINERS status='HTTP/1.1 200 OK' bytes=680548/680548 sha256=2e65a67b1f2ecd4e/2e65a67b1f2ecd4e +PARITY PASS smtp://mail.gandi.net:465 exit=0 bytes=194/194 sha256=d5fbda7743efc6b0/d5fbda7743efc6b0 +PARITY PASS tsmtp://mail.gandi.net:587 exit=0 bytes=383/383 sha256=b618c769ed2c6b81/b618c769ed2c6b81 +TLS PASS vectors=24 (rfc8448) interop=23 net=PASS mutants=9/9 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/x25519.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/x25519.log new file mode 100644 index 000000000..f578b7acf --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/x25519.log @@ -0,0 +1,16 @@ +omc befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +x25519.om c2a3a01d6cffff95cbaa130a586ca8f7365fb56c67ec1b2f4920eceebfed23f5 +driver 863448df5f4f1c76016be39a278d9bf5cd9136680f6a8c0daee60576d91d4ae2 +PASS rfc7748: cases 9 calls 13 mismatches 0 ns 210986698 +PASS wycheproof: cases 518 calls 518 mismatches 0 ns 130545225 +NOTE rfc7748-iter1m not run (opt-in: X25519_ITER1M=1) +PASS negative-control detected: 1 mismatches, cases 9 calls 13 mismatches 1 ns 189185989 +PASS mutant-expectation detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 115584470 +PASS mut-a24 detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 180558320 +PASS mut-step detected: 8 mismatches, cases 9 calls 13 mismatches 8 ns 188826513 +PASS mut-clamp detected: 1 mismatches, cases 518 calls 518 mismatches 1 ns 119568685 +PASS mut-zero detected: 518 mismatches, cases 518 calls 518 mismatches 518 ns 121244928 +PASS mut-canon detected: 34 mismatches, cases 518 calls 518 mismatches 34 ns 97247030 +TIME low-weight scalar (clamped weight 1): 400 calls, 77025662 ns, 192564 ns per call +TIME high-weight scalar (clamped weight 252): 400 calls, 77475476 ns, 193688 ns per call +X25519 PASS vectors=531 (wycheproof=518) mutants=7/7 diff --git a/evidence/om-tls-review-2026-10-26/handoff-evidence/x509.log b/evidence/om-tls-review-2026-10-26/handoff-evidence/x509.log new file mode 100644 index 000000000..6f321828d --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/handoff-evidence/x509.log @@ -0,0 +1,26 @@ +omc sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d +library sha256 64aa4ce05f2ff89b9bc608ae9c0431eb64aad7f1f929ebf5804f65b3fb608fdd (65 functions) +driver sha256 044beb49c47ec12631a3aa6bb4e057ecf7e293fc3a97576cd9cf9718cf44e37e +PASS cases.txt: x509 driver: 159 checks, 0 failed +PASS fuzz fuzz_rsa n=300 rejected=300 +PASS fuzz fuzz_ec n=300 rejected=300 +PASS fuzz fuzz_pss n=200 rejected=200 +openssl OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024) +DIFF store_intermediate_anchor x509=accept openssl=reject error 2 at 1 depth lookup: unable to get issuer certificate +DIFF at_not_after x509=accept openssl=reject error 10 at 0 depth lookup: certificate has expired +DIFF wildcard_partial x509=reject openssl=accept +DIFF no_san x509=reject openssl=accept +DIFF name_constraints_critical x509=reject openssl=accept +DIFF depth_8_intermediates x509=reject openssl=accept +DIFF leaf_is_ca x509=reject openssl=accept +DIFF leaf_ku_no_digsig x509=reject openssl=accept +DIFF rsa_1024_leaf x509=reject openssl=accept +DIFF sha1_signed x509=reject openssl=accept +DIFF rsassa_pss_key x509=reject openssl=accept +DIFF ed25519_key x509=reject openssl=accept +PASS mutant name-wildcard-labels detected (2 MISMATCH: wildcard_one_label_parent wild_one_label_parent ) +PASS mutant date-not-after detected (65 MISMATCH: rsa_good rsa_good_apex ) +PASS mutant bc-ca-flag detected (1 MISMATCH: intermediate_not_ca ) +PASS mutant expectation detected +driver checks=159 fuzz-mutations=800 +X509 PASS cases=78 (openssl-parity=66/78) mutants=4/4 diff --git a/evidence/om-tls-review-2026-10-26/security-rereview.md b/evidence/om-tls-review-2026-10-26/security-rereview.md new file mode 100644 index 000000000..002847d8e --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/security-rereview.md @@ -0,0 +1,48 @@ +# Security re-review: omega-mv #813 `feat/om-tls`, fix 38c80a85 over de2d884b + +VERDICT: PASS + +Scope: I read the current `/tmp/omtls/om/tls` tree. That tree is the working copy for 38c80a85 plus cdcf4229, a merge that touches only `.crumb`. I ran nothing: no git, no build, no suite. Every runtime statement below is reasoned from source. Test outcomes are NOT_RUN by me; the suite run belongs to TlsReviewFix. + +## Per-finding status + +| # | Status | Evidence (current line numbers) | +|---|---|---| +| F1 uniqueID trap | FIXED | `x509.om:1071-1083`: `k` starts at 0x80. Each 0x81 or 0x82 must be greater than the previous tag, and none is allowed when v1. The loop runs at most 3 times (0x81, 0x82, then 0xa3 returns), so `bound 4` cannot be reached. Tests: `cases.txt` `uid_*` (five, twice, reversed, 112), mutant `unique-id-order`. | +| F2 element bounds | FIXED | The `n > X5NMAX` (9999) guard is checked at the head of each pass, so pass 10000 returns before `bound 10000` can trap. It is present at `x509.om:858-862` (EKU), `899-903` (SAN), `992-996` (exts) and `1604-1608` (chain_host). The leaf `> X5LMAX` check at `1974` runs before `chain_leaf` and before any signature work. Tests: `eku/san_9999` OK and `eku/san/ext_10001` MALFORMED, `leaf_too_big`, mutants `elemcap` (the uncapped list traps, which counts as detected) and `leaf-size`. | +| F3 tls_hsmsg trap | FIXED | `tls.om:599-604`: at `k > 4000` it returns TLEBIG, below `bound 4096`. A CCS flood now ends at the second CCS because of the TLCCS check. Tests: interop `frag` and `ccsflood`, mutant handshake record cap (it reaches the bound, traps, and the row fails). | +| F4 tls_read trap | FIXED | `tls.om:1737-1742`: at `k > 1001` it calls `tls_abort` with TLEUNEX. `k` is counted per call and the loop returns as soon as data is pending. Tests: `empty1500`, `tickets1500`, `empty50` (OK), mutant read record cap. | +| F5 nameConstraints | FIXED | `x509.om:951-953`: OID 20 returns X5ENC whatever its criticality, before the critical/unknown branch. The check is in `x509_ext`, so it covers anchors, intermediates and the leaf. A store root carrying NC becomes unusable, which fails closed. Tests: `name_constraints_noncritical(_violated)`, mutant `name-constraints-noncritical`. | +| F6 RSA cost | FIXED | `x509_rsaexp` (611-631) accepts at most 4 content bytes, odd, ≥3. A bad exponent adds X5RBADE (2^32) to X5RBITS, and `x509_rsaok` (635) requires 2048..4096, so it is refused. It is enforced on presented intermediates in `chain_try` (1812, before `chain_link`/signature), on the leaf in `chain_leaf` (1896) and in `x509_cv_verify` (2035). Anchors only need ≥2048 at `chain_sig` (1653). The store is trusted, so a bad-e anchor is a local-config matter, not an attacker path. Tests: the `rsa_*` leaf and intermediate cases, `cv_rsa_6144`, `cv_rsa_e_2_32_plus_1`, and the 2 mutants. | +| F7 CCS policy | FIXED | `tls.om:532-539`: a plaintext CCS must be exactly `01`, length 1, with TLCCS==1, then TLCCS=2. TLCCS is 0 before ServerHello, set to 1 at 1088 together with TLRK=1, and set to 2 by the first protected record (552). An encrypted inner type 20 returns TLEUNEX (579-581). `tls_init` zeroes c[0..TLRB) including TLCCS at 496, and offset 496 does not overlap TLDET (492, 4 bytes) or TLEPK (512). Tests: `ccs2`, `ccsflood`, `ccspre`, `ccslate`, `encccs`, mutant CCS count. | +| F8 DNS | FIXED | Mask 64015 = 0xFA0F, expected 0x8000 (2000). The question is compared case-insensitively (`dns_qeq`). `dns_ans` follows the owner/CNAME chain through `dns_neq`, which is capped at 400 steps and uses `tls_at` (256 past the end), so it never traps. `dns_skip` returns 0 at 128 labels or more, before `bound 128`. `dns_rr` checks `p+10` and `rdlen` against `len r` before `dns_rrty`/`dns_rrip` read. The `dns_ans` `for an` loop is at most 65535. Tests: `dnsunit.om` (21 cases) and 3 DNS mutants (trap counts as detected). | +| F9 CV negative | FIXED | Interop `cvbad` and `cvkey`; imut `ret TLECV→ret 0`. A server that skips CV is not a row; see N2. | +| F10 test gaps | FIXED | The crafted x509 fixtures, fakesrv rows and DNS unit tests above. Interop rows compare an exact `TLSERR … (exit N)` string, so a trap (exit ≥100) fails the row. | +| F11 info | FIXED/DOC | `tls_close` (1803-1817) keeps TLPH=3. A close_notify during the handshake now returns TLEALRT detail 0 (`tls_hsmsg`), and it is tested by `closehs`, `closepre` and 2 mutants. The remaining items are documented, not changed: deadline, clock, PSL, CertificateRequest, and no path backtracking. | + +## New holes checked (none found) +- TLCCS cannot be re-armed after it reaches 2: it is written only at 1088 (SH), 537 and 552, and SH is processed once. HRR is refused, so there is no second SH. +- The 4000-record handshake cap and the 1000-record read cap return errors rather than traps. They cannot fire on conforming GitHub or Gandi peers [INFERENCE: real servers do not send 1000 empty records or split a message over 4000 records]. +- No consumer is confused by the X5RBADE offset in X5RBITS. All 4 reads (1653, 1851, 1896, 2035) treat it as "fails policy"; anchors pass ≥2048 by design. +- `dns_ptr` and `dns_neq` were checked for pointer loops, truncated pointers, out-of-range label bytes and label length >63. The 400-step cap ends in 1, and there is no indexing outside `tls_at`. + +## Residual (non-blocking) +- **N1 INFO**, `tls.om:2168-2176` with `dns_query` at 1925. `dns_a4` builds the query in `new uchar 300`. `tls_cpy q 13 hn` runs before `dns_labels`, so a caller-supplied `hn` of 288 bytes or more given to `tls_dial` traps. This is caller-controlled, not network-controlled, and is unchanged from the first review. Fix: `if gt len hn 253 ret TLEDNS` at the top of `dns_a4`. (Closed in 2238f043, see below.) +- **N2 LOW test gap.** There is no fakesrv row where the server omits CertificateVerify and sends Finished. It would be refused by the message-order check, which existing rows do not isolate. Optional fix: a `cvskip` row. (Closed in 2238f043, see below.) +- **N3 note.** The README claim "each has a test that fails on the code before the fix" was not run by me (NOT_RUN). The mutant list and fixture names match the code. + +## Delta 2238f043 (over cdcf4229, `om/tls` only) + +VERDICT: PASS + +Scope: I read the current tree at 2238f043. Nothing was run; test outcomes are NOT_RUN by me. + +| Change | Assessment | Evidence | +|---|---|---| +| Trust anchors must be self-issued | Correct, fails closed | `chain_self` (`x509.om:1747-1760`) returns 1 only when the issuer DER and subject DER are byte-equal, using the record that `chain_anchor` (1777) just filled from the same `part st p l` view, so the offsets are consistent. `chain_alink` (1764-1769) returns X5EUNK for a non-self-issued entry, so `chain_anchor` skips it and keeps `res = X5EUNK`. An intermediate placed in the store can no longer short-cut the path; this matches OpenSSL without `-partial_chain`. Real roots in ca-certificates are self-issued [INFERENCE; the `real_*` X509_OK rows exercise this when run]. Tests: `cases.txt:26` `store_intermediate_anchor` → UNKNOWN_ISSUER, mutant `anchor-self-issued` (`run.sh:133`, its sed target matches `x509.om:1765` exactly). | +| `now >= notAfter` is expired | Correct, stricter than RFC 5280 and the same as OpenSSL | `chain_time` `x509.om:1631` `if le get r X5RNA nw` → X5EEXP. Valid iff notBefore ≤ now < notAfter. Header note at `x509.om:8-9` updated. Tests: `cases.txt:34-36` (notAfter−1 OK, ==notAfter EXPIRED, +1 EXPIRED), mutants `date-not-after` and `date-at-not-after` (`run.sh:129,131`; both sed patterns match the new line 1631, so neither is a no-op). | +| `dns_a4` hostname cap | Closes N1 | `tls.om:2164-2167`: `if gt len hn 253` returns TLEDNS before `new uchar 300`. The largest query is then 12 + 1 + 253 + 1 + 4 = 271 bytes, under 300. Mutant `run.sh:86` `dns_a4 name length unchecked`. | +| `cvskip` interop row | Closes N2 | `fakesrv.py:17,132,143-144`: Certificate then Finished, with CertificateVerify omitted from both the wire and the transcript. `interop.sh:163` expects exactly `TLSERR TLS_ERR_UNEXPECTED_MESSAGE`. | + +New issues: none blocking. +- **D1 NIT (doc)** `test/x509/vectors/cases.txt:5` still says leaves are valid "... 2027-01-01 (1798761600) inclusive". After this change the bound is exclusive (`at_not_after` on line 35 expects EXPIRED). The comment should say "exclusive" or "until". diff --git a/evidence/om-tls-review-2026-10-26/security-review.md b/evidence/om-tls-review-2026-10-26/security-review.md new file mode 100644 index 000000000..cfc5957eb --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/security-review.md @@ -0,0 +1,265 @@ +# Security review: om/tls (aien-dev/omega-mv, branch feat/om-tls, tree /tmp/omtls) + +Reviewer: security-reviewer subagent, read-only. **Nothing was compiled or run.** Every runtime +statement below comes from reading the code and the OMEGESE trap rules (`docs/one_layer/OMEGESE.md:58-60,131-134`: +a `while … bound N` traps 4 if its condition is still true at the head of pass N+1; a trap ends the process with +exit 100+code). Runtime status is NOT_RUN: no finding was EXERCISED. +Contract: `/home/drakestapleton/handoffs/omega-tls/tls-contract.md` ("untrusted input must never trap", +"secrets constant time", "tag compare constant time"). + +Line numbers refer to the tree as read on 2026-10-26 (tls.om 2130 lines, x509.om 1955 lines). + +## Findings + +### F1. MEDIUM: certificate with 5 uniqueIDs traps the client before authentication. x509.om:1004 +`x509_tbs2` reads issuerUniqueID/subjectUniqueID with `while lt s b bound 4`. Each `0x81`/`0x82` element +`continue`s, and nothing enforces order or uniqueness. +- Failing input: a v2 or v3 TBSCertificate whose subjectPublicKeyInfo is followed by `81 00 81 00 81 00 81 00 81 00`, + or by four `81 00` and then the `[3]` extensions. Pass 5's head sees `s < b` and the process traps 4 (exit 104). +- Reach: the leaf is parsed in `chain_leaf`, and presented intermediates in `chain_try`, before any signature is + checked. Any server can kill the client. So can an on-path or DNS attacker, because the Certificate comes from + whoever terminates the handshake. +- Violates the contract rule "untrusted input must never trap", and README.md:165. +- Fix: accept at most one `0x81`, then at most one `0x82`, in that order (track the last tag), otherwise + X5EMAL; or replace the bound with a counter that returns X5EMAL. + +### F2. MEDIUM: element-count bounds of 10000 are reachable from a single certificate (trap 4). x509.om:809, 845, 930, 1534 +`x509_eku` (809), `x509_san` (845), `x509_exts` (930) and `chain_host` (1534) each loop +`while lt s b bound 10000`, one element per pass. +- Failing inputs (smallest elements): + - EKU containing 10001 × `06 00`: about 20 KB. + - SAN containing 10001 × `80 00` (an otherName-tag-shaped GeneralName, skipped as non-dNSName): about 20 KB. + This traps in `x509_san`, or in `chain_host` if parsing passes. + - Extensions containing 10001 × `30 04 06 00 04 00`: about 60 KB. The duplicate check needs a known OID, so + empty or unknown OIDs repeat freely; if empty OIDs are refused, use `30 05 06 01 00 04 00`, 7 bytes, 70 KB, + which still fits. +- Reach: the leaf has no size cap before `x509_chain_verify`; TLLFSZ is only checked in `tls_leaf`, after + verification (tls.om:1240-1250). A Certificate message can be up to TLHBSZ = 65536 bytes. Presented + intermediates are capped at X5KBUF = 16384 bytes, which is below the EKU/SAN threshold, so the leaf is the + vector. Same attacker set as F1. +- Fix: return X5EMAL when a counter reaches the cap instead of relying on `bound`. Alternatively set each bound + above the largest count the byte budget allows (len/2 + 1 for 2-byte elements). Cheapest of all: cap leaf + size at TLLFSZ before calling `x509_chain_verify`, then make each bound ≥ 16896/2. + +### F3. MEDIUM: `tls_hsmsg` traps on 4096 records that add no handshake bytes (on-path, before authentication). tls.om:588 +`tls_hsmsg` is `while true bound 4096`, one record per pass. `tls_rdrec` (tls.om:527-532) accepts an +unencrypted ChangeCipherSpec record (`14 03 03 00 01 01`) at any time, including after handshake keys are +installed, because the type-20 test runs before the `TLRK` test. `tls_hsmsg` then skips it without counting. +- Failing input: an on-path attacker injects 4096 six-byte CCS records (24 KB) into the server's flight after + ServerHello. The client traps 4. With an error instead of a trap, the same attacker would only cause an + ordinary connection failure. +- Second trigger: a hostile but authenticated-later server fragments EncryptedExtensions/Certificate into ≥ 4096 + one-byte records. The record layer is legal and Certificate may be 65 KB. +- `ret TLEUNEX` at the end of the loop (≈ line 619) can never run. +- Fix: allow at most one plaintext CCS (RFC 8446 §5 middlebox compatibility), and none after the first protected + record. Count records in a variable and return TLEUNEX/TLEBIG at a cap at or above TLHBSZ + 8, rather than + reaching `bound`. + +### F4. LOW-MEDIUM: `tls_read` traps on 999,999 records that carry no data (authenticated peer). tls.om:1714 +`while true bound 999999` only exits when `TLPN > 0`, at close_notify, or on an error. Zero-length +application_data records are valid. Each is 22 bytes on the wire: header, inner type, tag. +NewSessionTicket-only records (`tls_post` → `tls_hsdrop`) and KeyUpdate also leave `TLPN = 0`. +- Failing input: the authenticated server (or a compromised CDN edge) sends 999,999 empty type-23 records + (≈ 22 MB). The client traps 4 inside `tls_read`. +- Fix: count consecutive records that deliver no data and return a normal error (for example TLEUNEX after + 1024), or turn the loop into an explicit counter that ends in an error. + +### F5. MEDIUM: a non-critical nameConstraints extension is silently ignored. x509.om `x509_ext` (≈861-917), README.md:79-80 +Only a *critical* nameConstraints (known-OID index 20) returns X5ECRIT. A non-critical one is parsed past +and its restrictions are never applied. +- Scenario: a technically constrained subordinate CA, for example `permitted;DNS:example.com`, marked + non-critical. Historically the CA/B Forum Baseline Requirements and Mozilla allowed this for compatibility. + If that CA issues for `api.github.com` or `mail.gandi.net`, this client accepts the chain. OpenSSL and NSS + enforce the constraint and refuse it. +- The README documents the behaviour ("a critical one is refused"), but it is a fail-open default on a path + that protects the GitHub token and SMTP credentials. The only test is `name_constraints_critical` + (gen_pki.sh intNC, `critical,permitted;DNS:example.test`), so no non-critical case is covered. +- Fix: refuse nameConstraints on any issuer whether critical or not (X5ECRIT), or implement dNSName + permitted/excluded subtree matching for the leaf SAN. Add a non-critical test case either way. + +### F6. LOW: attacker-chosen RSA exponents give a large CPU cost per presented certificate. rsa.om:16-17, 28-29 (policy), `rsa_key` (340-389); x509.om:1568-1581 (`chain_sig`) +`rsa_key` accepts any odd e ≥ 3 with bitlen(e) ≤ bitlen(n), and n up to 8192 bits. The rsa.om note says the +cost "is a CPU cost the caller accepts by passing such a key". x509.om's `chain_sig` passes keys taken from +*presented* candidate certificates, which the attacker controls, and limits only the modulus minimum (≥ 2048). +- Modelled cost: one Montgomery product for s = 256 limbs is about 2s² = 131,072 limb mul-adds. An all-ones + 8192-bit e needs about 8192 squarings and 8192 multiplies, about 2.1 × 10⁹ limb mul-adds per verification. + For e = 65537 with a 2048-bit key it is 2·32²·18 ≈ 36,864. + `WolframLanguageEvaluator: s=256; {2 s^2, 2 s^2*16384, 2*32^2*18} -> {131072, 2147483648, 36864}`. +- Up to 15 presented candidates can be tried, and none of this time counts against `tls_deadline`, which only + covers I/O waits. A MITM can hold the client CPU-bound for a long time. Wall-clock time is not measured. +- Fix: at the X.509 layer, require e ≤ 2³² − 1 (or exactly 65537) and n ≤ 4096 bits for keys in presented + certificates and the leaf. Web PKI root programs already require these limits. + +### F7. LOW: protected and repeated ChangeCipherSpec records are accepted during the handshake. tls.om:527-532, 609-616 +Two defects share one root cause: +1. A record whose *inner* content type is 20 after decryption is skipped silently in `tls_hsmsg`, because the + test is `if ne ty 20`. RFC 8446 §5 requires the unexpected_message alert for an encrypted CCS. +2. Plaintext CCS is accepted any number of times, and also before ServerHello. + +The fix in F3 covers both: accept CCS only as an unprotected record, at most once, between ServerHello and the +server Finished. + +### F8. LOW-MEDIUM (DoS) / INFO: DNS answer handling. tls.om:1886-1890 (comment), 1930 (`dns_skip`), 1950-2000 (`dns_parse`) +- `dns_skip` is `while lt p z bound 128`. An answer owner name made of ≥ 128 one-byte labels (256 bytes) traps 4. + Attackers able to send this: the resolver, an on-path attacker, or an off-path spoofer that matches the 16-bit + ID on the connected UDP port. Fix: return 0 after 127 labels, or when the name passes 255 bytes. +- The flag mask 33295 (0x820F) at line 1959 tests QR, TC and RCODE, but not the opcode (bits 11-14). This + contradicts the comment at line 1789 ("opcode 0"). Fix: mask 0xFA0F, expect 0x8000. +- The owner name of the answer RR is never compared with the question. The first IN A record anywhere in the + answer section is used. +- One `recv` per attempt, so a single garbage datagram fails the lookup. +- TLS authentication limits all of this to denial of service, as README.md:81-83 says. + +### F9. LOW (test gap): no negative control for CertificateVerify. test/tls/run.sh, interop.sh, kat.om +- No interop row and no KAT check reaches `TLECV`, and kat.om has no CV or x509 reference at all. +- In every row, the chain is either valid with an honest CertificateVerify, or rejected earlier at the chain + check. +- A mutant `s/^ret TLECV$/ret 0/` (tls.om:1278) or "ignore `tls_cvcall`" would survive the whole suite + [INFERENCE from reading the rows; not executed]. +- CertificateVerify is the only proof that the server holds the leaf key. Without it, an attacker who replays a + valid public certificate chain is stopped only by the Finished MAC, which the same attacker can compute + because it chose the ECDHE share. +- Fix: + - Add a fakesh-style server that sends a valid chain for `localhost` (from the test PKI) plus a CV signed by a + different key, expecting TLS_ERR_CERTIFICATE_VERIFY (alert 51). + - Add a server that skips CV (Certificate followed directly by Finished), expecting TLEUNEX. + - Add both as `imut` mutants. + +### F10. LOW (test gap): fuzzing and interop do not exercise F1-F4 or F7. test/x509/vectors/cases.txt:181-184, test/tls/fakesh.py +- The x509 fuzz applies 800 deterministic single mutations to valid lists. Those never repeat an element 5 or + 10001 times. +- fakesh only crafts the ServerHello. +- No case covers CCS flooding, inner type 20, record fragmentation, zero-length application data, KeyUpdate, + NewSessionTicket floods, truncation before close_notify, or CertificateRequest. +- Add each as an interop or fakesh row that expects a named error and treats any exit ≥ 100 (trap) as FAIL. + +### F11. INFO +- `tls_close` (tls.om:1772-1782) sets TLPH = 2 even from state 3 (failed). A later `tls_read` then returns 0, + which reads like a clean close_notify. Keep state 3 when the connection had failed. +- A close_notify received during the handshake makes `tls_connect` return internal code TLCLOSE (100), which + `tls_errname` maps to TLS_ERR_UNKNOWN. The return is nonzero, so this is not a bypass, but it should be a + named error. +- `tls_deadline` 0 means 30 s per wait with no overall cap (README.md:45 is accurate but easy to misread), so a + slow-drip server can stretch the handshake. CPU time (F6) is not covered by any deadline. +- `tls_hq` uses the realtime clock, so the host clock decides certificate validity. +- Wildcards are not checked against a public-suffix list (`*.co.uk`); this relies on CA policy. +- Caller-contract traps, not attacker-reachable: + - `dns_query` with a hostname longer than the query buffer (`tls_dial` does not validate it, unlike + `tls_init`); + - `tls_write` with more than 16 GB (bound 999999 × 16384); + - `/etc/resolv.conf` with more than 4096 consecutive blanks (tls.om:1869); + - a trust bundle larger than TLSTSZ fails closed. +- CertificateRequest extensions are not validated. This is harmless because an empty Certificate is always + sent. +- `chain_pres`/`chain_path` (x509.om ≈1703-1745) commit to the first presented candidate whose signature + verifies, then check `chain_ca`, with no backtracking. This fails closed and affects availability only. + +## Checked and found sound + +**AEAD** +- `aead_chacha_open` (chacha.om:423-445): the Poly1305 tag is computed over AAD and ciphertext first, then the + 16 bytes are OR-accumulated with no early exit, and the one-time key is wiped. On mismatch the ciphertext + region is zeroed and 1 is returned. Decryption runs only after the tag matches. +- `gcm_open1` (aesgcm.om:615-630): the same pattern (GHASH, then OR-accumulated tag compare, then wipe or CTR). + `gcm_clear` wipes round keys, H and state on every path. The bitsliced AES has no secret-indexed tables + (per the module notes; not timed). + +**X25519** (x25519.om:298-326) +- Inputs are length-checked, the scalar is clamped, the ladder has a fixed count of 255 steps, cswap is masked, + and the all-zero result is detected without branching (`x25519_fenc`). +- The workspace and scalar copy are wiped. +- tls.om:1035 propagates the zero result: the fakesh `zero` row expects ZERO_SHARED_SECRET. + +**ECDSA** (ec.om:495-646) +- Public key: exactly `04‖X‖Y`, X < p and Y < p, and an on-curve equation check. +- DER: strict, short-form, minimal INTEGERs, no trailing bytes. An oversized INTEGER is replaced by n, so it + fails the range check. +- r and s are both checked to lie in [1, n−1]. +- A result at infinity is rejected, and x(R) mod n is compared with r. +- Curve constants are recorded as Wolfram-checked in test/ec/wolfram.txt (the file was not re-checked here). + +**RSA** +- PKCS#1 v1.5 builds the whole k-byte block and compares it byte for byte; the block is never parsed. The + DigestInfo prefixes are verbatim from RFC 8017. +- The PSS path checks the exact salt length. The X.509 layer requires salt = hash length, the trailer, the + emBits mask and the zero PS. +- s ≥ n and a signature length different from the modulus length are both rejected. +- Only the exponent policy is weak (F6). + +**Handshake order and authentication** +- Order: ServerHello → EncryptedExtensions → optional CertificateRequest → Certificate (empty context) → + CertificateVerify → Finished (32 bytes, `tls_cteq`). +- Transcript ranges and key-schedule labels follow RFC 8446 §7.1. The RFC 8448 KAT covers them, and 4 library + mutants were read. +- `TLHF == 0` is enforced at each key change. +- Every failure goes through `tls_abort` (phase 3, keys wiped). +- A `TLECV`/`TLEFIN` result is mapped to alert 51 (tls.om:1494). + +**ServerHello** +- Exact version, HRR detection, constant-time session-ID echo, offered suite only, compression 0. +- Extensions are exactly supported_versions (0x0304) and an x25519 key_share, each at most once, with exact + framing. +- Only TLS 1.3 is offered, so there is no downgrade path. + +**EncryptedExtensions** +- Only SNI (empty), supported_groups and ALPN are accepted, with no duplicates. ALPN must be exactly the offered + `http/1.1`. + +**Record layer** +- Lengths: at most 16640 on the wire, at most 16384 of plaintext, ciphertext of at least 17. +- After keys are installed, only type 23 is accepted (CCS excepted, F7). A plaintext alert or handshake record + is refused. +- Nonce = IV XOR seq. Seq refuses 2⁶⁴−1 instead of wrapping and is reset on key install. +- An all-zero inner plaintext is refused, and plaintext is exposed only after a successful open. +- An alert must be 2 bytes long. EOF without close_notify gives `-TLS_ERR_EOF`. +- Buffer offsets end exactly at TLCSZ = 119296. + +**Post-handshake** +- `tls_post` (bound 4096 messages per record ≤ 16384/4 is unreachable). +- NewSessionTicket is dropped, and anything other than NewSessionTicket or KeyUpdate is refused. + +**Bounded loops checked unreachable** +- The ServerHello/EncryptedExtensions extension loops (bound 64) end within 4 passes. +- The padding scan (bound 20000 > 16624). +- `chain_index` (bound 100000 > 65536/5). +- `der_hdr` (≤ 3 length octets, minimal, never reads past the end). +- `rsa_bits`. +- The MGF1 loop (bound 999 > 1024/32). + +**X.509** +- Strict DER for time (UTC pivot, GeneralizedTime, Z only), AlgorithmIdentifier (NULL or absent, exact PSS + parameters, ECDSA without parameters), tbs/outer algorithm equality, version, and serial of 1..21 bytes. +- basicConstraints, keyUsage, EKU and SAN framing. Known extensions at most once; an unknown critical extension + gives X5ECRIT. +- Leaf: + - SAN dNSName only, with no CN fallback. + - LDH host names; IP literals refused. + - Wildcard only as the whole leftmost label. + - Not a CA; digitalSignature; serverAuth. + - RSA ≥ 2048 bits. +- Issuers: + - Byte-equal DER names and consistent algorithm/key pairs. + - CA:TRUE, pathLen, keyCertSign, EKU, validity. + - Each presented certificate used at most once, depth ≤ 8, at most 16 entries. +- `x509_cv_verify`: the curve must match the scheme, rsa_pkcs1 is refused, and RSA must be ≥ 2048 bits. The leaf + in TLLF is the same bytes `chain_leaf` validated. +- PEM/base64 decoding of the local trust store is strict. + +**Constant time for secrets** +- `tls_cteq` (tls.om:172) for Finished, the session ID and ALPN. +- The README side-channel table (README.md:85-103) matches the code read; the DIT and padding caveats are + stated. + +**README claims checked** +- The API, the documented limits and the "not implemented" list match the code. +- Two claims are contradicted: + - "Untrusted input must never trap" (README.md:165, and the module notes such as x509 and tls): see F1-F4 and + F8. + - Mutant counts: run.sh has 1 expectation + 4 KAT + 4 interop mutants = 9, matching "9/9". x509 run.sh has + 3 library + 1 expectation = 4, matching "4/4". These counts are accurate, but none of the mutants targets + CertificateVerify (F9). + +## Not reviewed in depth +- sha2.om and hkdf.om internals. Their KATs and Wycheproof counts are cited in the README and were not re-run. +- client.om and parity.py. +- AES S-box gate correctness. diff --git a/evidence/om-tls-review-2026-10-26/tls-contract.md b/evidence/om-tls-review-2026-10-26/tls-contract.md new file mode 100644 index 000000000..62093f247 --- /dev/null +++ b/evidence/om-tls-review-2026-10-26/tls-contract.md @@ -0,0 +1,77 @@ +# om/tls contract (OmegaTLS lane, 2026-10-26) + +Goal: a TLS 1.3 client in seeded Omega, as source library units in aien-dev/omega-mv `om/tls/`. +Consumers: catalog.om (HTTPS GET api.github.com, raw.githubusercontent.com), omega_projects_pusher +(api.github.com), allen_relay_mailer (SMTPS mail.gandi.net:465). + +## Toolchain (pinned; never rebuild it, never edit compiler source) +- Source: omega-mv main 19f014f2178ca9cd3473728fe00a475a2398c409, clone at /tmp/omtls (shared tree; + write ONLY your own files listed in your task; no git commands that change state there). +- Compiler: /tmp/omtls/seed/out/omc, sha256 befb8199db8c4bca188a494dfaac2a6f0ee5c36fcea11188c75666c55fce8a1d. + Check the hash before trusting results. Compile: `omc < unit.om > bin 2> bin.err`; rc 0 + empty + stderr = accepted. Never run output of a failed compile. Runtime trap = exit 100+code. +- Language reference: /tmp/omtls/docs/one_layer/OMEGESE.md sections 3, 9, 9.13 (OM-2), 10 (host words). + Read it before writing code. Fixtures: /tmp/omtls/seed/omc/om2/. Prior-art crypto in .om (OM-1 style, + read-only reference for idioms): /tmp/omnet-ro/om/sha512/sha512.om, /tmp/omnet-ro/om/ed25519/ed25519.om + and their test/run.sh + driver.om (vector-driver pattern to copy). +- HOST RULE: every build/test command runs under `nice -n 19 ionice -c3`; at most 2 parallel jobs. +- Math rule: any computed constant (curve params, Montgomery constants, primality, etc.) is either taken + verbatim from the standard (cite section) or computed at run time in .om, or checked with the + Wolfram MCP tool (write JSON to xd://mcp__wolfram_wolframlanguageevaluator), quoting the query. +- No Signed-off-by. No host-language implementation of any primitive: Python is allowed ONLY as + test tooling (vector converters from Wycheproof/NIST JSON/rsp to flat txt, differential oracles). + +## Language facts that bite (verified on this omc) +- Unit is OM-2: the build writes a single line `om2` first, then concatenates the library files, then + the program/driver. Library files themselves must NOT contain an `om2` line and must NOT have `fn main`. +- OM-2 gives: unsized params `a view uchar *` / `a edit ulong *` (len a = run-time count), `part A o k` + as an argument to an unsized param, hex literals `0xff` (lowercase), `rotr`/`rotl` on unsigned, + `for i T K unroll` (K<=64), `fn ... to T inline`. +- PARAMETER SLOTS: at most 6 per function; an unsized array costs 2 slots, a scalar or sized array 1. + So a function takes at most 3 unsized arrays. Pack small fixed inputs into one array. +- At most 16 live registers per function (error 12: split the function). Names other than functions: + at most 8 chars. Function names up to 63 chars. A new local may not equal ANY function, global, + const, text or struct name in the composed unit (error 10), nor a keyword/host word (send recv + connect bind listen accept random stat link fork read write len part out open seal field at ...). +- No implicit conversions; `ulong ` is refused (error 9): build constant-time masks + arithmetically (e.g. m = sub 0 bit, eq-zero via ((d | (0-d)) >> 63) ^ 1). +- Globals cannot be passed as arguments (error 19). `new T N v` locals only in a function's outermost + block. Unsigned arithmetic wraps; signed traps on overflow. No 64x64->128 multiply: use 32-bit limbs + in ulong (or 16/26/51-bit radix as you choose) so products never exceed 2^64. +- Every loop is bounded (`while c bound N`, N<=999999; `for` traps after 1,000,000 passes). +- omc main limits per unit: 512 functions total (the WHOLE composed TLS client must fit, so keep your + module lean: target the function budget in your task), 8192 trap sites per function. + +## Naming (composition safety) +- Every library function name contains `_` and starts with the module prefix given in your task. +- Every const/text/global name is UPPERCASE and starts with your 2-letter module code. +- Locals/params: lowercase, no `_`, <= 8 chars. +- Library modules: no mutable globals (consts and texts are fine). Caller passes all workspace. + +## Error policy +- Functions that judge untrusted input return ulong: 0 = success/valid, nonzero = a documented + reject code (list them in your README section). Untrusted input must NEVER trap (check lengths + and ranges before indexing). Traps are only for caller-contract violations (e.g. output too small). +- Constant time: any function handling secrets (keys, plaintext, ephemeral scalars, MAC tags before + comparison) has no secret-dependent branch, loop count, or array index. Tag comparison is + constant-time. Signature verification inputs are public (variable time allowed; say so). + Wipe secret local arrays before returning where practical. Document exactly what is and is not + constant time, including the compiler-level caveat (omc emits plain AArch64; we rely on MUL/ADD/ + EOR/shift being data-independent; no DIT bit is set). + +## Tests (per module) +- Layout: om/tls/.om, om/tls/test//{driver.om,run.sh,vectors/*,gen_*.py}. +- run.sh usage: `sh om/tls/test//run.sh /tmp/omtls/seed/out/omc`; builds into + /tmp/omtls/build/tls// (build/ is gitignored); prints PASS/FAIL lines and a final line + ` PASS vectors=N (wycheproof=W ...) mutants=M/M` or FAIL; exit 0 only if all pass. +- Vectors: committed flat-text files converted from the source, with a header recording source URL, + source commit/sha256 and license (copy the upstream LICENSE/NOTICE beside them). + Wycheproof clone (read-only): /tmp/wycheproof at commit d17cc89fa5c8f4f4d378b5385ebf75da5d0926c9, + files in testvectors_v1/. Run every test of every listed file; the expected outcome is the + Wycheproof `result` ("valid" must pass, "invalid" must be refused, "acceptable": record which way + you go and why). Report exact counts: total / valid-pass / invalid-refused / acceptable split. + Files whose algorithm we do not implement are listed as NOT_RUN with the reason. +- Mutants: at least one source mutant of the library per primitive (sed a real constant/operator in a + copy of the .om), which the driver MUST detect (exit 1 with MISMATCH lines; a trap or a crash does + not count as detection) — copy omnet's mutant() logic. Plus one expectation mutant. +- Also a negative control in the driver: flip one byte of a valid vector and require rejection. diff --git a/om/tls/.crumb b/om/tls/.crumb new file mode 100644 index 000000000..28ba7bc75 --- /dev/null +++ b/om/tls/.crumb @@ -0,0 +1,19 @@ +{ + "extensions": { + "generated": { + "children": [], + "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "compiled_at": "2026-10-30T16:55:26Z", + "compiler": "crumb-compile/1", + "digest": "sha256:3b076c47999f351e1c44af7dd12a21b8b3f1ee30f20012a816116ed396e58497", + "evidence_files": 0, + "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "files": 579, + "generated_at_commit": "9e24b074455942f99d26d7aed4752e07bcdb7d22", + "source_tree": "sha256:856ab0d0b823aa3a5b39bf5df9cb49a2eb2b7ad65d722bf0b73af13d26e01e98" + } + }, + "name": "om-tls", + "purpose": "TLS 1.3 client (chacha20-poly1305, aes-gcm, x25519, P-256/RSA signatures, X.509 path validation) in seeded Omega with its KAT, DNS, interop and mutant suites", + "schema_version": "1.0.0" +} diff --git a/om/tls/AUDIT_SCOPE.md b/om/tls/AUDIT_SCOPE.md new file mode 100644 index 000000000..cca72bca4 --- /dev/null +++ b/om/tls/AUDIT_SCOPE.md @@ -0,0 +1,62 @@ +# Audit scope: om/tls and seed/net + +For an outside, independent security audit of the Omega TLS 1.3 client and the HTTP/1.1 unit it +transports. Revision: branch `audit/tls-outside-review` on aien-dev/omega-mv (base main `0b77e6ea` after the merge +of `705c0f01` work; compiler `seed/out/omc` sha256 +`2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f`, also run on `189ada82`). + +## In scope + +| path | what | lines of .om | +|---|---|---| +| `om/tls/sha2.om`, `hkdf.om` | SHA-256/384, HMAC, HKDF | see `wc -l om/tls/*.om` | +| `om/tls/x25519.om` | X25519 (RFC 7748) | | +| `om/tls/chacha.om`, `aesgcm.om` | the two AEADs | | +| `om/tls/ec.om`, `rsa.om`, `x509.om` | P-256/P-384 ECDSA verify, RSA PKCS#1 v1.5 and PSS verify, X.509 chain | | +| `om/tls/tls.om` | handshake, records, KeyUpdate, deadlines, wiping, DNS A lookup, DIT probe | | +| `seed/net/http.om`, `https.om`, `notls.om` | HTTP/1.1 client and server, HTTPS transport, plain stubs | | +| `seed/json/*.om` only where `seed/net` composes it | | | +| `om/tls/test/**`, `seed/net/tests/**` | suites, fake server, residue scan, timing driver, mutants | | +| `.github/workflows/om-tls-arm64.yml` | hosted arm64 rerun | | + +Every implementation byte is `.om` compiled by the pinned `omc`. Python (`fakesrv.py`, `check.py`, +`residue.py`, `gen_crafted.py`, `parity.py`) and `openssl` are referees and fixtures only. + +## Out of scope + +- The compiler (`seed/omc/omc.om`, `seed/out/omc`) and its code generation; register and spill + hygiene is a stated limit (`THREAT_MODEL.md`). +- Server-side TLS (there is none), client certificates, session resumption, 0-RTT, early data, + ALPN beyond `http/1.1`, HTTP/2. +- Revocation (OCSP, CRL): absent by policy. +- The Linux kernel, `getrandom`, the socket layer, the Spark hardware. +- The rest of omega-mv. + +## Questions the auditor is asked to answer + +1. Does any branch, loop bound or memory index in the in-scope units depend on secret data? +2. Can any input from the network make the client trap (exit >= 100), loop without bound, or + exceed `TLCSZ`/`TLSTSZ`? +3. Is the key schedule, the nonce construction and the transcript hash exactly RFC 8446? +4. Is chain verification (`x509.om`) sound against the Wycheproof-free X.509 corners: name + constraints, EKU, key usage, path length, algorithm confusion, RSA key policy? +5. Are the key-lifetime, deadline and wiping paths reachable on every error path? +6. Does `seed/net/https.om` ever hand plaintext to a TLS socket or TLS records to a plain socket? + +## How to reproduce + +``` +git clone https://github.com/aien-dev/omega-mv.git && cd omega-mv && git checkout audit/tls-outside-review +sha256sum seed/out/omc # must print 2c824805...029f +sh om/tls/test/tls/run.sh "$PWD/seed/out/omc" # add TLS_NET=1 for the live rows +python3 seed/net/tests/check.py --keep /tmp/netcheck # add TLS_NET=1 for the live HTTPS GETs +python3 om/tls/test/tls/residue.py "$PWD/build/tls/tls/client/bin" "$PWD/build/tls/interop" +``` + +Prior inside reviews and their raw logs: `evidence/om-tls-review-2026-10-26/` (SHA-256 sums inside). + +## Reporting + +Findings go to aien-dev/omega-mv issues with the label `security`; embargoed findings to +drake@aienos.com. Each finding should name the unit, the line, the input that triggers it and, where +possible, a `fakesrv.py` mode or a vector file so the fix can carry a failing-before test. diff --git a/om/tls/README.md b/om/tls/README.md index 5abd57b31..3cab86165 100644 --- a/om/tls/README.md +++ b/om/tls/README.md @@ -43,16 +43,42 @@ All buffers are owned by the caller. `c` is the connection state, at least `TLCS e = tls_store st load /etc/ssl/certs/ca-certificates.crt e = tls_init c hostname flags flags 1: offer ALPN http/1.1; the name is SNI and the checked name fd = tls_dial hostname port DNS A + TCP (IPv4; a dotted literal skips DNS); fd or -code -tls_deadline c monotonic_ns absolute deadline (monons) for every wait; 0 = 30 s per wait, - with no cap on the whole handshake (a slow server can stretch - it; CPU time is never covered) +tls_deadline c monotonic_ns absolute deadline (monons) for every wait; 0 = 30 s per wait + and, for the handshake, the whole-handshake budget below + (CPU time is never covered) +e = tls_hslimit c ns whole-handshake budget when no deadline is set (default 30 s; + before tls_connect only) +e = tls_reclimit c n tests only: lower the per-key record limit (1 .. 23726565; + before tls_connect only; it can never be raised) e = tls_connect c st int fd full handshake; any failure sends an alert and is final n = tls_read c out > 0 bytes; 0 = close_notify received; -code on error -n = tls_write c bytes all bytes or -code +n = tls_write c bytes all bytes or -code; sends KeyUpdate before the write key's + record limit (section "Key lifetime") tls_close c send close_notify, wipe keys (the caller closes fd); a failed connection stays failed, so a later tls_read is -code, never 0 ``` +Handshake budget: when the caller has set no deadline, `tls_connect` arms one of now + 30 s +(`TLHSNS`, or the value given to `tls_hslimit`) over the whole handshake and clears it when the +handshake succeeds, so a server that trickles its ServerHello one byte at a time (interop rows +`loris` and `slowsh`) cannot hold the client past the budget; the usual 30 s per wait then applies +to application data. A caller deadline replaces the budget. + +Key lifetime (RFC 8446 section 5.5): at most `TLKUREC` = 23726566 = floor(2^24.5) records are +protected under one key in each direction (the AES-GCM bound; ChaCha20-Poly1305 would allow more +and gets the same conservative value). `tls_write` sends KeyUpdate(update_not_requested) and +rotates its own key before the record that would be number `TLKUREC` - 1 under the current key; +`tls_seal` and `tls_open` refuse with `TLS_ERR_SEQUENCE_LIMIT` (fail closed, the connection is +failed) when a sequence number reaches the limit, which happens on the read side when the peer +never updates its key. `tls_reclimit` lowers the limit for the tests (interop rows `kuexact`, +`kuover`, `kurot`, `kuw:8`); the limit cannot be raised. + +Secret wiping: `tls_close` and `tls_abort` zero the traffic keys and IVs, the application +secrets, the handshake secrets and ephemeral key, and the record, write and line buffers of `c` +(`tls_wipe`). Secrets held in function locals (the Omega compiler keeps small values in registers +and `new` arrays on the stack) are not scrubbed after a function returns; see +`THREAT_MODEL.md`. + For STARTTLS (RFC 3207), do the plaintext exchange on `fd` first, then call `tls_connect`. See `test/tls/client.om`, mode `tsmtp`. @@ -93,7 +119,8 @@ For STARTTLS (RFC 3207), do the plaintext exchange on `fd` first, then call `tls - ChangeCipherSpec (stricter than RFC 8446 section 5): at most one, exactly the single byte 1, only after the ServerHello and before the first protected record. A second, early, late, protected or malformed CCS is `TLS_ERR_UNEXPECTED_MESSAGE`. -- Records: 64-bit sequence numbers, never wrapped (`TLS_ERR_SEQUENCE_LIMIT`). A record over +- Records: 64-bit sequence numbers, capped at 23726566 records per key (`TLS_ERR_SEQUENCE_LIMIT`, + see "Key lifetime" above; the client updates its own key before that). A record over 2^14 + 256 is refused. Plaintext is released only after its tag verifies. An end of TCP without close_notify is `TLS_ERR_EOF`, never a clean 0. A handshake message spread over more than 4000 records is `TLS_ERR_MESSAGE_TOO_BIG`; more than 1000 consecutive records without application @@ -130,7 +157,9 @@ Constant time here means that no branch, loop count or memory index depends on a Not covered, or covered only partly: - **CPU timing.** omc emits plain AArch64. The constant-time claims rely on MUL, ADD, EOR, AND, - ORR and the shifts having data-independent timing. The DIT bit is not set. + ORR and the shifts having data-independent timing. PSTATE.DIT is not set: `tls_hwdit` reports + whether the kernel advertises FEAT_DIT (HWCAP bit 24), and `msr DIT, #1` needs a compiler word + that omc does not have yet (proposal in `THREAT_MODEL.md`). - **Record padding.** The inner-plaintext padding is stripped by a backward scan, so its time reveals the padding length. RFC 8446 section 5.4 accepts this. - **Lengths and outcomes.** Message lengths, record counts and whether a tag check failed are @@ -140,12 +169,15 @@ Not covered, or covered only partly: zero the keys in `c`. - **Conversions.** A `uchar` conversion of a secret value compiles to a range check whose branch is never taken. -- **No measurement proof.** No dudect-style statistical timing test has been run. The x25519 - timing figures in its test output are informational and were noisy on a shared host. +- **Measurement.** A dudect-style fixed-vs-random Welch t-test (`test/tls/timing.om`, 20000 to 50000 + samples per operation on two cores) found every |t| below 2.5 (flag threshold 4.5) for x25519, + ChaCha20-Poly1305, AES-128-GCM and `tls_cteq` on one Spark host, 2026-10-26. That is MEASURED on + one host, not a proof; the raw samples and the Wolfram queries are in the audit evidence bundle + (`THREAT_MODEL.md` says where). The x25519 figures in its test output are informational. ## Tests (run from the repository root) -| command | final line observed 2026-10-26 (omc `189ada82`; identical on `2c824805`, including `net=PASS`) | +| command | final line observed 2026-10-26 (omc `2c824805`; identical on `189ada82`; `net=PASS` observed 2026-10-26 on both) | |---|---| | `sh om/tls/test/sha2/run.sh OMC` | `SHA2 PASS vectors=1777 (wycheproof=774) mutants=5/5` | | `sh om/tls/test/x25519/run.sh OMC` | `X25519 PASS vectors=531 (wycheproof=518) mutants=7/7` | @@ -154,7 +186,8 @@ Not covered, or covered only partly: | `sh om/tls/test/ec/run.sh OMC` | `EC PASS vectors=3984 (wycheproof=3748 cavp=180 edge=56) mutants=6/6` | | `sh om/tls/test/rsa/run.sh OMC` | `RSA PASS vectors=6486 (wycheproof=5250) mutants=4/4` | | `sh om/tls/test/x509/run.sh OMC` | `X509 PASS cases=91 (openssl-parity=73/91) mutants=12/12` | -| `TLS_NET=1 sh om/tls/test/tls/run.sh OMC` | `TLS PASS vectors=24 (rfc8448) dns=23 interop=38 net=PASS mutants=19/19` | +| `TLS_NET=1 sh om/tls/test/tls/run.sh OMC` | `TLS PASS vectors=24 (rfc8448) dns=23 dit=1 interop=44 residue=PASS net=PASS mutants=27/27` (`net=NOT_RUN` without `TLS_NET`, observed on both compilers 2026-10-26) | +| `nice -n 19 taskset -c CPU build/tls/tls/timing WHAT N` (`test/tls/timing.om`) | dudect samples, statistics outside; see `THREAT_MODEL.md` | How the suites are built: @@ -170,7 +203,7 @@ How the suites are built: - **`test/tls`.** - The RFC 8448 section 3 KAT checks ECDHE, every secret, the keys and IVs, both Finished values, and record seal and open byte for byte. - - `interop.sh` runs 38 rows against `openssl s_server`, crafted ServerHellos and `fakesrv.py` + - `interop.sh` runs 44 rows against `openssl s_server`, crafted ServerHellos and `fakesrv.py` (a full TLS 1.3 server in Python that misbehaves after a valid handshake), all on 127.0.0.1. Ports already in use are skipped. Every failure row also checks that `tls_close` leaves the connection failed. @@ -200,6 +233,11 @@ The interop refusal table (`build/tls/tls/interop-table.txt`): | Certificate then Finished, no CertificateVerify | `TLS_ERR_UNEXPECTED_MESSAGE` | | 1500 empty application records; 1500 NewSessionTickets | `TLS_ERR_UNEXPECTED_MESSAGE` | | close_notify before the ServerHello and after it | `TLS_ERR_ALERT_RECEIVED` detail 0 | +| record limit lowered to 5: server sends exactly 4 records per key then KeyUpdate (`kuexact`), rotates twice (`kurot`) | accepted | +| record limit lowered to 5: server sends a 5th record under one key (`kuover`) | `TLS_ERR_SEQUENCE_LIMIT` | +| record limit lowered to 8, client writes 8 single-byte records: the server (`kuw:8`) alerts unless a KeyUpdate arrives in time | accepted (13 updates seen) | +| ServerHello one byte per 250 ms for 8 s, handshake budget 2 s (`loris`) | `TLS_ERR_TIMEOUT` | +| ServerHello one byte per 20 ms, budget 10 s (`slowsh`) | accepted | ### Differences from `openssl verify` @@ -251,6 +289,35 @@ had 11 findings. Each one is fixed and has a test that fails on the code before | F10 F1-F4 and F7 not exercised | crafted x509 fixtures (`gen_crafted.py`), fake-server rows, DNS unit; a trap is a FAIL in interop | all rows above | | F11 info items | `tls_close` keeps a failed connection failed; close_notify in the handshake is `TLS_ERR_ALERT_RECEIVED`; deadline, clock, public-suffix, caller-contract, CertificateRequest and path-building limits documented above | interop `CLOSE_NOT_FAILED` check on every failure row, `closehs`, `closepre`, mutants close revives failed and handshake close_notify unmapped | +Outside review (2026-10-26, `audit/tls-outside-review`): six gaps, each fixed here or stated as a +limit in `THREAT_MODEL.md`; the audit boundary is `AUDIT_SCOPE.md`. In short: key lifetime +(KeyUpdate at the record limit, `TLS_ERR_SEQUENCE_LIMIT` fail-closed), HTTPS transport for +`seed/net/http.om`, a hosted arm64 CI job (`.github/workflows/om-tls-arm64.yml`), the handshake +budget, secret wiping checked by `test/tls/residue.py` (a `/proc/PID/mem` scan after the handshake and +after `tls_close`, with three mutants), the DIT probe, the timing measurement, and the review bundle +retained under `evidence/om-tls-review-2026-10-26/` with SHA-256 sums. + +## Policy + +- **Timeouts.** A caller deadline (`tls_deadline`) bounds every call; without one the handshake is + bounded by `tls_hslimit` (default 30 s) and reads block as the socket does. `seed/net/https.om` + maps a TLS timeout to `HETIME`. +- **Key lifetime.** 23726566 records per direction and key (RFC 8446 section 5.5, the stricter + ChaCha20-Poly1305 figure for both suites); the client sends KeyUpdate one record before and refuses + with `TLS_ERR_SEQUENCE_LIMIT` at the limit on both directions. +- **Secret handling.** Every unit zeroes its own secret locals; `tls_close` and every failure zero + the keys, the ephemeral key, the handshake secrets and the record buffers in `c`. Registers and + compiler-spilled stack slots are not scrubbed (a compiler limit). `test/tls/residue.py` is the + check: after the handshake none of the twelve handshake-only secrets is in the process memory, + after `tls_close` none of the eighteen. +- **Revocation.** Not checked. There is no OCSP, no OCSP stapling (the client sends no + `status_request` extension) and no CRL. A revoked but otherwise valid chain verifies. Callers that + need revocation must enforce it outside this library (pinning in the trust store, short-lived + certificates). OCSP stapling needs a DER OCSP response parser, a second signature check and a + freshness policy; it was judged out of this lane's scope rather than built half-way. +- **Trust.** Only the caller's trust store (`tls_storef`); no system store, no name constraints, + no CT, as `What it does and refuses` says. + The read-only re-review of the fix (`~/handoffs/omega-tls/security-rereview.md`, `38c80a85`) found every finding fixed (VERDICT: PASS) and two residual items, both fixed here: N1, a caller host name of 288 bytes or more trapped `dns_a4` (now refused above 253 bytes; `dnsunit` L cases, mutant diff --git a/om/tls/THREAT_MODEL.md b/om/tls/THREAT_MODEL.md new file mode 100644 index 000000000..aa058db96 --- /dev/null +++ b/om/tls/THREAT_MODEL.md @@ -0,0 +1,75 @@ +# om/tls and seed/net: threat model + +Written for the outside security audit (branch `audit/tls-outside-review`, base omega-mv main +`705c0f01`, omc `189ada82`). Facts here are what the code does at that revision; levels are +IMPLEMENTED (code exists), EXERCISED (a test ran on the Spark host), MEASURED (numbers from a run), +never QUALIFIED (no third-party or hardware qualification exists). + +## Assets + +1. The ECDHE private scalar, the shared secret, every handshake and traffic secret, the record keys + and IVs (`c[TLEPK..TLEPU)`, `c[TLSS]`, `c[TLHS..TLCRX)`, `c[TLWKEY..TLHOST)`). +2. Plaintext in the record buffers (`c[TLRB..TLCSZ)`) and in caller buffers. +3. The authenticity of the peer: the chain in the caller's trust store (`tls_storef`), host name + (`tls_init`), CertificateVerify and Finished. +4. Availability of the calling program: no trap on hostile input, bounded memory (`TLCSZ`, + `TLSTSZ`), bounded time (deadlines). + +## Attacker + +- Network attacker on the path: reads, injects, reorders, truncates, delays every byte; runs the + server (`fakesrv.py` models this); controls DNS answers (`dnsunit.om` models this). +- Not in scope: a local attacker on the same host (ptrace, /proc/PID/mem, core dumps, swap), a + compromised trust store, a compromised compiler or `seed/out/omc`, physical attacks, power or + electromagnetic side channels, speculative-execution side channels. +- Partly in scope: a co-tenant measuring timing. The units are written to be constant time in + secret data (README `Side channels`); the measurement below is host-only evidence. + +## Mitigations and their evidence + +| threat | mitigation | evidence | +|---|---|---| +| forged server | chain verification to the caller's roots, name check, CertificateVerify over the transcript, Finished over the transcript (`x509.om`, `tls.om`) | interop rows `cvbad`, `cvkey`, `cvskip`, `badchain*`; mutants chain result ignored, CertificateVerify ignored; EXERCISED | +| downgrade | TLS 1.3 only (`supported_versions` checked, `TLS_ERR_VERSION`); suites x25519 + ChaCha20-Poly1305 / AES-128-GCM only | mutant version not checked; EXERCISED | +| tampered records | AEAD with the TLS 1.3 nonce; tag failure is fatal (`TLS_ERR_BAD_RECORD_MAC`) | RFC 8448 KAT, mutant record MAC ignored; EXERCISED | +| key overuse | 23726566 records per key and direction: proactive KeyUpdate at limit-1 on write, `TLS_ERR_SEQUENCE_LIMIT` at the limit on both directions (`tls_open`, `tls_seal`, `tls_kusend`) | interop `kuexact`, `kurot`, `kuover`, `kuw:8` (test-only `tls_reclimit`); three mutants; EXERCISED | +| slow or stalled peer | caller deadline on every call; whole-handshake budget 30 s (`tls_hslimit`); record and message caps | interop `loris`, `slowsh`; mutant handshake budget not armed; EXERCISED | +| hostile DNS | flags, owner names, label and pointer caps; no trap | `dnsunit.om` 23 cases, 4 mutants; EXERCISED | +| memory exhaustion | fixed `TLCSZ` state, `TLSTSZ` trust store, 16 KiB bounce in `https.om`, element caps in x509 | x509 `leaf_too_big`, mutants read/handshake record cap; EXERCISED | +| secrets left in memory | units zero their secret locals; `tls_close`/`tls_abort` run `tls_wipe` (keys, ephemeral key, handshake secrets, record buffers); `tls_hskeys` zeroes the shared secret, `tls_cfin` the handshake secrets | `test/tls/residue.py` (`/proc/PID/mem` scan: 12 handshake-only secrets absent after the handshake, 18 absent after close; app keys present after the handshake as the positive control); mutants close keeps the traffic secrets, handshake secrets kept, shared secret kept; MEASURED `RESIDUE PASS secrets=18 hs_only=12` | +| timing | constant-time units (README table) | dudect-style Welch t-test, `test/tls/timing.om`: all 16 |t| values < 2.5 on two cores, v2 run 2026-10-26; MEASURED host-only (see "Timing measurement") | +| HTTPS misuse | `seed/net/https.om` refuses plaintext fall-back on a TLS port, maps EOF without close_notify to -604, wipes keys in `htlsend` | `seed/net/tests/check.py` stage 5: 9 rows, 5 mutants; `TLS_NET=1` live GETs; EXERCISED | + +## Known limits (not mitigated) + +1. **Registers and spilled stack slots.** omc does not scrub registers or spilled locals on + return. The residue scan looks at the whole writable address space of the process after the + calls return, so it would see a spilled secret that survived; it saw none at the scanned + points, but a scan is not a proof. A compiler-level wipe (zeroing the frame on return from + functions that hold secrets) is a proposal for the compiler lane, not implemented. +2. **PSTATE.DIT is not set.** `tls_hwdit` reports whether FEAT_DIT is advertised (HWCAP bit 24); the + library cannot execute `msr DIT, #1`. Probe (MEASURED, `evidence/dit-probe.log` in the handoff): + `mrs x0, DIT` = `d53b42a0`, `msr DIT, #1` = `d503415f`, `msr DIT, #0` = `d503405f`; Linux starts + the bit at 0, setting it from user space works and the kernel preserves it. Proposal for omc: a + word `dit v` (v in {0,1}) lowering to those two encodings, with `tls_connect` setting it for the + handshake. Until then the constant-time claim rests on the instruction set used (no table + lookups, no secret-dependent branches) and on the measurement. +3. **Revocation is not checked**: no OCSP, no stapling, no CRL (README `Policy`). +4. **Padding length and record lengths** are visible (RFC 8446 section 5.4). +5. **Caller buffers**: plaintext the caller receives from `tls_read` is the caller's to wipe. +6. **The random source** is Linux `getrandom` (blocking flag 0); no further entropy check. +7. **Single host, single toolchain**: every result above was produced on one DGX Spark (arm64, + GB10) with the pinned omc; the hosted arm64 CI job reruns the suites on a second machine, but the + compiler binary is the same pinned one. + +## Timing measurement + +`om/tls/test/tls/timing.om` times one operation per sample with `monons` after preparing an input +whose class (fixed pattern or `getrandom` bytes) is drawn per sample; both classes call `getrandom` +before the timed window so the cache and TLB state does not differ by class (the first driver did +not, and its cropped ChaCha20 rows produced |t| of 10.4 and 5.1, which vanished once the classes +were equalized; recorded in the evidence). Welch's t statistic was computed in Wolfram from per-class +counts and sums (full data and cropped at the pooled 90th percentile). Raw samples, sums, the binary +and the queries: `/home/drakestapleton/handoffs/TlsAudit/evidence/timing/` (`welch.md`). Reproduce: +`sh build/tls/tls/client/build.sh seed/out/omc om/tls/test/tls/timing.om build/tls/tls/timing` then +`nice -n 19 taskset -c 5 build/tls/tls/timing chacha 50000`. diff --git a/om/tls/test/fuzz/aflpp-exitrange.patch b/om/tls/test/fuzz/aflpp-exitrange.patch new file mode 100644 index 000000000..621e4a553 --- /dev/null +++ b/om/tls/test/fuzz/aflpp-exitrange.patch @@ -0,0 +1,96 @@ +diff --git a/include/forkserver.h b/include/forkserver.h +index 80713ea..1cdc8fc 100644 +--- a/include/forkserver.h ++++ b/include/forkserver.h +@@ -177,6 +177,7 @@ typedef struct afl_forkserver { + + bool uses_crash_exitcode; /* Custom crash exitcode specified? */ + u8 crash_exitcode; /* The crash exitcode specified */ ++ u8 crash_exitcode_hi; /* Upper end of an exitcode range */ + + u32 *shmem_fuzz_len; /* length of the fuzzing test case */ + +diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c +index ee20b9f..ade1d8a 100644 +--- a/src/afl-forkserver.c ++++ b/src/afl-forkserver.c +@@ -359,6 +359,7 @@ void afl_fsrv_init_dup(afl_forkserver_t *fsrv_to, afl_forkserver_t *from) { + fsrv_to->allow_cores = from->allow_cores; + fsrv_to->uses_crash_exitcode = from->uses_crash_exitcode; + fsrv_to->crash_exitcode = from->crash_exitcode; ++ fsrv_to->crash_exitcode_hi = from->crash_exitcode_hi; + fsrv_to->child_kill_signal = from->child_kill_signal; + fsrv_to->fsrv_kill_signal = from->fsrv_kill_signal; + fsrv_to->debug = from->debug; +@@ -2397,8 +2398,9 @@ fsrv_run_result_t __attribute__((hot)) afl_fsrv_run_target( + ((fsrv->uses_asan & 2) && + WEXITSTATUS(fsrv->child_status) == LSAN_ERROR) || + /* the custom crash_exitcode was returned by the target */ +- (fsrv->uses_crash_exitcode && +- WEXITSTATUS(fsrv->child_status) == fsrv->crash_exitcode))) { ++ (fsrv->uses_crash_exitcode && WIFEXITED(fsrv->child_status) && ++ WEXITSTATUS(fsrv->child_status) >= fsrv->crash_exitcode && ++ WEXITSTATUS(fsrv->child_status) <= fsrv->crash_exitcode_hi))) { + + /* For a proper crash, set last_kill_signal to WTERMSIG, else set it to 0 */ + fsrv->last_kill_signal = +diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c +index 2e0af7a..6ab1255 100644 +--- a/src/afl-fuzz.c ++++ b/src/afl-fuzz.c +@@ -1990,7 +1990,22 @@ int main(int argc, char **argv_orig, char **envp) { + + if (afl->afl_env.afl_crash_exitcode) { + +- long exitcode = strtol(afl->afl_env.afl_crash_exitcode, NULL, 10); ++ char *range_end = NULL; ++ long exitcode = strtol(afl->afl_env.afl_crash_exitcode, &range_end, 10); ++ long exitcode_hi = exitcode; ++ /* omega-mv om/tls/test/fuzz patch: "LO-HI" makes every exit code in ++ [LO, HI] a crash (Omega program-mode traps exit 100 + code 1..14) */ ++ if (range_end && *range_end == '-') { ++ ++ exitcode_hi = strtol(range_end + 1, NULL, 10); ++ if (exitcode_hi < exitcode || exitcode_hi > 255) { ++ ++ FATAL("Invalid crash exitcode range %s", afl->afl_env.afl_crash_exitcode); ++ ++ } ++ ++ } ++ + if ((!exitcode && (errno == EINVAL || errno == ERANGE)) || + exitcode < -127 || exitcode > 128) { + +@@ -2002,6 +2017,7 @@ int main(int argc, char **argv_orig, char **envp) { + afl->fsrv.uses_crash_exitcode = true; + // WEXITSTATUS is 8 bit unsigned + afl->fsrv.crash_exitcode = (u8)exitcode; ++ afl->fsrv.crash_exitcode_hi = (u8)exitcode_hi; + + } + +diff --git a/src/afl-showmap.c b/src/afl-showmap.c +index d35d9dd..c303258 100644 +--- a/src/afl-showmap.c ++++ b/src/afl-showmap.c +@@ -1721,6 +1721,7 @@ int main(int argc, char **argv_orig, char **envp) { + fsrv->uses_crash_exitcode = true; + // WEXITSTATUS is 8 bit unsigned + fsrv->crash_exitcode = (u8)exitcode; ++ fsrv->crash_exitcode_hi = (u8)exitcode; + + } + +diff --git a/src/afl-tmin.c b/src/afl-tmin.c +index 1711e63..597cc4b 100644 +--- a/src/afl-tmin.c ++++ b/src/afl-tmin.c +@@ -1476,6 +1476,7 @@ int main(int argc, char **argv_orig, char **envp) { + fsrv->uses_crash_exitcode = true; + // WEXITSTATUS is 8 bit unsigned + fsrv->crash_exitcode = (u8)exitcode; ++ fsrv->crash_exitcode_hi = (u8)exitcode; + + } + diff --git a/om/tls/test/fuzz/aflpp.sh b/om/tls/test/fuzz/aflpp.sh new file mode 100755 index 000000000..dd15968fb --- /dev/null +++ b/om/tls/test/fuzz/aflpp.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# SPDX-License-Identifier: Apache-2.0 +# aflpp.sh DEST: build the pinned AFL++ used by run.sh (host tooling, not part of the library). +# AFL++ v4.40c at e5a8ba39ecf97d05e286fdd4e01da96554dbf64f + aflpp-exitrange.patch (AFL_CRASH_EXITCODE=LO-HI, +# so every Omega trap exit 101..114 is a crash), qemu_mode for aarch64 built inside the pinned +# ubuntu:24.04 image because the host lacks glib headers. frida_mode cannot load static omc binaries. +set -eu +DEST=${1:?usage: aflpp.sh DEST} +D=$(cd -P "$(dirname "$0")" && pwd -P) +IMG=ubuntu@sha256:68ee22004a9109b44973313b02ff7b1de250f1de0f5ecb628d73f579aaff33ac +git clone --branch v4.40c https://github.com/AFLplusplus/AFLplusplus.git "$DEST" +cd "$DEST" +[ "$(git rev-parse HEAD)" = e5a8ba39ecf97d05e286fdd4e01da96554dbf64f ] || { echo "AFL++ tag moved" >&2; exit 1; } +git apply "$D/aflpp-exitrange.patch" +nice -n 19 ionice -c3 make -j2 afl-fuzz afl-showmap afl-tmin +docker run --rm -v "$DEST":/aflpp -v "$D/build-qemu-docker.sh":/b.sh:ro "$IMG" sh /b.sh +ls -l afl-qemu-trace diff --git a/om/tls/test/fuzz/build-qemu-docker.sh b/om/tls/test/fuzz/build-qemu-docker.sh new file mode 100755 index 000000000..a2ebef427 --- /dev/null +++ b/om/tls/test/fuzz/build-qemu-docker.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Builds AFL++ v4.40c qemu_mode (afl-qemu-trace, CPU_TARGET=aarch64) inside ubuntu:24.04 because the +# host lacks glib-2.0 development headers. Host tooling only; output links the host's libglib-2.0.so.0. +set -eu +apt-get update -qq +DEBIAN_FRONTEND=noninteractive apt-get install -y -qq build-essential git python3 python3-venv ninja-build pkg-config libglib2.0-dev libpixman-1-dev flex bison wget ca-certificates meson >/dev/null +git config --global --add safe.directory '*' +cd /aflpp/qemu_mode +sed -i 's/make -j$(nproc)/make -j2/' build_qemu_support.sh +CPU_TARGET=aarch64 ./build_qemu_support.sh diff --git a/om/tls/test/fuzz/common.om b/om/tls/test/fuzz/common.om new file mode 100644 index 000000000..87cbbd184 --- /dev/null +++ b/om/tls/test/fuzz/common.om @@ -0,0 +1,239 @@ +note SPDX-License-Identifier: Apache-2.0 +note common.om: shared helpers of the om/tls fuzz targets (om/tls/test/fuzz/run.sh). Composed by +note run.sh after the om/tls units, seed/net/http.om and seed/net/https.om, before one target. +note A target reads its whole input from stdin (at most FZCAP bytes; the rest is ignored), runs the +note library under test and returns 0. The only failure signal is a runtime trap (exit 100 + code), +note which is what the fuzzer counts as a crash: "untrusted input must never trap" (om/tls/README.md). + +const FZCAP ulong 65536 +text FZHOST "www.example.test" + +note fz_read: stdin into b (a target's `in = new uchar FZCAP 0`); the byte count (the rest is not read) +fn fz_read b edit uchar * to ulong +t = ulong 0 +while lt t len b bound 70000 +r = read 0 b t sub len b t +if le r 0 +break +end +t = add t ulong r +end +ret t +end + +note fz_be2: big-endian 16-bit value at a[p], 0 past the end +fn fz_be2 a view uchar * p ulong to ulong +if gt add p 2 len a +ret 0 +end +ret or shl ulong get a p 8 ulong get a add p 1 +end + +note fz_say: "rc NNN" and a newline on stderr: the library's result code for the input, so a replay +note (run.sh) can tell how deep a seed got; the fuzzer ignores it (only a trap is a crash) +fn fz_say e ulong to void +b = new uchar 7 0 +put b 0 114 +put b 1 99 +put b 2 32 +put b 3 uchar add 48 rem div e 100 10 +put b 4 uchar add 48 rem div e 10 10 +put b 5 uchar add 48 rem e 10 +put b 6 10 +r = write 2 b 0 7 +end + +note fz_arg: argument i into o; its length (0 when absent or too long) +fn fz_arg i ulong o edit uchar * to ulong +if ge i ulong argcnt +ret 0 +end +n = argread i o 0 len o +if le n 0 +ret 0 +end +ret ulong n +end + +note fz_store: the PEM bundle named by argument 1 into st; 0 ok, 1 none or unreadable +fn fz_store st edit uchar * to ulong +p = new uchar 4096 0 +n = fz_arg 1 p +if eq n 0 +ret 1 +end +if ne tls_storef st part p 0 n 0 +ret 1 +end +ret 0 +end + +note fz_pair: a connected AF_UNIX stream pair in one process (abstract name "omfz" + pid): +note fds[0] the blocking client end (the TLS side), fds[1] the nonblocking server end the target +note writes the input into. 0 ok, 1 failure (the target then returns without running the library). +fn fz_pair fds edit ulong * to ulong +a = new uchar 40 0 +put a 0 1 +put a 3 111 +put a 4 109 +put a 5 102 +put a 6 122 +k = ulong 7 +v = ulong getpid +d = new uchar 20 0 +m = ulong 0 +while true bound 20 +put d m uchar add 48 rem v 10 +m = add m 1 +v = div v 10 +if eq v 0 +break +end +end +for i ulong m +put a k get d sub sub m 1 i +k = add k 1 +end +l = socknew 1 524289 0 +if lt l 0 +ret 1 +end +r = bind int l a 0 k +if eq r 0 +r = listen int l 4 +end +if ne r 0 +x = fclose int l +ret 1 +end +c = socknew 1 524289 0 +if lt c 0 +x = fclose int l +ret 1 +end +r = connect int c a 0 k +s = long -1 +if eq r 0 +s = accept int l 526336 +end +x = fclose int l +if lt s 0 +x = fclose int c +ret 1 +end +put fds 0 ulong c +put fds 1 ulong s +ret 0 +end + +note fz_send: as much of b[p, p+n) as the server end accepts (it is nonblocking and nobody reads +note concurrently, so a full socket buffer ends the feed instead of hanging); 0 all sent, 1 stopped +fn fz_send fd int b view uchar * p ulong n ulong to ulong +d = ulong 0 +while lt d n bound 70000 +r = send fd b add p d sub n d 0 +if le r 0 +ret 1 +end +d = add d ulong r +end +ret 0 +end + +note fz_feed: the record stream of a target, from in[p] on, written to the server end of the mirror +note state m (m holds the peer's write key: what the client under test reads with). Chunks: +note T L1 L0 bytes[L] T < 128: one record sealed by tls_wrbuf with inner content type T; +note T >= 128: the bytes sent raw (forged, tampered or plaintext records). +note L is capped at 16384 and at the input end. A sealed handshake chunk starting with 24 +note (KeyUpdate) also advances m's key like the client's tls_kupd, so later chunks stay readable. +note 0 when every chunk went out, 1 when the socket buffer filled or sealing refused. +fn fz_feed m edit uchar * in view uchar * p0 ulong to ulong +p = p0 +while le add p 3 len in bound 70000 +n = fz_be2 in add p 1 +if gt n sub sub len in p 3 +n = sub sub len in p 3 +end +if gt n 16384 +n = 16384 +end +if ne fz_chunk m part in p add n 3 0 +ret 1 +end +p = add add p n 3 +end +ret 0 +end + +note fz_chunk: one chunk c = T L1 L0 bytes (its length already clipped); 0 sent, 1 stopped +fn fz_chunk m edit uchar * c view uchar * to ulong +e = new uchar 1 0 +ty = ulong get c 0 +n = sub len c 3 +if ge ty 128 +ret fz_send tls_fd m c 3 n +end +for i ulong n +put m add add TLWB 5 i get c add 3 i +end +if ne tls_wrbuf m ty n 0 +ret 1 +end +if and eq ty 22 eq tls_at c 3 24 +r = tls_drv m tls_sel TLSAP TLSAP 32 TLIUPD part e 0 0 +r = or r tls_keys m TLSAP 0 +end +ret 0 +end + +note fz_fill: b[o, o+n) = v, v+1, ... (fixed key material shared by a client state and its mirror) +fn fz_fill b edit uchar * o ulong n ulong v ulong to void +for i ulong n +put b add o i uchar and add v i 255 +end +end + +note fz_dnsq: rest = H name[H] response; dns_parse of the response to dns_query(name, id 0x4f4d) +note (a name dns_query refuses falls back to FZHOST). Shared by fz_dns and the fz_plant control. +fn fz_dnsq rest view uchar * to void +q = new uchar 300 0 +ip = new uchar 4 0 +h = tls_at rest 0 +if gt h sub len rest 1 +h = sub len rest 1 +end +ql = dns_query q part rest 1 h 0x4f4d +if eq ql 0 +ql = dns_query q FZHOST 0x4f4d +end +e = dns_parse part rest add h 1 sub sub len rest h 1 part q 0 ql ip +end + + +note fz_load: the file named by argument i into o; its length (0 when absent, unreadable or empty) +fn fz_load i ulong o edit uchar * to ulong +p = new uchar 4096 0 +k = fz_arg i p +if eq k 0 +ret 0 +end +f = fopen p 0 k 524288 0 +if lt f 0 +ret 0 +end +m = read int f o 0 len o +x = fclose int f +if le m 0 +ret 0 +end +ret ulong m +end + +note fz_hq: hq = now 1792972800 (8 bytes, big-endian) || FZHOST; its length +fn fz_hq hq edit uchar * to ulong +tls_pn hq 0 1792972800 8 +for i ulong len FZHOST +put hq add 8 i get FZHOST i +end +ret add 8 len FZHOST +end diff --git a/om/tls/test/fuzz/fz_dns.om b/om/tls/test/fuzz/fz_dns.om new file mode 100644 index 000000000..3adbd624b --- /dev/null +++ b/om/tls/test/fuzz/fz_dns.om @@ -0,0 +1,20 @@ +note SPDX-License-Identifier: Apache-2.0 +note fz_dns.om: fuzz target for the DNS code of om/tls/tls.om (dns_query, dns_parse with its name +note skipping, CNAME chains and owner checks; dns_lines / dns_nsline / dns_ip4, the resolv.conf parser). +note Input: M rest. M odd: rest is resolv.conf text for dns_lines. M even: rest = H name[H] response, +note the response to dns_query(name, id 0x4f4d); a name dns_query refuses falls back to FZHOST. + +fn main to int +ip = new uchar 4 0 +in = new uchar FZCAP 0 +n = fz_read in +if lt n 2 +ret 0 +end +if eq and get in 0 1 1 +e = dns_lines part in 1 sub n 1 ip +ret 0 +end +fz_dnsq part in 1 sub n 1 +ret 0 +end diff --git a/om/tls/test/fuzz/fz_flight.om b/om/tls/test/fuzz/fz_flight.om new file mode 100644 index 000000000..73de554c1 --- /dev/null +++ b/om/tls/test/fuzz/fz_flight.om @@ -0,0 +1,166 @@ +note SPDX-License-Identifier: Apache-2.0 +note fz_flight.om: fuzz target for the client's whole server-flight path in om/tls/tls.om: the record +note layer (tls_rdrec: framing, CCS, AEAD open, inner type and padding), handshake reassembly +note (tls_hsmsg), ServerHello (tls_rdsh) and the encrypted flight (tls_rdenc: EncryptedExtensions, +note CertificateRequest, Certificate + chain verification, CertificateVerify, Finished), exactly as +note tls_connect runs them after a real ClientHello (tls_mkch). +note Input: R1 R0 raw[R] chunks. raw is what the server sends before its keys exist (plaintext +note ServerHello, CCS, alerts, any forged records). The chunks (common.om fz_feed) follow, sealed +note under the server handshake key that the input's ServerHello gives this ClientHello. +note To seal the chunks before the client reads anything, a byte copy m of the client state (same +note ClientHello, same transcript) first reads raw from its own socket pair, which is shut so it sees +note the end instead of waiting; when its tls_rdsh succeeds, its read key becomes the sealing key. +note All the client's input is then in its socket and the write side is shut: no read can block. +note Arguments: 1 = PEM trust store (om/tls/test/x509/vectors/pki/storeAll.pem). + +note fz_fdset: connection fd and a 2 s deadline into a state (no wait can reach it: see above) +fn fz_fdset c edit uchar * fd ulong to void +tls_pn c TLFD fd 4 +tls_pn c TLDL add ulong monons 2000000000 8 +end + +note fz_mirror: m (after its tls_rdsh) turns into the server's sealing side, writing to fd +fn fz_mirror m edit uchar * fd ulong to void +for i ulong 32 +put m add TLWKEY i get m add TLRKEY i +end +for i ulong 12 +put m add TLWIV i get m add TLRIV i +end +tls_pn m TLWS 0 8 +put m TLWK 1 +tls_pn m TLFD fd 4 +end + +note fz_pre: m reads raw from pair a (shut at once); on success, m seals the chunks into the client's +note pair b. Returns the client's end of b plus 1, or 0 when no socket pair could be made. +fn fz_pre m edit uchar * th edit ulong 40 x view uchar * r ulong to ulong +a = new ulong 2 0 +b = new ulong 2 0 +if ne fz_pair a 0 +ret 0 +end +if ne fz_pair b 0 +ret 0 +end +fz_fdset m get a 0 +s = fz_send int get a 1 x 2 r +s = fz_send int get b 1 x 2 r +z = shutdown int get a 1 1 +if eq tls_rdsh m th 0 +fz_mirror m get b 1 +s = fz_feed m x add 2 r +end +z = shutdown int get b 1 1 +ret add get b 0 1 +end + +note fz_detch: make the ClientHello tls_mkch wrote deterministic, so a seed's CertificateVerify and +note Finished (which sign or MAC the transcript) stay valid: random = 64..95, legacy_session_id = +note 96..127, x25519 private key = 1..32 (its public key replaces the old one in key_share). Every +note other ClientHello byte is tls_mkch's own. +fn fz_detch c edit uchar * to ulong +k = new uchar 32 0 +o = new uchar 32 0 +fz_fill k 0 32 1 +if ne x25519_base o k 0 +ret 1 +end +b = add TLWB 5 +n = add tls_gn c add b 1 3 4 +p = fz_find c b n +if eq p 0 +ret 1 +end +for i ulong 32 +put c add TLEPK i get k i +put c add TLEPU i get o i +put c add p i get o i +end +fz_fill c add b 6 32 64 +fz_fill c add b 39 32 96 +tls_mov c TLSID add b 39 32 +ret 0 +end + +note fz_find: the offset in c[b, b+n) of the 32-byte public key c[TLEPU..]; 0 when absent +fn fz_find c view uchar * b ulong n ulong to ulong +for j ulong sub n 31 +d = ulong 0 +for i ulong 32 +d = or d xor ulong get c add add b j i ulong get c add TLEPU i +end +if eq d 0 +ret add b j +end +end +ret 0 +end + +note fz_dump: with argument 2, the ClientHello message is written to that file (gen_seeds.py reads it) +fn fz_dump c view uchar * n ulong to void +p = new uchar 4096 0 +k = fz_arg 2 p +if eq k 0 +ret +end +f = fopen p 0 k 524865 420 +if lt f 0 +ret +end +w = write int f c add TLWB 5 n +x = fclose int f +end + +fn fz_flrun c edit uchar * m edit uchar * x view uchar * to ulong +th = new ulong 40 0 +t2 = new ulong 40 0 +st = new uchar TLSTSZ 0 +s = fz_store st +if ne tls_init c FZHOST 1 0 +ret 0 +end +sha256_init th +if ne tls_mkch c 0 +ret 0 +end +if ne fz_detch c 0 +ret 0 +end +n = add tls_gn c add TLWB 6 3 4 +fz_dump c n +sha256_update th part c add TLWB 5 n +for i ulong TLCSZ +put m i get c i +end +for i ulong 40 +put t2 i get th i +end +r = fz_be2 x 0 +if gt r sub len x 2 +r = sub len x 2 +end +f = fz_pre m t2 x r +if eq f 0 +ret 0 +end +fz_fdset c sub f 1 +e = tls_rdsh c th +if eq e 0 +e = tls_rdenc c st th +end +ret e +end + +fn main to int +c = new uchar TLCSZ 0 +m = new uchar TLCSZ 0 +in = new uchar FZCAP 0 +n = fz_read in +if lt n 2 +ret 0 +end +r = fz_flrun c m part in 0 n +fz_say r +ret 0 +end diff --git a/om/tls/test/fuzz/fz_hs.om b/om/tls/test/fuzz/fz_hs.om new file mode 100644 index 000000000..638a48bab --- /dev/null +++ b/om/tls/test/fuzz/fz_hs.om @@ -0,0 +1,142 @@ +note SPDX-License-Identifier: Apache-2.0 +note fz_hs.om: fuzz target for each TLS 1.3 handshake-message parser of om/tls/tls.om, called directly +note with the message already reassembled at c[TLHB], as tls_hsmsg leaves it (a whole message of +note 4 + length bytes, possibly followed by more bytes). Input: S rest, S mod 8 selects: +note 0 ServerHello tls_shhead, then tls_shext, then tls_ecdh (X25519 on the server share) +note 1 EncryptedExtensions tls_ee +note 2 CertificateRequest tls_cr +note 3 Certificate tls_cert (x509_chain_verify against the store named by argument 1) +note 4 CertificateVerify rest = L1 L0 leaf-entry[L] message: the entry (3-byte length, DER, 2 bytes) +note is put at c[TLLF] as tls_leaf would, then tls_cv +note 5 server Finished tls_sfin under a fixed server handshake secret +note 6 KeyUpdate tls_kupd under fixed traffic secrets (an update_requested answer is sent) +note 7 post-handshake rest is a decrypted record body; tls_post (NewSessionTicket, KeyUpdate, +note messages split across or coalesced in records) +note A message whose header length runs past the input is skipped: tls_hsmsg never hands one over. +note Arguments: 1 = PEM trust store (om/tls/test/x509/vectors/pki/storeAll.pem). + +fn fz_hsput c edit uchar * m view uchar * to ulong +n = len m +if lt n 4 +ret 1 +end +ml = add or shl ulong get m 1 16 or shl ulong get m 2 8 ulong get m 3 4 +if gt ml n +ret 1 +end +for i ulong n +put c add TLHB i get m i +end +tls_pn c TLHF n 4 +ret 0 +end + +note fz_hspost: m is the body of one decrypted handshake record, into c[TLRB] for tls_post +fn fz_hspost c edit uchar * m view uchar * to ulong +n = len m +if gt n 16640 +n = 16640 +end +if eq n 0 +ret 0 +end +for i ulong n +put c add add TLRB 5 i get m i +end +tls_pn c add TLRB 3 n 2 +ret tls_post c +end + +note fz_hscv: m = L1 L0 leaf-entry[L] CertificateVerify, over a fixed transcript hash +fn fz_hscv c edit uchar * m view uchar * to ulong +h = new uchar 32 0 +fz_fill h 0 32 217 +l = fz_be2 m 0 +if gt l sub len m 2 +ret 0 +end +if gt l TLLFSZ +ret 0 +end +for i ulong l +put c add TLLF i get m add 2 i +end +if ne fz_hsput c part m add 2 l sub sub len m 2 l 0 +ret 0 +end +ret tls_cv c h +end + +note fz_hsrun: x = S rest (the whole input); dispatch on S mod 8 +fn fz_hsrun c edit uchar * st view uchar * x view uchar * to ulong +h = new uchar 32 0 +fz_fill h 0 32 217 +sel = rem ulong get x 0 8 +if eq sel 7 +ret fz_hspost c part x 1 sub len x 1 +end +if eq sel 4 +ret fz_hscv c part x 1 sub len x 1 +end +if ne fz_hsput c part x 1 sub len x 1 0 +ret 0 +end +if eq sel 0 +r = tls_shhead c +if eq r 0 +r = tls_shext c +end +if eq r 0 +r = tls_ecdh c +end +ret r +end +if eq sel 1 +ret tls_ee c +end +if eq sel 2 +ret tls_cr c +end +if eq sel 3 +ret tls_cert c st +end +if eq sel 5 +ret tls_sfin c h +end +ret tls_kupd c +end + +fn main to int +c = new uchar TLCSZ 0 +st = new uchar TLSTSZ 0 +fds = new ulong 2 0 +in = new uchar FZCAP 0 +n = fz_read in +if lt n 1 +ret 0 +end +s = fz_store st +if ne tls_init c FZHOST 1 0 +ret 0 +end +if ne fz_pair fds 0 +ret 0 +end +tls_pn c TLFD get fds 0 4 +tls_pn c TLDL add ulong monons 2000000000 8 +put c TLPH 1 +put c TLSU 1 +put c TLWK 1 +put c TLRK 1 +fz_fill c TLEPK 32 1 +fz_fill c TLSHS 32 33 +fz_fill c TLSAP 32 65 +fz_fill c TLCAP 32 97 +fz_fill c TLWKEY 32 129 +fz_fill c TLWIV 12 161 +fz_fill c TLRKEY 32 173 +fz_fill c TLRIV 12 205 +r = fz_hsrun c view st part in 0 n +fz_say r +ret 0 +end diff --git a/om/tls/test/fuzz/fz_http.om b/om/tls/test/fuzz/fz_http.om new file mode 100644 index 000000000..e15c8440b --- /dev/null +++ b/om/tls/test/fuzz/fz_http.om @@ -0,0 +1,51 @@ +note SPDX-License-Identifier: Apache-2.0 +note fz_http.om: fuzz target for the HTTP/1.1 message parser of seed/net/http.om in memory mode +note (hmemld), the mode seed/net/tests/parse.om uses, with the same caps (head 2048 bytes, 16 header +note fields, body 4096 bytes, chunk framing allowance 1024 bytes). +note Input: M message. M bit 0 and 1: 0 = response (hrsprd), 1 = response to HEAD, 2 or 3 = request +note (hreqrd, server role); then the decoded body (hbodyall), whatever framing the head chose. + +fn fz_hrun cs edit ulong 320 io edit uchar 65536 x view uchar * to long +aux = new uchar 65536 0 +md = and ulong get x 0 3 +role = ulong 0 +if ge md 2 +role = 1 +end +r = hinit cs io -1 role +if lt r 0 +ret r +end +r = hmemld cs io view part x 1 sub len x 1 +if lt r 0 +ret r +end +put cs HHEADMX 2048 +put cs HHMAX 16 +put cs HBCAP 4096 +put cs HFRMAX 1024 +if ge md 2 +r = hreqrd cs io +else +if eq md 1 +put cs HISHEAD 1 +end +r = hrsprd cs io +end +if le r 0 +ret r +end +ret hbodyall cs io part aux 0 65536 +end + +fn main to int +cs = new ulong 320 0 +io = new uchar 65536 0 +in = new uchar FZCAP 0 +n = fz_read in +if lt n 1 +ret 0 +end +r = fz_hrun cs io part in 0 n +ret 0 +end diff --git a/om/tls/test/fuzz/fz_https.om b/om/tls/test/fuzz/fz_https.om new file mode 100644 index 000000000..d9a03b0b9 --- /dev/null +++ b/om/tls/test/fuzz/fz_https.om @@ -0,0 +1,95 @@ +note SPDX-License-Identifier: Apache-2.0 +note fz_https.om: fuzz target for an HTTPS response read through seed/net/https.om: http.om's +note response parser (hrsprd, hbodyall) over the TLS transport (htlsrecv, htlsrecvd), so the TLS +note record layer and the post-handshake path of om/tls/tls.om (tls_read, tls_rdapp, tls_rdrec, +note tls_ralert, tls_post: NewSessionTicket, KeyUpdate) see the same bytes as the HTTP parser. +note The connection starts as already established (fixed application keys, as after tls_connect): +note the handshake itself is fz_flight's target. +note Input: M chunks. M bit 0: response to HEAD; bit 1: suite (0 = TLS_CHACHA20_POLY1305_SHA256, +note 1 = TLS_AES_128_GCM_SHA256). The chunks (common.om fz_feed) are sealed under the server's +note application key and are all in the socket, its write side shut, before the client reads. + +note fz_tset: an established client state t on fd with suite su and fixed keys +fn fz_tset t edit uchar * fd ulong su ulong to void +tls_pn t TLFD fd 4 +put t TLPH 1 +put t TLSU uchar su +put t TLWK 1 +put t TLRK 1 +put t TLCCS 2 +fz_fill t TLSAP 32 65 +fz_fill t TLCAP 32 97 +fz_fill t TLWKEY 32 129 +fz_fill t TLWIV 12 161 +fz_fill t TLRKEY 32 173 +fz_fill t TLRIV 12 205 +end + +note fz_mirc: m = the server side of t: it seals with t's read key and traffic secret, writing to fd +fn fz_mirc m edit uchar * t view uchar * fd ulong to void +for i ulong 32 +put m add TLWKEY i get t add TLRKEY i +put m add TLSAP i get t add TLSAP i +end +for i ulong 12 +put m add TLWIV i get t add TLRIV i +end +put m TLSU get t TLSU +put m TLWK 1 +tls_pn m TLFD fd 4 +end + +note fz_sconn: client cs/io on a socket pair, TLS established, every chunk of x sealed into it and +note the server's write side shut; 0 ok, negative when the setup failed +fn fz_sconn cs edit ulong 320 io edit uchar 262144 m edit uchar * x view uchar * to long +fds = new ulong 2 0 +if ne fz_pair fds 0 +ret -1 +end +r = hinit cs io int get fds 0 0 +if lt r 0 +ret r +end +r = htlsinit cs io FZHOST +if lt r 0 +ret r +end +b = get cs HTB +su = add 1 and shr ulong get x 0 1 1 +fz_tset part io b TLCSZ get fds 0 su +fz_mirc m view part io b TLCSZ get fds 1 +s = fz_feed m x 1 +z = shutdown int get fds 1 1 +ret 0 +end + +fn fz_srun cs edit ulong 320 io edit uchar 262144 m edit uchar * x view uchar * to long +aux = new uchar 65536 0 +r = fz_sconn cs io m x +if lt r 0 +ret r +end +put cs HHEADMX 2048 +put cs HHMAX 16 +put cs HBCAP 4096 +put cs HFRMAX 1024 +put cs HISHEAD and ulong get x 0 1 +r = hrsprd cs io +if le r 0 +ret r +end +ret hbodyall cs io part aux 0 65536 +end + +fn main to int +cs = new ulong 320 0 +io = new uchar 262144 0 +m = new uchar TLCSZ 0 +in = new uchar FZCAP 0 +n = fz_read in +if lt n 1 +ret 0 +end +r = fz_srun cs io m part in 0 n +ret 0 +end diff --git a/om/tls/test/fuzz/fz_pem.om b/om/tls/test/fuzz/fz_pem.om new file mode 100644 index 000000000..bc0e1748d --- /dev/null +++ b/om/tls/test/fuzz/fz_pem.om @@ -0,0 +1,31 @@ +note SPDX-License-Identifier: Apache-2.0 +note fz_pem.om: fuzz target for the PEM trust-store loader of om/tls/x509.om (pem_decode: armour +note scanning, base64, per-certificate parsing into store entries) and for chain verification against +note the store it builds. Input: a PEM bundle (as /etc/ssl/certs/ca-certificates.crt would hold). +note Argument 1 (optional): a certificate_list file (3-byte length, DER, 2-byte zero, per entry, as +note run.sh writes from om/tls/test/x509/vectors/pki/lR.der + intR.der) checked against the store +note when pem_decode accepted it, at now 1792972800 and host www.example.test. + +fn fz_pchain st view uchar * to ulong +cl = new uchar 16384 0 +hq = new uchar 32 0 +m = fz_load 1 cl +if eq m 0 +ret 0 +end +h = fz_hq hq +ret x509_chain_verify part cl 0 m st part hq 0 h +end + +fn main to int +st = new uchar TLSTSZ 0 +n = fz_read st +if lt n 1 +ret 0 +end +r = pem_decode st n +if gt r 0 +v = fz_pchain view st +end +ret 0 +end diff --git a/om/tls/test/fuzz/fz_plant.om b/om/tls/test/fuzz/fz_plant.om new file mode 100644 index 000000000..13e57f9ec --- /dev/null +++ b/om/tls/test/fuzz/fz_plant.om @@ -0,0 +1,36 @@ +note SPDX-License-Identifier: Apache-2.0 +note fz_plant.om: NEGATIVE CONTROL, never shipped. fz_dns plus a planted defect: input bytes 1..4 +note equal to "OMFZ" make main write past a 4-byte array, a bounds trap (exit 103). Each byte is its +note own branch, so a coverage-guided fuzzer climbs to it one byte at a time; a blind fuzzer needs about +note 2^32 tries. The campaign must report this crash, or its crash detection is not trusted. + +fn fz_plt in view uchar * n ulong ip edit uchar * to void +if lt n 5 +ret +end +if eq get in 1 79 +if eq get in 2 77 +if eq get in 3 70 +if eq get in 4 90 +put ip add n 4 0 +end +end +end +end +end + +fn main to int +ip = new uchar 4 0 +in = new uchar FZCAP 0 +n = fz_read in +fz_plt view in n ip +if lt n 2 +ret 0 +end +if eq and get in 0 1 1 +e = dns_lines part in 1 sub n 1 ip +ret 0 +end +fz_dnsq part in 1 sub n 1 +ret 0 +end diff --git a/om/tls/test/fuzz/fz_x509.om b/om/tls/test/fuzz/fz_x509.om new file mode 100644 index 000000000..a7d2054f6 --- /dev/null +++ b/om/tls/test/fuzz/fz_x509.om @@ -0,0 +1,79 @@ +note SPDX-License-Identifier: Apache-2.0 +note fz_x509.om: fuzz target for om/tls/x509.om (DER/ASN.1 certificate parsing, chain building and +note verification, name/SAN/EKU/name-constraint checks, RSA/ECDSA signature verification). +note Input: M rest, M mod 4 selects: +note 0 x509_parse of rest as one DER certificate +note 1 x509_chain_verify of rest as a TLS certificate_list (entries: 3-byte length, DER, 2-byte +note extensions length, extensions), now 1792972800, host www.example.test +note 2 as 1 with rest = T[8] H name[H] list: the verification time and hostname from the input +note 3 x509_cv_verify: rest = S1 S0 L1 L0 list[L] ms; the leaf of list checks ms = 130-byte signed +note content || signature (scheme S), as tls_cv passes it (pki/cv.msg is such a content) +note Arguments: 1 = PEM trust store (om/tls/test/x509/vectors/pki/storeAll.pem). + +note fz_xcv: the list is copied out of x (one array may not be passed twice in one call: error 19) +fn fz_xcv x view uchar * to ulong +cl = new uchar 65536 0 +sch = fz_be2 x 0 +l = fz_be2 x 2 +if gt add l 134 len x +ret 0 +end +for i ulong l +put cl i get x add 4 i +end +ret x509_cv_verify part cl 0 l sch part x add 4 l sub sub len x 4 l 130 +end + +fn fz_xhq x view uchar * st view uchar * to ulong +hq = new uchar 300 0 +if lt len x 9 +ret 0 +end +for i ulong 8 +put hq i get x i +end +h = ulong get x 8 +if gt h sub len x 9 +h = sub len x 9 +end +if gt h 255 +h = 255 +end +for i ulong h +put hq add 8 i get x add 9 i +end +ret x509_chain_verify part x add 9 h sub sub len x 9 h st part hq 0 add 8 h +end + +fn fz_xrun x view uchar * st view uchar * to ulong +r = new ulong X5RSZ 0 +hq = new uchar 32 0 +md = and ulong get x 0 3 +if eq md 0 +ret x509_parse part x 1 sub len x 1 r +end +if eq md 3 +ret fz_xcv part x 1 sub len x 1 +end +if eq md 2 +ret fz_xhq part x 1 sub len x 1 st +end +tls_pn hq 0 1792972800 8 +for i ulong len FZHOST +put hq add 8 i get FZHOST i +end +ret x509_chain_verify part x 1 sub len x 1 st part hq 0 add 8 len FZHOST +end + +fn main to int +st = new uchar TLSTSZ 0 +in = new uchar FZCAP 0 +n = fz_read in +if lt n 1 +ret 0 +end +s = fz_store st +r = fz_xrun part in 0 n view st +fz_say r +ret 0 +end diff --git a/om/tls/test/fuzz/gen_seeds.py b/om/tls/test/fuzz/gen_seeds.py new file mode 100755 index 000000000..5c40e5649 --- /dev/null +++ b/om/tls/test/fuzz/gen_seeds.py @@ -0,0 +1,276 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Test tooling only (om/tls fuzz targets, run.sh): writes the seed corpus of every fuzz target from +# the repo's own vectors, plus a TLS 1.3 server flight built with python3 `cryptography` for the +# deterministic ClientHello of fz_flight. Nothing here is the implementation under test. +# usage: gen_seeds.py OUTDIR CHFILE +# CHFILE: the ClientHello fz_flight writes with argument 2 (run.sh does this first) +# Writes OUTDIR// and OUTDIR/fzstore.pem (pki/storeAll.pem + this run's own root). +# Keys are fresh on every run, so the flight seeds differ byte-wise between runs (run.sh keeps the +# committed seeds/ directory; regenerate only together with fzstore.pem). +import datetime +import hashlib +import hmac +import importlib.util +import os +import sys + +from cryptography import x509 +from cryptography.hazmat.primitives import hashes, serialization +from cryptography.hazmat.primitives.asymmetric import ec, x25519 +from cryptography.x509.oid import ExtendedKeyUsageOID, NameOID + +HERE = os.path.dirname(os.path.abspath(__file__)) +TEST = os.path.dirname(HERE) +REPO = os.path.dirname(os.path.dirname(os.path.dirname(TEST))) +PKI = os.path.join(TEST, "x509", "vectors", "pki") +HOST = b"www.example.test" +NOW = 1792972800 + + +def u8(n): return bytes([n]) +def u16(n): return n.to_bytes(2, "big") +def u24(n): return n.to_bytes(3, "big") +def msg(t, body): return u8(t) + u24(len(body)) + body +def chunk(t, b): return u8(t) + u16(len(b)) + b +def rec(t, b): return u8(t) + b"\x03\x03" + u16(len(b)) + b +def fill(n, v): return bytes((v + i) & 255 for i in range(n)) +def h256(b): return hashlib.sha256(b).digest() +def rd(*p): return open(os.path.join(*p), "rb").read() + + +def expand_label(secret, label, ctx, n): + info = u16(n) + u8(6 + len(label)) + b"tls13 " + label + u8(len(ctx)) + ctx + out, t, i = b"", b"", 1 + while len(out) < n: + t = hmac.new(secret, t + info + u8(i), hashlib.sha256).digest() + out += t + i += 1 + return out[:n] + + +def extract(salt, ikm): return hmac.new(salt, ikm, hashlib.sha256).digest() + + +def pki(): + """root -> int -> leaf, P-256, valid 2025..2049, leaf SAN www.example.test""" + nb = datetime.datetime(2025, 1, 1, tzinfo=datetime.timezone.utc) + na = datetime.datetime(2049, 12, 31, tzinfo=datetime.timezone.utc) + keys = [ec.generate_private_key(ec.SECP256R1()) for _ in range(3)] + names = [x509.Name([x509.NameAttribute(NameOID.COMMON_NAME, n)]) + for n in ("omfz root", "omfz int", "www.example.test")] + certs = [] + for i in range(3): + b = (x509.CertificateBuilder().subject_name(names[i]) + .issuer_name(names[max(i - 1, 0)]).public_key(keys[i].public_key()) + .serial_number(1000 + i).not_valid_before(nb).not_valid_after(na)) + ca = i < 2 + b = b.add_extension(x509.BasicConstraints(ca=ca, path_length=None), critical=True) + b = b.add_extension(x509.KeyUsage( + digital_signature=not ca, content_commitment=False, key_encipherment=False, + data_encipherment=False, key_agreement=False, key_cert_sign=ca, crl_sign=ca, + encipher_only=False, decipher_only=False), critical=True) + if not ca: + b = b.add_extension(x509.SubjectAlternativeName([x509.DNSName(HOST.decode())]), False) + b = b.add_extension(x509.ExtendedKeyUsage([ExtendedKeyUsageOID.SERVER_AUTH]), False) + certs.append(b.sign(keys[max(i - 1, 0)], hashes.SHA256())) + der = [c.public_bytes(serialization.Encoding.DER) for c in certs] + pem = certs[0].public_bytes(serialization.Encoding.PEM) + return der, keys[2], pem + + +def entry(d): return u24(len(d)) + d + b"\x00\x00" + + +def cvsig(key, th): + content = b"\x20" * 64 + b"TLS 1.3, server CertificateVerify\x00" + th + return key.sign(content, ec.ECDSA(hashes.SHA256())), content + + +class Out: + def __init__(self, root): + self.root = root + self.n = 0 + + def put(self, target, name, data): + d = os.path.join(self.root, target) + os.makedirs(d, exist_ok=True) + open(os.path.join(d, name), "wb").write(data) + self.n += 1 + + +def flight(o, ch, der, key, suite): + """fz_flight: R raw chunks for the ClientHello ch (tls_mkch made deterministic by fz_detch)""" + sk = x25519.X25519PrivateKey.from_private_bytes(fill(32, 7)) + spub = sk.public_key().public_bytes(serialization.Encoding.Raw, serialization.PublicFormat.Raw) + cpub = ch[ch.index(b"\x00\x1d\x00\x20") + 4:][:32] + shared = sk.exchange(x25519.X25519PublicKey.from_public_bytes(cpub)) + sid = ch[39:71] + ext = (u16(43) + u16(2) + b"\x03\x04" + u16(51) + u16(36) + u16(29) + u16(32) + spub) + sh = msg(2, b"\x03\x03" + fill(32, 150) + u8(32) + sid + u16(suite) + b"\x00" + + u16(len(ext)) + ext) + z = b"\x00" * 32 + early = extract(z, z) + hs = extract(expand_label(early, b"derived", h256(b""), 32), shared) + shts = expand_label(hs, b"s hs traffic", h256(ch + sh), 32) + alpn = u16(16) + u16(11) + u16(9) + u8(8) + b"http/1.1" + ee = msg(8, u16(len(alpn)) + alpn) + lst = b"".join(entry(d) for d in (der[2], der[1])) + cert = msg(11, b"\x00" + u24(len(lst)) + lst) + sig, _ = cvsig(key, h256(ch + sh + ee + cert)) + cv = msg(15, u16(0x0403) + u16(len(sig)) + sig) + fk = expand_label(shts, b"finished", b"", 32) + fin = msg(20, hmac.new(fk, h256(ch + sh + ee + cert + cv), hashlib.sha256).digest()) + raw = rec(22, sh) + rec(20, b"\x01") + tag = "chacha" if suite == 0x1303 else "aes" + pre = u16(len(raw)) + raw + o.put("fz_flight", f"full_{tag}", pre + chunk(22, ee + cert + cv + fin)) + o.put("fz_flight", f"split_{tag}", pre + b"".join(chunk(22, m) for m in (ee, cert, cv, fin))) + frag = ee + cert + cv + fin + o.put("fz_flight", f"frag_{tag}", pre + b"".join(chunk(22, frag[i:i + 300]) + for i in range(0, len(frag), 300))) + cr = msg(13, b"\x00" + u16(8) + u16(13) + u16(4) + u16(2) + u16(0x0403)) + o.put("fz_flight", f"cr_{tag}", pre + chunk(22, ee + cr + cert + cv + fin)) + o.put("fz_flight", f"pad_{tag}", pre + chunk(22, ee) + chunk(0, b"") + chunk(22, cert + cv + fin)) + o.put("fz_flight", f"alert_{tag}", pre + chunk(22, ee) + chunk(21, b"\x02\x28")) + o.put("fz_flight", f"shonly_{tag}", u16(len(rec(22, sh))) + rec(22, sh)) + hrr = msg(2, b"\x03\x03" + h256(b"HelloRetryRequest") + u8(32) + sid + u16(suite) + b"\x00" + + u16(12) + u16(43) + u16(2) + b"\x03\x04" + u16(51) + u16(2) + u16(29)) + o.put("fz_flight", f"hrr_{tag}", u16(len(rec(22, hrr))) + rec(22, hrr)) + return sh, ee, cert, cv + + +def hs(o, der, key): + """fz_hs: S message, against fixed state (TLSID zero, TLSHS 33.., transcript hash 217..)""" + spub = fill(32, 9) + ext = (u16(43) + u16(2) + b"\x03\x04" + u16(51) + u16(36) + u16(29) + u16(32) + spub) + for suite in (0x1301, 0x1303): + o.put("fz_hs", f"sh_{suite:04x}", u8(0) + msg(2, b"\x03\x03" + fill(32, 1) + u8(32) + + b"\x00" * 32 + u16(suite) + b"\x00" + + u16(len(ext)) + ext)) + v = {} + for line in open(os.path.join(TEST, "tls", "vectors", "rfc8448-1rtt.txt")): + p = line.split() + if len(p) == 2 and not line.startswith("#"): + v[p[0]] = bytes.fromhex(p[1]) if all(c in "0123456789abcdef" for c in p[1]) else None + o.put("fz_hs", "sh_rfc8448", u8(0) + v["sh"]) + o.put("fz_hs", "ee_rfc8448", u8(1) + v["ee"]) + alpn = u16(16) + u16(11) + u16(9) + u8(8) + b"http/1.1" + o.put("fz_hs", "ee_alpn", u8(1) + msg(8, u16(len(alpn)) + alpn)) + o.put("fz_hs", "cr", u8(2) + msg(13, b"\x00" + u16(8) + u16(13) + u16(4) + u16(2) + u16(0x0403))) + lst = b"".join(entry(d) for d in (der[2], der[1])) + o.put("fz_hs", "cert_own", u8(3) + msg(11, b"\x00" + u24(len(lst)) + lst)) + o.put("fz_hs", "cert_rfc8448", u8(3) + v["cert"]) + sig, _ = cvsig(key, fill(32, 217)) + le = entry(der[2]) + o.put("fz_hs", "cv_own", u8(4) + u16(len(le)) + le + msg(15, u16(0x0403) + u16(len(sig)) + sig)) + fk = expand_label(fill(32, 33), b"finished", b"", 32) + o.put("fz_hs", "sfin", u8(5) + msg(20, hmac.new(fk, fill(32, 217), hashlib.sha256).digest())) + o.put("fz_hs", "kupd0", u8(6) + msg(24, b"\x00")) + o.put("fz_hs", "kupd1", u8(6) + msg(24, b"\x01")) + nst = msg(4, fill(4, 0) + fill(4, 4) + u8(8) + fill(8, 8) + u16(16) + fill(16, 16) + u16(0)) + o.put("fz_hs", "post_nst", u8(7) + nst) + o.put("fz_hs", "post_nst2_ku", u8(7) + nst + nst + msg(24, b"\x00")) + o.put("fz_hs", "post_split", u8(7) + nst[:5]) + + +def x509s(o, der): + """fz_x509: M rest (0 parse, 1 chain, 2 time+host+chain, 3 CertificateVerify)""" + for sub in ("pki", "real", "crafted"): + d = os.path.join(TEST, "x509", "vectors", sub) + for f in sorted(os.listdir(d)): + if f.endswith(".der") and os.path.getsize(os.path.join(d, f)) <= 8192: + o.put("fz_x509", f"p_{sub}_{f[:-4]}", u8(0) + rd(d, f)) + own = b"".join(entry(d) for d in (der[2], der[1])) + rsa = entry(rd(PKI, "lR.der")) + entry(rd(PKI, "intR.der")) + o.put("fz_x509", "c_own", u8(1) + own) + o.put("fz_x509", "c_rsa", u8(1) + rsa) + for name, now, host in (("hq_own", NOW, HOST), ("hq_late", 4102444800, HOST), + ("hq_other", NOW, b"other.example.test")): + o.put("fz_x509", name, u8(2) + now.to_bytes(8, "big") + + u8(len(host)) + host + own) + for leaf, sch, sig in (("lE256", 0x0403, "cv_e256"), ("lE384", 0x0503, "cv_e384"), + ("lR", 0x0804, "cv_r256"), ("lPSS384", 0x0805, "cv_r384"), + ("lPSS512", 0x0806, "cv_r512")): + e = entry(rd(PKI, leaf + ".der")) + o.put("fz_x509", f"cv_{leaf}", u8(3) + u16(sch) + u16(len(e)) + e + + rd(PKI, "cv.msg") + rd(PKI, sig + ".sig")) + + +def pems(o): + """fz_pem: a PEM bundle (argument 1 = a certificate_list file)""" + for f in ("storeAll.pem", "storeR.pem", "storeE.pem", "storeBad.pem", "storeDup.pem", + "storeInt.pem", "storeX.pem"): + o.put("fz_pem", f[:-4], rd(PKI, f)) + + +def dns(o): + """fz_dns: M rest; M even: H name[H] response (dns_parse of dns_query id 0x4f4d), odd: resolv.conf""" + for i, line in enumerate(open(os.path.join(TEST, "tls", "vectors", "dns.txt"))): + p = line.split() + if len(p) == 4 and p[0] in ("0", "E"): + h = p[2].encode() + o.put("fz_dns", f"r{i:02d}", u8(0) + u8(min(len(h), 255)) + h[:255] + bytes.fromhex(p[3])) + elif len(p) == 2 and p[0] == "L": + o.put("fz_dns", f"l{i:02d}", u8(0) + u8(min(len(p[1]), 255)) + p[1].encode()[:255]) + for i, t in enumerate((b"nameserver 192.0.2.53\n", + b"# c\nsearch example.test\nnameserver 10.0.0.1\nnameserver ::1\n", + b"options ndots:1\nnameserver\t127.0.0.53 \n", + b"nameserver 256.1.1.1\nnameserver 1.2.3\n")): + o.put("fz_dns", f"conf{i}", u8(1) + t) + + +def http(o): + """fz_http: M message (0 response, 1 response to HEAD, 2 request); check.py's hand cases""" + spec = importlib.util.spec_from_file_location("check", os.path.join(REPO, "seed", "net", + "tests", "check.py")) + m = importlib.util.module_from_spec(spec) + spec.loader.exec_module(m) + for i, (mode, b, _) in enumerate(m.hand_cases()): + o.put("fz_http", f"hand{i:02d}", u8({"s": 0, "h": 1, "q": 2}[mode]) + b) + + +def https(o): + """fz_https: M chunks (M bit 0 HEAD, bit 1 AES), established keys, sealed by the mirror""" + r1 = b"HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\nhello" + r2 = b"HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n0\r\n\r\n" + r3 = b"HTTP/1.1 100 Continue\r\n\r\nHTTP/1.0 200 OK\r\n\r\nbody to close" + close = chunk(21, b"\x01\x00") + nst = msg(4, fill(4, 0) + fill(4, 4) + u8(8) + fill(8, 8) + u16(16) + fill(16, 16) + u16(0)) + for m in (0, 2): + tag = "aes" if m else "chacha" + o.put("fz_https", f"cl_{tag}", u8(m) + chunk(23, r1) + close) + o.put("fz_https", f"chunked_{tag}", u8(m) + chunk(23, r2[:20]) + chunk(23, r2[20:]) + close) + o.put("fz_https", f"interim_{tag}", u8(m) + chunk(23, r3) + close) + o.put("fz_https", f"nst_ku_{tag}", u8(m) + chunk(22, nst) + chunk(22, msg(24, b"\x01")) + + chunk(23, r1) + close) + o.put("fz_https", f"pad_{tag}", u8(m) + chunk(23, b"") + chunk(23, r1) + close) + o.put("fz_https", f"trunc_{tag}", u8(m) + chunk(23, r1[:30])) + o.put("fz_https", f"raw_{tag}", u8(m) + chunk(128, rec(23, b"\x00" * 20))) + o.put("fz_https", "head", u8(1) + chunk(23, r1[:-5]) + close) + + +def main(): + if len(sys.argv) != 3: + sys.exit("usage: gen_seeds.py OUTDIR CHFILE") + o = Out(sys.argv[1]) + ch = open(sys.argv[2], "rb").read() + der, key, root = pki() + open(os.path.join(sys.argv[1], "fzstore.pem"), "wb").write(rd(PKI, "storeAll.pem") + root) + flight(o, ch, der, key, 0x1303) + flight(o, ch, der, key, 0x1301) + hs(o, der, key) + x509s(o, der) + pems(o) + o.put("fz_pem", "own_root", root) + open(os.path.join(sys.argv[1], "chain.bin"), "wb").write( + b"".join(entry(d) for d in (der[2], der[1]))) + dns(o) + o.put("fz_plant", "plain", u8(0) + b"abcd") # no byte of "OMFZ": the fuzzer climbs all four + http(o) + https(o) + print(f"gen_seeds: {o.n} seeds in {sys.argv[1]}") + + +if __name__ == "__main__": + main() diff --git a/om/tls/test/fuzz/oss-fuzz/Dockerfile b/om/tls/test/fuzz/oss-fuzz/Dockerfile new file mode 100644 index 000000000..95ff43509 --- /dev/null +++ b/om/tls/test/fuzz/oss-fuzz/Dockerfile @@ -0,0 +1,6 @@ +# DRAFT (never submitted). https://google.github.io/oss-fuzz/getting-started/new-project-guide/ +FROM gcr.io/oss-fuzz-base/base-builder +RUN apt-get update && apt-get install -y qemu-user-static zip +RUN git clone --depth 1 --branch audit/tls-fuzz https://github.com/aien-dev/omega-mv.git omega-mv +WORKDIR omega-mv +COPY om/tls/test/fuzz/oss-fuzz/build.sh $SRC/ diff --git a/om/tls/test/fuzz/oss-fuzz/build.sh b/om/tls/test/fuzz/oss-fuzz/build.sh new file mode 100644 index 000000000..6bf1e8bef --- /dev/null +++ b/om/tls/test/fuzz/oss-fuzz/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash -eu +# DRAFT (never submitted). OSS-Fuzz / ClusterFuzzLite build: compile each om/tls fuzz target with the pinned +# omc (aarch64, run through qemu-aarch64-static), then one labelled host-tooling libFuzzer driver per target. +# Guide: https://google.github.io/oss-fuzz/getting-started/new-project-guide/ +cd "$SRC/omega-mv" +F=om/tls/test/fuzz +for t in fz_flight fz_hs fz_x509 fz_pem fz_dns fz_http fz_https; do + cat seed/net/http.om seed/net/https.om $F/common.om $F/$t.om > "$WORK/$t.prog.om" + sh om/tls/build.sh "qemu-aarch64-static seed/out/omc" "$WORK/$t.prog.om" "$OUT/$t.om.bin" + $CC $CFLAGS -c $F/oss-fuzz/omexec_fuzzer.c -o "$WORK/omexec.o" + $CXX $CXXFLAGS "$WORK/omexec.o" $LIB_FUZZING_ENGINE -o "$OUT/$t" + case $t in fz_flight|fz_hs|fz_x509) a=fzstore.pem;; fz_pem) a=chain.bin;; *) a=;; esac + [ -n "$a" ] && cp $F/seeds/$a "$OUT/$a" + printf '[libfuzzer]\nmax_len = 65536\n' > "$OUT/$t.options" + [ -n "$a" ] && printf '%s\n' "$OUT/$a" > "$OUT/$t.arg" + (cd $F/seeds/$t && zip -q "$OUT/${t}_seed_corpus.zip" *) +done diff --git a/om/tls/test/fuzz/oss-fuzz/omexec_fuzzer.c b/om/tls/test/fuzz/oss-fuzz/omexec_fuzzer.c new file mode 100644 index 000000000..5c92a96da --- /dev/null +++ b/om/tls/test/fuzz/oss-fuzz/omexec_fuzzer.c @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: Apache-2.0 +// HOST TOOLING, not part of the Omega library: a libFuzzer entry point that runs one compiled +// om/tls fuzz target (aarch64, under qemu-aarch64-static on the amd64 OSS-Fuzz/ClusterFuzzLite +// builders) on the input and aborts when the target exits >= 100 (an Omega trap), so the +// infrastructure records it as a crash. libFuzzer sees coverage of this driver only, not of the +// .om code: under this driver the campaign is black-box (stated in NOTES and the PR). +// Driver $OUT/fz_X runs $OUT/fz_X.om.bin with argument $OUT/fz_X.arg's content (if present). +#include +#include +#include +#include +#include +#include +#include + +static char tgt[4096], arg[4096]; + +int LLVMFuzzerInitialize(int *argc, char ***argv) { + snprintf(tgt, sizeof tgt, "%s.om.bin", (*argv)[0]); + char af[4096]; + snprintf(af, sizeof af, "%s.arg", (*argv)[0]); + FILE *f = fopen(af, "r"); + if (f) { + if (fgets(arg, sizeof arg, f)) arg[strcspn(arg, "\n")] = 0; + fclose(f); + } + return 0; +} + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + int p[2]; + if (pipe(p)) abort(); + pid_t pid = fork(); + if (pid == 0) { + dup2(p[0], 0); close(p[0]); close(p[1]); + int n = open("/dev/null", O_WRONLY); dup2(n, 1); dup2(n, 2); + if (arg[0]) execl("/usr/bin/qemu-aarch64-static", "qemu-aarch64-static", tgt, arg, (char *)0); + else execl("/usr/bin/qemu-aarch64-static", "qemu-aarch64-static", tgt, (char *)0); + _exit(127); + } + close(p[0]); + for (size_t o = 0; o < size;) { ssize_t w = write(p[1], data + o, size - o); if (w <= 0) break; o += (size_t)w; } + close(p[1]); + int st = 0; + waitpid(pid, &st, 0); + if (WIFSIGNALED(st) || (WIFEXITED(st) && WEXITSTATUS(st) >= 100 && WEXITSTATUS(st) != 127)) abort(); + return 0; +} diff --git a/om/tls/test/fuzz/oss-fuzz/project.yaml b/om/tls/test/fuzz/oss-fuzz/project.yaml new file mode 100644 index 000000000..0ae0db0d4 --- /dev/null +++ b/om/tls/test/fuzz/oss-fuzz/project.yaml @@ -0,0 +1,9 @@ +# DRAFT (never submitted). Fields per https://google.github.io/oss-fuzz/getting-started/new-project-guide/ +homepage: "https://github.com/aien-dev/omega-mv" +language: c +primary_contact: "aien@aienos.com" +main_repo: "https://github.com/aien-dev/omega-mv" +fuzzing_engines: + - libfuzzer +sanitizers: + - address diff --git a/om/tls/test/fuzz/run.sh b/om/tls/test/fuzz/run.sh new file mode 100755 index 000000000..c14f3f6d1 --- /dev/null +++ b/om/tls/test/fuzz/run.sh @@ -0,0 +1,166 @@ +#!/bin/sh +# SPDX-License-Identifier: Apache-2.0 +# om/tls/test/fuzz/run.sh: orchestration for the om/tls fuzz targets (fz_*.om). The targets are +# Omega; this script only builds, replays and drives AFL++ (qemu_mode, binary-only coverage). +# A trap in a target exits 100+code (code 1..14); exit >= 100 on any input is a crash, because +# om/tls/README.md requires that untrusted input never traps. +# +# sh run.sh [STAGE...] stages: build replay plant fuzz cmin triage service (default: build replay plant) +# +# Environment: +# OMC pinned compiler (default seed/out/omc) +# AFLPP AFL++ v4.40c tree with aflpp-exitrange.patch and qemu_mode built (sh aflpp.sh) +# OUT scratch dir (default /tmp/omtls-fuzz) +# FUZZ_HOURS one-shot campaign length over all targets (default 0 = skip the fuzz stage) +# FUZZ_TARGETS targets (default: all eight + fz_plant for plant) +# FUZZ_CPUS worker cpus, at most 2 (default "10 11"; never the X925 cores 5-9, 15-19) +# PLANT_S blind planted-control budget, seconds (default 1800) +# FUZZ_CORPUS / FUZZ_CRASHES / FUZZ_BOARD service + triage locations +# FUZZ_SLICE_S service time per target before rotating (default 3600) +set -u +D=$(cd -P "$(dirname "$0")" && pwd -P) +R=$(cd "$D/../../../.." && pwd) +OMC=${OMC:-$R/seed/out/omc} +AFLPP=${AFLPP:-$HOME/.local/lib/aflpp-4.40c} +OUT=${OUT:-/tmp/omtls-fuzz} +HOURS=${FUZZ_HOURS:-0} +TARGETS=${FUZZ_TARGETS:-fz_flight fz_hs fz_x509 fz_pem fz_dns fz_http fz_https} +CPUS=${FUZZ_CPUS:-10 11} +H=${HOME:-/home/drakestapleton} +CORPUS=${FUZZ_CORPUS:-$H/handoffs/TlsProof/fuzz/corpus} +CRASHES=${FUZZ_CRASHES:-$H/handoffs/TlsProof/crashes} +BOARD=${FUZZ_BOARD:-$H/handoffs/BOARD.md} +S=$D/seeds +NICE="nice -n 19 ionice -c3" +fails=0 +say() { echo "$*"; } +bad() { echo "FAIL $*"; fails=$((fails+1)); } + +for c in $CPUS; do case $c in 5|6|7|8|9|15|16|17|18|19) echo "refused: cpu $c is an X925 core" >&2; exit 2;; esac; done +[ "$(echo $CPUS | wc -w)" -le 2 ] || { echo "refused: at most 2 workers" >&2; exit 2; } + +# target argument: chain-verifying targets read the fuzz trust store, fz_pem a chain file +targ() { case $1 in fz_flight|fz_hs|fz_x509) echo "$S/fzstore.pem";; fz_pem) echo "$S/chain.bin";; *) echo "";; esac; } + +afl_env() { + export AFL_PATH=$AFLPP AFL_CRASH_EXITCODE=101-114 AFL_NO_UI=1 AFL_SKIP_CPUFREQ=1 \ + AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 AFL_AUTORESUME=1 +} + +build() { + mkdir -p "$OUT/bin" + say "omc sha256 $(sha256sum "$OMC" | cut -c1-64)" + for t in $TARGETS fz_plant; do + cat "$R/seed/net/http.om" "$R/seed/net/https.om" "$D/common.om" "$D/$t.om" > "$OUT/bin/$t.prog.om" + if $NICE sh "$R/om/tls/build.sh" "$OMC" "$OUT/bin/$t.prog.om" "$OUT/bin/$t" > "$OUT/bin/$t.build.log" 2>&1 + then say "built $t $(sha256sum "$OUT/bin/$t" | cut -c1-16)"; else bad "build $t (see $OUT/bin/$t.build.log)"; fi + done +} + +# run1 TARGET FILE -> sets ex (exit status) and rc (the fz_say depth code, if any) +run1() { + a=$(targ "$1"); timeout 20 "$OUT/bin/$1" $a < "$2" > /dev/null 2> "$OUT/err"; ex=$? + rc=$(sed -n 's/^rc \([0-9]*\)$/\1/p' "$OUT/err" | tail -1) +} + +# replay: every seed and every regression input must exit < 100; depth codes must match seeds/EXPECT +replay() { + exp=${1:-$S/EXPECT}; n=0 + for t in $TARGETS; do + for f in "$S/$t"/* "$D/regress/$t"/*; do + [ -f "$f" ] || continue; run1 "$t" "$f"; n=$((n+1)) + [ "$ex" -ge 100 ] && bad "replay $t $(basename "$f") exit $ex (trap $((ex-100)))" + [ "$ex" -eq 124 ] && bad "replay $t $(basename "$f") timeout" + w=$(awk -v t="$t" -v s="$(basename "$f")" '$1==t && $2==s {print $3}' "$exp") + [ -n "$w" ] && [ "$w" != "$rc" ] && bad "replay $t $(basename "$f") rc $rc expected $w" + done + done + say "replayed $n inputs" +} + +# plant: the planted defect must trap natively, and AFL must find it blind from \0abcd +plant() { + printf '\0OMFZ' > "$OUT/hit"; run1 fz_plant "$OUT/hit" + [ "$ex" -eq 103 ] && say "PASS plant native exit 103" || bad "plant native exit $ex, want 103" + printf '\0OMFY' > "$OUT/miss"; run1 fz_plant "$OUT/miss" + [ "$ex" -eq 0 ] && say "PASS plant near-miss exit 0" || bad "plant near-miss exit $ex, want 0" + # negative control for replay: a corrupted expectation must FAIL + awk 'NR==1 {$3 = ($3 == "000") ? "999" : "000"} {print}' "$S/EXPECT" > "$OUT/EXPECT.bad" + f0=$fails; replay "$OUT/EXPECT.bad" > "$OUT/negctl.log"; f1=$fails; fails=$f0 + [ "$f1" -gt "$f0" ] && say "PASS replay negative control (corrupted EXPECT line 1 fails)" || bad "replay negative control did not fail" + afl_env; c=$(echo $CPUS | cut -d' ' -f1); rm -rf "$OUT/plant" + AFL_BENCH_UNTIL_CRASH=1 $NICE timeout "${PLANT_S:-1800}" "$AFLPP/afl-fuzz" -Q -c 0 -b "$c" \ + -i "$S/fz_plant" -o "$OUT/plant" -t 2000 -- "$OUT/bin/fz_plant" > "$OUT/plant.log" 2>&1 + stats fz_plant "$OUT/plant/default" + k=$(ls "$OUT/plant/default/crashes" 2>/dev/null | grep -c '^id') + [ "$k" -ge 1 ] && say "PASS plant found blind ($k crash)" || bad "plant not found in ${PLANT_S:-1800} s" +} + +# stats TARGET DIR: one tsv line from fuzzer_stats +stats() { + f=$2/fuzzer_stats; [ -f "$f" ] || { say "stats $1 NOT_RUN"; return; } + g() { sed -n "s/^$1 *: //p" "$f"; } + printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n' "$1" "$(g run_time)" "$(g execs_done)" "$(g execs_per_sec)" \ + "$(g saved_crashes)" "$(g saved_hangs)" "$(g edges_found)" "$(g bitmap_cvg)" "$(g corpus_count)" | tee -a "$OUT/stats.tsv" +} + +fuzz() { + [ "$HOURS" = 0 ] && { say "fuzz NOT_RUN (FUZZ_HOURS=0)"; return; } + afl_env; nt=$(echo $TARGETS | wc -w); nc=$(echo $CPUS | wc -w) + secs=$(awk -v h="$HOURS" -v n="$nt" -v c="$nc" 'BEGIN{printf "%d", h*3600*c/n}') + printf 'target\trun_time\texecs\texecs_per_sec\tcrashes\thangs\tedges\tbitmap\tcorpus\n' > "$OUT/stats.tsv" + set -- $CPUS; i=0 + for t in $TARGETS; do + c=$1; [ $((i % nc)) -eq 1 ] && c=${2:-$1}; i=$((i+1)) + ( $NICE "$AFLPP/afl-fuzz" -Q -c 0 -b "$c" -V "$secs" -i "$S/$t" -o "$OUT/camp/$t" -t 5000 -- \ + "$OUT/bin/$t" $(targ "$t") > "$OUT/camp-$t.log" 2>&1 ) & + [ $((i % nc)) -eq 0 ] && wait + done + wait + for t in $TARGETS; do stats "$t" "$OUT/camp/$t/default"; done +} + +cmin() { + afl_env + for t in $TARGETS; do + q=$OUT/camp/$t/default/queue; [ -d "$q" ] || continue + rm -rf "$OUT/cmin/$t"; a=$(targ "$t") + $NICE "$AFLPP/afl-cmin" -Q -T 2 -i "$q" -o "$OUT/cmin/$t" -t 5000 -- "$OUT/bin/$t" $a > "$OUT/cmin-$t.log" 2>&1 + say "cmin $t $(ls "$q" | grep -c '^id') -> $(ls "$OUT/cmin/$t" 2>/dev/null | wc -l)" + done +} + +# triage: reproduce every saved crash natively, dedupe by (target, exit, sha256), copy, one BOARD line +triage() { + mkdir -p "$CRASHES"; new=0; tot=0 + for t in $TARGETS; do + for f in "$OUT"/camp/"$t"/default/crashes/id* "$CORPUS"/"$t"/default/crashes/id*; do + [ -f "$f" ] || continue; tot=$((tot+1)); run1 "$t" "$f" + if [ "$ex" -lt 100 ] || [ "$ex" -eq 124 ]; then say "triage $t $(basename "$f") does not reproduce natively (exit $ex)"; continue; fi + h=$(sha256sum "$f" | cut -c1-12); n=$CRASHES/$t-exit$ex-$h + [ -e "$n" ] || { cp "$f" "$n"; new=$((new+1)); say "triage NEW $n"; } + done + done + line="$(date -u +%Y-%m-%dT%H:%MZ) TlsProof.TlsFuzz: om/tls fuzz triage: $tot saved crashes, $new new unique reproduced (MEASURED $CRASHES)" + say "$line"; [ "${FUZZ_NO_BOARD:-0}" = 1 ] || echo "$line" >> "$BOARD" +} + +# service: persistent workers (one per cpu) rotating targets with AFL resume; the watchdog +# (service/fuzz-watchdog.sh) pauses/stops this unit +service() { + afl_env; mkdir -p "$CORPUS"; set -- $TARGETS; nt=$# + k=0 + for c in $CPUS; do + ( j=$k; while :; do + t=$(echo $TARGETS | cut -d' ' -f$((j % nt + 1))); j=$((j + 2)) + "$AFLPP/afl-fuzz" -Q -c 0 -b "$c" -V "${FUZZ_SLICE_S:-3600}" -i "$S/$t" -o "$CORPUS/$t" -t 5000 -- \ + "$OUT/bin/$t" $(targ "$t") >> "$CORPUS/$t.log" 2>&1 + done ) & + k=$((k+1)) + done + wait +} + +[ $# -eq 0 ] && set -- build replay plant +for st in "$@"; do case $st in build|replay|plant|fuzz|cmin|triage|service) $st ;; *) echo "unknown stage $st" >&2; exit 2;; esac; done +say "fails=$fails"; [ $fails -eq 0 ] diff --git a/om/tls/test/fuzz/seeds/EXPECT b/om/tls/test/fuzz/seeds/EXPECT new file mode 100644 index 000000000..048c7b1c2 --- /dev/null +++ b/om/tls/test/fuzz/seeds/EXPECT @@ -0,0 +1,133 @@ +fz_flight alert_aes 021 +fz_flight alert_chacha 021 +fz_flight cr_aes 019 +fz_flight cr_chacha 019 +fz_flight frag_aes 000 +fz_flight frag_chacha 000 +fz_flight full_aes 000 +fz_flight full_chacha 000 +fz_flight hrr_aes 013 +fz_flight hrr_chacha 013 +fz_flight pad_aes 007 +fz_flight pad_chacha 007 +fz_flight shonly_aes 004 +fz_flight shonly_chacha 004 +fz_flight split_aes 000 +fz_flight split_chacha 000 +fz_hs cert_own 000 +fz_hs cert_rfc8448 017 +fz_hs cr 000 +fz_hs cv_own 000 +fz_hs ee_alpn 000 +fz_hs ee_rfc8448 012 +fz_hs kupd0 000 +fz_hs kupd1 000 +fz_hs post_nst 000 +fz_hs post_nst2_ku 000 +fz_hs post_split 000 +fz_hs sfin 000 +fz_hs sh_1301 000 +fz_hs sh_1303 000 +fz_hs sh_rfc8448 014 +fz_x509 c_own 000 +fz_x509 c_rsa 000 +fz_x509 cv_lE256 000 +fz_x509 cv_lE384 000 +fz_x509 cv_lPSS384 000 +fz_x509 cv_lPSS512 000 +fz_x509 cv_lR 000 +fz_x509 hq_late 002 +fz_x509 hq_other 004 +fz_x509 hq_own 000 +fz_x509 p_crafted_intX6144 000 +fz_x509 p_crafted_intXe32 000 +fz_x509 p_crafted_intXnc 020 +fz_x509 p_crafted_lViaX6144 000 +fz_x509 p_crafted_lViaXe32 000 +fz_x509 p_crafted_lViaXnc 000 +fz_x509 p_crafted_lViaXncOut 000 +fz_x509 p_crafted_lX4096 000 +fz_x509 p_crafted_lX6144 000 +fz_x509 p_crafted_lXbase 000 +fz_x509 p_crafted_lXe1 000 +fz_x509 p_crafted_lXe3 000 +fz_x509 p_crafted_lXe32 000 +fz_x509 p_crafted_lXeven 000 +fz_x509 p_crafted_rootX 000 +fz_x509 p_crafted_uid_112 001 +fz_x509 p_crafted_uid_21 001 +fz_x509 p_crafted_uid_five 001 +fz_x509 p_crafted_uid_ok 000 +fz_x509 p_crafted_uid_one2 000 +fz_x509 p_crafted_uid_two1 001 +fz_x509 p_crafted_uid_two2 001 +fz_x509 p_pki_d1 000 +fz_x509 p_pki_d2 000 +fz_x509 p_pki_d3 000 +fz_x509 p_pki_d4 000 +fz_x509 p_pki_d5 000 +fz_x509 p_pki_d6 000 +fz_x509 p_pki_d7 000 +fz_x509 p_pki_d8 000 +fz_x509 p_pki_garbage 001 +fz_x509 p_pki_intE 000 +fz_x509 p_pki_intEKUc 000 +fz_x509 p_pki_intNC 020 +fz_x509 p_pki_intNoCA 000 +fz_x509 p_pki_intNoKU 000 +fz_x509 p_pki_intP0 000 +fz_x509 p_pki_intP0b 000 +fz_x509 p_pki_intPSS 000 +fz_x509 p_pki_intR 000 +fz_x509 p_pki_intRexp 000 +fz_x509 p_pki_l2050 000 +fz_x509 p_pki_lCA 000 +fz_x509 p_pki_lClient 000 +fz_x509 p_pki_lCrit 013 +fz_x509 p_pki_lD7 000 +fz_x509 p_pki_lD8 000 +fz_x509 p_pki_lE256 000 +fz_x509 p_pki_lE384 000 +fz_x509 p_pki_lE384b 000 +fz_x509 p_pki_lEd 000 +fz_x509 p_pki_lEint 000 +fz_x509 p_pki_lExp 000 +fz_x509 p_pki_lKUenc 000 +fz_x509 p_pki_lNoSAN 000 +fz_x509 p_pki_lNonCrit 000 +fz_x509 p_pki_lNyv 000 +fz_x509 p_pki_lPSS256 000 +fz_x509 p_pki_lPSS384 000 +fz_x509 p_pki_lPSS512 000 +fz_x509 p_pki_lPart 000 +fz_x509 p_pki_lR 000 +fz_x509 p_pki_lR1024 000 +fz_x509 p_pki_lR384 000 +fz_x509 p_pki_lR512 000 +fz_x509 p_pki_lRalgmis 018 +fz_x509 p_pki_lRbadsig 000 +fz_x509 p_pki_lRmin 000 +fz_x509 p_pki_lRpss 000 +fz_x509 p_pki_lRtrunc 001 +fz_x509 p_pki_lSHA1 000 +fz_x509 p_pki_lSelf 000 +fz_x509 p_pki_lViaEKUc 000 +fz_x509 p_pki_lViaExp 000 +fz_x509 p_pki_lViaNC 000 +fz_x509 p_pki_lViaNoCA 000 +fz_x509 p_pki_lViaNoKU 000 +fz_x509 p_pki_lViaP0 000 +fz_x509 p_pki_lViaPSS 000 +fz_x509 p_pki_lWild 000 +fz_x509 p_pki_lWild1 000 +fz_x509 p_pki_rootE 000 +fz_x509 p_pki_rootR 000 +fz_x509 p_pki_rootX 000 +fz_x509 p_real_api.github.com-1 000 +fz_x509 p_real_api.github.com-2 000 +fz_x509 p_real_api.github.com-3 000 +fz_x509 p_real_mail.gandi.net-1 000 +fz_x509 p_real_mail.gandi.net-2 000 +fz_x509 p_real_raw.githubusercontent.com-1 000 +fz_x509 p_real_raw.githubusercontent.com-2 000 +fz_x509 p_real_raw.githubusercontent.com-3 000 diff --git a/om/tls/test/fuzz/seeds/ch.bin b/om/tls/test/fuzz/seeds/ch.bin new file mode 100644 index 000000000..52091c4db Binary files /dev/null and b/om/tls/test/fuzz/seeds/ch.bin differ diff --git a/om/tls/test/fuzz/seeds/chain.bin b/om/tls/test/fuzz/seeds/chain.bin new file mode 100644 index 000000000..cc504608c Binary files /dev/null and b/om/tls/test/fuzz/seeds/chain.bin differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/conf0 b/om/tls/test/fuzz/seeds/fz_dns/conf0 new file mode 100644 index 000000000..9d48cd9d1 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_dns/conf0 @@ -0,0 +1 @@ +nameserver 192.0.2.53 diff --git a/om/tls/test/fuzz/seeds/fz_dns/conf1 b/om/tls/test/fuzz/seeds/fz_dns/conf1 new file mode 100644 index 000000000..4160ae197 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_dns/conf1 @@ -0,0 +1,4 @@ +# c +search example.test +nameserver 10.0.0.1 +nameserver ::1 diff --git a/om/tls/test/fuzz/seeds/fz_dns/conf2 b/om/tls/test/fuzz/seeds/fz_dns/conf2 new file mode 100644 index 000000000..4f37c9053 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_dns/conf2 @@ -0,0 +1,2 @@ +options ndots:1 +nameserver 127.0.0.53 diff --git a/om/tls/test/fuzz/seeds/fz_dns/conf3 b/om/tls/test/fuzz/seeds/fz_dns/conf3 new file mode 100644 index 000000000..7456dfc6f --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_dns/conf3 @@ -0,0 +1,2 @@ +nameserver 256.1.1.1 +nameserver 1.2.3 diff --git a/om/tls/test/fuzz/seeds/fz_dns/l44 b/om/tls/test/fuzz/seeds/fz_dns/l44 new file mode 100644 index 000000000..995ca703f Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/l44 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/l46 b/om/tls/test/fuzz/seeds/fz_dns/l46 new file mode 100644 index 000000000..d080aa414 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/l46 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r02 b/om/tls/test/fuzz/seeds/fz_dns/r02 new file mode 100644 index 000000000..f624a2eab Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r02 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r04 b/om/tls/test/fuzz/seeds/fz_dns/r04 new file mode 100644 index 000000000..4d3ac0e8b Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r04 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r06 b/om/tls/test/fuzz/seeds/fz_dns/r06 new file mode 100644 index 000000000..c403d520f Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r06 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r08 b/om/tls/test/fuzz/seeds/fz_dns/r08 new file mode 100644 index 000000000..8783676ed Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r08 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r10 b/om/tls/test/fuzz/seeds/fz_dns/r10 new file mode 100644 index 000000000..b76fc6069 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r10 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r12 b/om/tls/test/fuzz/seeds/fz_dns/r12 new file mode 100644 index 000000000..a7f7129bf Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r12 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r14 b/om/tls/test/fuzz/seeds/fz_dns/r14 new file mode 100644 index 000000000..0ed645a9e Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r14 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r16 b/om/tls/test/fuzz/seeds/fz_dns/r16 new file mode 100644 index 000000000..de0f3fcd5 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r16 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r18 b/om/tls/test/fuzz/seeds/fz_dns/r18 new file mode 100644 index 000000000..f3f043c8d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r18 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r20 b/om/tls/test/fuzz/seeds/fz_dns/r20 new file mode 100644 index 000000000..22a935d25 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r20 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r22 b/om/tls/test/fuzz/seeds/fz_dns/r22 new file mode 100644 index 000000000..2c3344af8 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r22 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r24 b/om/tls/test/fuzz/seeds/fz_dns/r24 new file mode 100644 index 000000000..c2462b733 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r24 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r26 b/om/tls/test/fuzz/seeds/fz_dns/r26 new file mode 100644 index 000000000..decdd4137 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r26 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r28 b/om/tls/test/fuzz/seeds/fz_dns/r28 new file mode 100644 index 000000000..715e19551 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r28 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r30 b/om/tls/test/fuzz/seeds/fz_dns/r30 new file mode 100644 index 000000000..378503533 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r30 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r32 b/om/tls/test/fuzz/seeds/fz_dns/r32 new file mode 100644 index 000000000..574d364fb Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r32 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r34 b/om/tls/test/fuzz/seeds/fz_dns/r34 new file mode 100644 index 000000000..1a37d76de Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r34 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r36 b/om/tls/test/fuzz/seeds/fz_dns/r36 new file mode 100644 index 000000000..a2964af18 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r36 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r38 b/om/tls/test/fuzz/seeds/fz_dns/r38 new file mode 100644 index 000000000..508f67581 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r38 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r40 b/om/tls/test/fuzz/seeds/fz_dns/r40 new file mode 100644 index 000000000..a8b65fc11 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r40 differ diff --git a/om/tls/test/fuzz/seeds/fz_dns/r42 b/om/tls/test/fuzz/seeds/fz_dns/r42 new file mode 100644 index 000000000..db8bd043e Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_dns/r42 differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/alert_aes b/om/tls/test/fuzz/seeds/fz_flight/alert_aes new file mode 100644 index 000000000..d539f1925 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/alert_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/alert_chacha b/om/tls/test/fuzz/seeds/fz_flight/alert_chacha new file mode 100644 index 000000000..53755c4da Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/alert_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/cr_aes b/om/tls/test/fuzz/seeds/fz_flight/cr_aes new file mode 100644 index 000000000..7a0f48feb Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/cr_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/cr_chacha b/om/tls/test/fuzz/seeds/fz_flight/cr_chacha new file mode 100644 index 000000000..93d7446ed Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/cr_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/frag_aes b/om/tls/test/fuzz/seeds/fz_flight/frag_aes new file mode 100644 index 000000000..17da87dd2 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/frag_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/frag_chacha b/om/tls/test/fuzz/seeds/fz_flight/frag_chacha new file mode 100644 index 000000000..058781532 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/frag_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/full_aes b/om/tls/test/fuzz/seeds/fz_flight/full_aes new file mode 100644 index 000000000..08144d0aa Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/full_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/full_chacha b/om/tls/test/fuzz/seeds/fz_flight/full_chacha new file mode 100644 index 000000000..92ab2d560 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/full_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/hrr_aes b/om/tls/test/fuzz/seeds/fz_flight/hrr_aes new file mode 100644 index 000000000..6fc69a6d1 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/hrr_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/hrr_chacha b/om/tls/test/fuzz/seeds/fz_flight/hrr_chacha new file mode 100644 index 000000000..62e244051 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/hrr_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/pad_aes b/om/tls/test/fuzz/seeds/fz_flight/pad_aes new file mode 100644 index 000000000..3ef992423 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/pad_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/pad_chacha b/om/tls/test/fuzz/seeds/fz_flight/pad_chacha new file mode 100644 index 000000000..fad030782 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/pad_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/shonly_aes b/om/tls/test/fuzz/seeds/fz_flight/shonly_aes new file mode 100644 index 000000000..81a632bb3 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/shonly_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/shonly_chacha b/om/tls/test/fuzz/seeds/fz_flight/shonly_chacha new file mode 100644 index 000000000..ba9bb05bf Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/shonly_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/split_aes b/om/tls/test/fuzz/seeds/fz_flight/split_aes new file mode 100644 index 000000000..80cd44230 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/split_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_flight/split_chacha b/om/tls/test/fuzz/seeds/fz_flight/split_chacha new file mode 100644 index 000000000..67999816b Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_flight/split_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/cert_own b/om/tls/test/fuzz/seeds/fz_hs/cert_own new file mode 100644 index 000000000..690751a0e Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/cert_own differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/cert_rfc8448 b/om/tls/test/fuzz/seeds/fz_hs/cert_rfc8448 new file mode 100644 index 000000000..2a22e509d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/cert_rfc8448 differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/cr b/om/tls/test/fuzz/seeds/fz_hs/cr new file mode 100644 index 000000000..da6010832 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/cr differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/cv_own b/om/tls/test/fuzz/seeds/fz_hs/cv_own new file mode 100644 index 000000000..d79b9d268 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/cv_own differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/ee_alpn b/om/tls/test/fuzz/seeds/fz_hs/ee_alpn new file mode 100644 index 000000000..928024384 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/ee_alpn differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/ee_rfc8448 b/om/tls/test/fuzz/seeds/fz_hs/ee_rfc8448 new file mode 100644 index 000000000..745fc4a6b Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/ee_rfc8448 differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/kupd0 b/om/tls/test/fuzz/seeds/fz_hs/kupd0 new file mode 100644 index 000000000..6ed4f144f Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/kupd0 differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/kupd1 b/om/tls/test/fuzz/seeds/fz_hs/kupd1 new file mode 100644 index 000000000..2504df582 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/kupd1 differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/post_nst b/om/tls/test/fuzz/seeds/fz_hs/post_nst new file mode 100644 index 000000000..250d666ad Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/post_nst differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/post_nst2_ku b/om/tls/test/fuzz/seeds/fz_hs/post_nst2_ku new file mode 100644 index 000000000..13a93010e Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/post_nst2_ku differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/post_split b/om/tls/test/fuzz/seeds/fz_hs/post_split new file mode 100644 index 000000000..f2b83cc68 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/post_split differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/sfin b/om/tls/test/fuzz/seeds/fz_hs/sfin new file mode 100644 index 000000000..4513958be Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/sfin differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/sh_1301 b/om/tls/test/fuzz/seeds/fz_hs/sh_1301 new file mode 100644 index 000000000..73fec3429 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/sh_1301 differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/sh_1303 b/om/tls/test/fuzz/seeds/fz_hs/sh_1303 new file mode 100644 index 000000000..5d204d485 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/sh_1303 differ diff --git a/om/tls/test/fuzz/seeds/fz_hs/sh_rfc8448 b/om/tls/test/fuzz/seeds/fz_hs/sh_rfc8448 new file mode 100644 index 000000000..b4b70158b Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_hs/sh_rfc8448 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand00 b/om/tls/test/fuzz/seeds/fz_http/hand00 new file mode 100644 index 000000000..1c7d0ebc6 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand00 @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand01 b/om/tls/test/fuzz/seeds/fz_http/hand01 new file mode 100644 index 000000000..470c28b07 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand01 @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand02 b/om/tls/test/fuzz/seeds/fz_http/hand02 new file mode 100644 index 000000000..e557d51e4 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand02 @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand03 b/om/tls/test/fuzz/seeds/fz_http/hand03 new file mode 100644 index 000000000..5fbe43e6b --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand03 @@ -0,0 +1,5 @@ + + +GET / HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand04 b/om/tls/test/fuzz/seeds/fz_http/hand04 new file mode 100644 index 000000000..25cb955ba --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand04 @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/om/tls/test/fuzz/seeds/fz_http/hand05 b/om/tls/test/fuzz/seeds/fz_http/hand05 new file mode 100644 index 000000000..9fe546e85 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand05 @@ -0,0 +1,2 @@ + + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand06 b/om/tls/test/fuzz/seeds/fz_http/hand06 new file mode 100644 index 000000000..a0daeec36 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand06 @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand07 b/om/tls/test/fuzz/seeds/fz_http/hand07 new file mode 100644 index 000000000..647f9633e --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand07 @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand08 b/om/tls/test/fuzz/seeds/fz_http/hand08 new file mode 100644 index 000000000..9af7de3b9 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand08 @@ -0,0 +1,3 @@ +get / HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand09 b/om/tls/test/fuzz/seeds/fz_http/hand09 new file mode 100644 index 000000000..c799639f6 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand09 @@ -0,0 +1,3 @@ +GET / http/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand10 b/om/tls/test/fuzz/seeds/fz_http/hand10 new file mode 100644 index 000000000..740f39897 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand10 @@ -0,0 +1,2 @@ +GET / HTTP/1.0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand100 b/om/tls/test/fuzz/seeds/fz_http/hand100 new file mode 100644 index 000000000..8166a6305 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand100 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand101 b/om/tls/test/fuzz/seeds/fz_http/hand101 new file mode 100644 index 000000000..ecd161cb5 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand101 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand102 b/om/tls/test/fuzz/seeds/fz_http/hand102 new file mode 100644 index 000000000..2ea7d990d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand102 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand103 b/om/tls/test/fuzz/seeds/fz_http/hand103 new file mode 100644 index 000000000..b64428c97 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand103 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand104 b/om/tls/test/fuzz/seeds/fz_http/hand104 new file mode 100644 index 000000000..011387c2c Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand104 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand11 b/om/tls/test/fuzz/seeds/fz_http/hand11 new file mode 100644 index 000000000..3fe613c49 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand11 @@ -0,0 +1,3 @@ +GET / HTTP/2.0 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand12 b/om/tls/test/fuzz/seeds/fz_http/hand12 new file mode 100644 index 000000000..3072e4d1e --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand12 @@ -0,0 +1,3 @@ +GET / HTTP/1.2 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand13 b/om/tls/test/fuzz/seeds/fz_http/hand13 new file mode 100644 index 000000000..6d883d84e --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand13 @@ -0,0 +1,3 @@ +GET / HTTP/1.x +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand14 b/om/tls/test/fuzz/seeds/fz_http/hand14 new file mode 100644 index 000000000..9358fcccd --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand14 @@ -0,0 +1,2 @@ +GET / HTTP/1.1 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand15 b/om/tls/test/fuzz/seeds/fz_http/hand15 new file mode 100644 index 000000000..7c12da1c1 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand15 @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host: a +Host: b + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand16 b/om/tls/test/fuzz/seeds/fz_http/hand16 new file mode 100644 index 000000000..32a9844ee --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand16 @@ -0,0 +1,5 @@ +GET / HTTP/1.1 +Host: a +X: 1 + folded + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand17 b/om/tls/test/fuzz/seeds/fz_http/hand17 new file mode 100644 index 000000000..30f3276d8 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand17 @@ -0,0 +1,5 @@ +GET / HTTP/1.1 +Host: a +X: 1 + folded + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand18 b/om/tls/test/fuzz/seeds/fz_http/hand18 new file mode 100644 index 000000000..d2c7970f7 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand18 @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host : a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand19 b/om/tls/test/fuzz/seeds/fz_http/hand19 new file mode 100644 index 000000000..0f8dd28cb --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand19 @@ -0,0 +1,3 @@ +GET / HTTP/1.1 + Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand20 b/om/tls/test/fuzz/seeds/fz_http/hand20 new file mode 100644 index 000000000..df061f1f1 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand20 @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host: a +Content-Length: 3 + +abc \ No newline at end of file diff --git a/om/tls/test/fuzz/seeds/fz_http/hand21 b/om/tls/test/fuzz/seeds/fz_http/hand21 new file mode 100644 index 000000000..188363e12 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand21 @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host: a +Content-Length: 3 +Transfer-Encoding: chunked + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand22 b/om/tls/test/fuzz/seeds/fz_http/hand22 new file mode 100644 index 000000000..10aed8a72 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand22 @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked +Content-Length: 3 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand23 b/om/tls/test/fuzz/seeds/fz_http/hand23 new file mode 100644 index 000000000..7c2a946b7 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand23 @@ -0,0 +1,6 @@ +POST / HTTP/1.1 +Host: a +Content-Length: 3 +Content-Length: 3 + +abc \ No newline at end of file diff --git a/om/tls/test/fuzz/seeds/fz_http/hand24 b/om/tls/test/fuzz/seeds/fz_http/hand24 new file mode 100644 index 000000000..14a264cb1 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand24 @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host: a +Content-Length: 3,3 + +abc \ No newline at end of file diff --git a/om/tls/test/fuzz/seeds/fz_http/hand25 b/om/tls/test/fuzz/seeds/fz_http/hand25 new file mode 100644 index 000000000..8ee8772f1 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand25 @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host: a +Content-Length: +3 + +abc \ No newline at end of file diff --git a/om/tls/test/fuzz/seeds/fz_http/hand26 b/om/tls/test/fuzz/seeds/fz_http/hand26 new file mode 100644 index 000000000..b4d45baf9 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand26 @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host: a +Content-Length: -1 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand27 b/om/tls/test/fuzz/seeds/fz_http/hand27 new file mode 100644 index 000000000..8630705b3 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand27 @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host: a +Content-Length: + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand28 b/om/tls/test/fuzz/seeds/fz_http/hand28 new file mode 100644 index 000000000..58c39c37c --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand28 @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host: a +Content-Length: 0x10 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand29 b/om/tls/test/fuzz/seeds/fz_http/hand29 new file mode 100644 index 000000000..7c033ff4b --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand29 @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host: a +Content-Length: 00000000000000000001 + +x \ No newline at end of file diff --git a/om/tls/test/fuzz/seeds/fz_http/hand30 b/om/tls/test/fuzz/seeds/fz_http/hand30 new file mode 100644 index 000000000..d02595814 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand30 @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host: a +Content-Length: 0000000000000000001 + +x \ No newline at end of file diff --git a/om/tls/test/fuzz/seeds/fz_http/hand31 b/om/tls/test/fuzz/seeds/fz_http/hand31 new file mode 100644 index 000000000..499df3a2f --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand31 @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host: a +Content-Length: 4097 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand32 b/om/tls/test/fuzz/seeds/fz_http/hand32 new file mode 100644 index 000000000..bdafdcdcb --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand32 @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host: a +Content-Length: 4096 + +zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz \ No newline at end of file diff --git a/om/tls/test/fuzz/seeds/fz_http/hand33 b/om/tls/test/fuzz/seeds/fz_http/hand33 new file mode 100644 index 000000000..c4e24a129 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand33 @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: gzip + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand34 b/om/tls/test/fuzz/seeds/fz_http/hand34 new file mode 100644 index 000000000..b6b5586d4 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand34 @@ -0,0 +1,4 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: gzip, chunked + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand35 b/om/tls/test/fuzz/seeds/fz_http/hand35 new file mode 100644 index 000000000..c741d9bf5 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand35 @@ -0,0 +1,6 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: Chunked + +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand36 b/om/tls/test/fuzz/seeds/fz_http/hand36 new file mode 100644 index 000000000..52bd4b45f --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand36 @@ -0,0 +1,7 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked +Transfer-Encoding: chunked + +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand37 b/om/tls/test/fuzz/seeds/fz_http/hand37 new file mode 100644 index 000000000..9b5eef39c --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand37 @@ -0,0 +1,5 @@ +POST / HTTP/1.0 +Transfer-Encoding: chunked + +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand38 b/om/tls/test/fuzz/seeds/fz_http/hand38 new file mode 100644 index 000000000..d515eaf8c --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand38 @@ -0,0 +1,8 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +3 +abc +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand39 b/om/tls/test/fuzz/seeds/fz_http/hand39 new file mode 100644 index 000000000..0ba590dcd --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand39 @@ -0,0 +1,8 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +3;x=y +abc +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand40 b/om/tls/test/fuzz/seeds/fz_http/hand40 new file mode 100644 index 000000000..b49913ed3 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand40 @@ -0,0 +1,8 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +3 +abc +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand41 b/om/tls/test/fuzz/seeds/fz_http/hand41 new file mode 100644 index 000000000..fd491a92d --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand41 @@ -0,0 +1,8 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +0000000000000003 +abc +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand42 b/om/tls/test/fuzz/seeds/fz_http/hand42 new file mode 100644 index 000000000..b1769d928 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand42 @@ -0,0 +1,8 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +000000000000003 +abc +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand43 b/om/tls/test/fuzz/seeds/fz_http/hand43 new file mode 100644 index 000000000..d35018774 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand43 @@ -0,0 +1,8 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +3 +abcX +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand44 b/om/tls/test/fuzz/seeds/fz_http/hand44 new file mode 100644 index 000000000..b9b77e675 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand44 @@ -0,0 +1,6 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +3 +ab \ No newline at end of file diff --git a/om/tls/test/fuzz/seeds/fz_http/hand45 b/om/tls/test/fuzz/seeds/fz_http/hand45 new file mode 100644 index 000000000..1d8b19edf --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand45 @@ -0,0 +1,10 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +1000 +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +1 +b +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand46 b/om/tls/test/fuzz/seeds/fz_http/hand46 new file mode 100644 index 000000000..117efca43 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand46 @@ -0,0 +1,12 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +1;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +X +1;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +X +1;aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +X +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand47 b/om/tls/test/fuzz/seeds/fz_http/hand47 new file mode 100644 index 000000000..b2d541be0 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand47 @@ -0,0 +1,606 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +1 +X +0 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand48 b/om/tls/test/fuzz/seeds/fz_http/hand48 new file mode 100644 index 000000000..50e638040 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand48 @@ -0,0 +1,9 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +0 +X-T: tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt +X-T: tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt +X-T: tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand49 b/om/tls/test/fuzz/seeds/fz_http/hand49 new file mode 100644 index 000000000..b6fe6d0f2 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand49 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand50 b/om/tls/test/fuzz/seeds/fz_http/hand50 new file mode 100644 index 000000000..22567afcc --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand50 @@ -0,0 +1,7 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +0 +X-T: 1 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand51 b/om/tls/test/fuzz/seeds/fz_http/hand51 new file mode 100644 index 000000000..e77a054f9 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand51 @@ -0,0 +1,8 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +0 +X-T: 1 + x + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand52 b/om/tls/test/fuzz/seeds/fz_http/hand52 new file mode 100644 index 000000000..871994fbf --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand52 @@ -0,0 +1,7 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +0 +X-T 1 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand53 b/om/tls/test/fuzz/seeds/fz_http/hand53 new file mode 100644 index 000000000..c0477c366 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand53 @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +0 diff --git a/om/tls/test/fuzz/seeds/fz_http/hand54 b/om/tls/test/fuzz/seeds/fz_http/hand54 new file mode 100644 index 000000000..b2be54080 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand54 @@ -0,0 +1,6 @@ +POST / HTTP/1.1 +Host: a +Transfer-Encoding: chunked + +x + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand55 b/om/tls/test/fuzz/seeds/fz_http/hand55 new file mode 100644 index 000000000..2ac756c48 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand55 @@ -0,0 +1,18 @@ +GET / HTTP/1.1 +Host: a +X0: v +X1: v +X2: v +X3: v +X4: v +X5: v +X6: v +X7: v +X8: v +X9: v +X10: v +X11: v +X12: v +X13: v +X14: v + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand56 b/om/tls/test/fuzz/seeds/fz_http/hand56 new file mode 100644 index 000000000..2faf42872 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand56 @@ -0,0 +1,19 @@ +GET / HTTP/1.1 +Host: a +X0: v +X1: v +X2: v +X3: v +X4: v +X5: v +X6: v +X7: v +X8: v +X9: v +X10: v +X11: v +X12: v +X13: v +X14: v +X15: v + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand57 b/om/tls/test/fuzz/seeds/fz_http/hand57 new file mode 100644 index 000000000..5739a10ed --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand57 @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host: a +X: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand58 b/om/tls/test/fuzz/seeds/fz_http/hand58 new file mode 100644 index 000000000..97944f12b Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand58 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand59 b/om/tls/test/fuzz/seeds/fz_http/hand59 new file mode 100644 index 000000000..d7e5d8a20 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand59 @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host: a +X: ab + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand60 b/om/tls/test/fuzz/seeds/fz_http/hand60 new file mode 100644 index 000000000..5b563570b --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand60 @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host: a +X: a€b + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand61 b/om/tls/test/fuzz/seeds/fz_http/hand61 new file mode 100644 index 000000000..d651edc74 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand61 @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host: a +X: a b + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand62 b/om/tls/test/fuzz/seeds/fz_http/hand62 new file mode 100644 index 000000000..06db70ec6 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand62 @@ -0,0 +1,3 @@ +GET /€ HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand63 b/om/tls/test/fuzz/seeds/fz_http/hand63 new file mode 100644 index 000000000..3fd7192d1 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand63 @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand64 b/om/tls/test/fuzz/seeds/fz_http/hand64 new file mode 100644 index 000000000..adf36eeda --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand64 @@ -0,0 +1,3 @@ +OPTIONS * HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand65 b/om/tls/test/fuzz/seeds/fz_http/hand65 new file mode 100644 index 000000000..0e9f2f1ca --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand65 @@ -0,0 +1,3 @@ +GET http://a/b HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand66 b/om/tls/test/fuzz/seeds/fz_http/hand66 new file mode 100644 index 000000000..6c976f30c --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand66 @@ -0,0 +1,3 @@ +GET a:b HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand67 b/om/tls/test/fuzz/seeds/fz_http/hand67 new file mode 100644 index 000000000..776356e38 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand67 @@ -0,0 +1,3 @@ +CONNECT a:443 HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand68 b/om/tls/test/fuzz/seeds/fz_http/hand68 new file mode 100644 index 000000000..29b8efc4e --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand68 @@ -0,0 +1,3 @@ +GET a:443 HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand69 b/om/tls/test/fuzz/seeds/fz_http/hand69 new file mode 100644 index 000000000..de2871a07 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand69 @@ -0,0 +1,6 @@ +POST / HTTP/1.1 +Host: a +Expect: 100-continue +Content-Length: 1 + +x \ No newline at end of file diff --git a/om/tls/test/fuzz/seeds/fz_http/hand70 b/om/tls/test/fuzz/seeds/fz_http/hand70 new file mode 100644 index 000000000..225275624 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand70 @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host: a +Expect: foo + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand71 b/om/tls/test/fuzz/seeds/fz_http/hand71 new file mode 100644 index 000000000..ca59768d0 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand71 @@ -0,0 +1,3 @@ +GET / HTTP/1.0 +Expect: foo + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand72 b/om/tls/test/fuzz/seeds/fz_http/hand72 new file mode 100644 index 000000000..69d934e8e --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand72 @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host: a +Connection: close + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand73 b/om/tls/test/fuzz/seeds/fz_http/hand73 new file mode 100644 index 000000000..93aa157ea --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand73 @@ -0,0 +1,4 @@ +GET / HTTP/1.1 +Host: a +Connection: keep-alive, Close + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand74 b/om/tls/test/fuzz/seeds/fz_http/hand74 new file mode 100644 index 000000000..18fbde3e1 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand74 @@ -0,0 +1,2 @@ +GET / HTTP/1.1 +Host: a diff --git a/om/tls/test/fuzz/seeds/fz_http/hand75 b/om/tls/test/fuzz/seeds/fz_http/hand75 new file mode 100644 index 000000000..4d67a32e1 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand75 @@ -0,0 +1,5 @@ +POST / HTTP/1.1 +Host: a +Content-Length: 5 + +ab \ No newline at end of file diff --git a/om/tls/test/fuzz/seeds/fz_http/hand76 b/om/tls/test/fuzz/seeds/fz_http/hand76 new file mode 100644 index 000000000..376174310 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand76 @@ -0,0 +1,3 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA / HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand77 b/om/tls/test/fuzz/seeds/fz_http/hand77 new file mode 100644 index 000000000..d0425fa8e --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand77 @@ -0,0 +1,3 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA / HTTP/1.1 +Host: a + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand78 b/om/tls/test/fuzz/seeds/fz_http/hand78 new file mode 100644 index 000000000..fe24beec8 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand78 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand79 b/om/tls/test/fuzz/seeds/fz_http/hand79 new file mode 100644 index 000000000..4f0ddf57b Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand79 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand80 b/om/tls/test/fuzz/seeds/fz_http/hand80 new file mode 100644 index 000000000..2dd067532 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand80 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand81 b/om/tls/test/fuzz/seeds/fz_http/hand81 new file mode 100644 index 000000000..8205526d5 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand81 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand82 b/om/tls/test/fuzz/seeds/fz_http/hand82 new file mode 100644 index 000000000..f626666a4 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand82 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand83 b/om/tls/test/fuzz/seeds/fz_http/hand83 new file mode 100644 index 000000000..c9a1ed5e5 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand83 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand84 b/om/tls/test/fuzz/seeds/fz_http/hand84 new file mode 100644 index 000000000..44c96a969 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand84 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand85 b/om/tls/test/fuzz/seeds/fz_http/hand85 new file mode 100644 index 000000000..a2030c118 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand85 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand86 b/om/tls/test/fuzz/seeds/fz_http/hand86 new file mode 100644 index 000000000..03f15dd4e Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand86 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand87 b/om/tls/test/fuzz/seeds/fz_http/hand87 new file mode 100644 index 000000000..eea3bf158 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand87 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand88 b/om/tls/test/fuzz/seeds/fz_http/hand88 new file mode 100644 index 000000000..e787a4b38 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand88 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand89 b/om/tls/test/fuzz/seeds/fz_http/hand89 new file mode 100644 index 000000000..99cc722f1 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand89 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand90 b/om/tls/test/fuzz/seeds/fz_http/hand90 new file mode 100644 index 000000000..f33bf3c03 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand90 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand91 b/om/tls/test/fuzz/seeds/fz_http/hand91 new file mode 100644 index 000000000..b51eeb07a Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand91 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand92 b/om/tls/test/fuzz/seeds/fz_http/hand92 new file mode 100644 index 000000000..d31e04060 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_http/hand92 @@ -0,0 +1,3 @@ +HTTP/1.1 200 OK +Content-Length: 10 + diff --git a/om/tls/test/fuzz/seeds/fz_http/hand93 b/om/tls/test/fuzz/seeds/fz_http/hand93 new file mode 100644 index 000000000..53aefa103 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand93 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand94 b/om/tls/test/fuzz/seeds/fz_http/hand94 new file mode 100644 index 000000000..8d78d79a4 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand94 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand95 b/om/tls/test/fuzz/seeds/fz_http/hand95 new file mode 100644 index 000000000..0ecbfa487 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand95 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand96 b/om/tls/test/fuzz/seeds/fz_http/hand96 new file mode 100644 index 000000000..a8ebc9250 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand96 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand97 b/om/tls/test/fuzz/seeds/fz_http/hand97 new file mode 100644 index 000000000..0e2faf240 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand97 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand98 b/om/tls/test/fuzz/seeds/fz_http/hand98 new file mode 100644 index 000000000..f76dd238a Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand98 differ diff --git a/om/tls/test/fuzz/seeds/fz_http/hand99 b/om/tls/test/fuzz/seeds/fz_http/hand99 new file mode 100644 index 000000000..fa2fc064c Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_http/hand99 differ diff --git a/om/tls/test/fuzz/seeds/fz_https/chunked_aes b/om/tls/test/fuzz/seeds/fz_https/chunked_aes new file mode 100644 index 000000000..b339600b1 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/chunked_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_https/chunked_chacha b/om/tls/test/fuzz/seeds/fz_https/chunked_chacha new file mode 100644 index 000000000..8b69a1bc9 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/chunked_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_https/cl_aes b/om/tls/test/fuzz/seeds/fz_https/cl_aes new file mode 100644 index 000000000..8299b6da2 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/cl_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_https/cl_chacha b/om/tls/test/fuzz/seeds/fz_https/cl_chacha new file mode 100644 index 000000000..817610955 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/cl_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_https/head b/om/tls/test/fuzz/seeds/fz_https/head new file mode 100644 index 000000000..0695e26ea Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/head differ diff --git a/om/tls/test/fuzz/seeds/fz_https/interim_aes b/om/tls/test/fuzz/seeds/fz_https/interim_aes new file mode 100644 index 000000000..ba96d4379 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/interim_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_https/interim_chacha b/om/tls/test/fuzz/seeds/fz_https/interim_chacha new file mode 100644 index 000000000..a1c1418ea Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/interim_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_https/nst_ku_aes b/om/tls/test/fuzz/seeds/fz_https/nst_ku_aes new file mode 100644 index 000000000..82c30ae68 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/nst_ku_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_https/nst_ku_chacha b/om/tls/test/fuzz/seeds/fz_https/nst_ku_chacha new file mode 100644 index 000000000..7e099ef43 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/nst_ku_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_https/pad_aes b/om/tls/test/fuzz/seeds/fz_https/pad_aes new file mode 100644 index 000000000..046b33bbd Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/pad_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_https/pad_chacha b/om/tls/test/fuzz/seeds/fz_https/pad_chacha new file mode 100644 index 000000000..0d9503e21 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/pad_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_https/raw_aes b/om/tls/test/fuzz/seeds/fz_https/raw_aes new file mode 100644 index 000000000..ce2f22565 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/raw_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_https/raw_chacha b/om/tls/test/fuzz/seeds/fz_https/raw_chacha new file mode 100644 index 000000000..4e1e2e574 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/raw_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_https/trunc_aes b/om/tls/test/fuzz/seeds/fz_https/trunc_aes new file mode 100644 index 000000000..e29af4341 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/trunc_aes differ diff --git a/om/tls/test/fuzz/seeds/fz_https/trunc_chacha b/om/tls/test/fuzz/seeds/fz_https/trunc_chacha new file mode 100644 index 000000000..356fddabb Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_https/trunc_chacha differ diff --git a/om/tls/test/fuzz/seeds/fz_pem/own_root b/om/tls/test/fuzz/seeds/fz_pem/own_root new file mode 100644 index 000000000..e85e05a50 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_pem/own_root @@ -0,0 +1,9 @@ +-----BEGIN CERTIFICATE----- +MIIBOjCB4aADAgECAgID6DAKBggqhkjOPQQDAjAUMRIwEAYDVQQDDAlvbWZ6IHJv +b3QwHhcNMjUwMTAxMDAwMDAwWhcNNDkxMjMxMDAwMDAwWjAUMRIwEAYDVQQDDAlv +bWZ6IHJvb3QwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARwexbPI2O7TtCoMFu6 +c7H2jZ/pDy4wcKNo08S1YExK5GPc+jeSmMZOqZGEOje/bdUY0OEFE+VZk2ug7Tr7 +NdIKoyMwITAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAKBggqhkjO +PQQDAgNIADBFAiEA+47lTm6e7685ASfHAXXsNKyq81WVnXrOhqXxuT3WbkECIFYZ +E4/DPJvzdJDQNlcBot0YWW7xCAT8ceGeKBhHOyHB +-----END CERTIFICATE----- diff --git a/om/tls/test/fuzz/seeds/fz_pem/storeAll b/om/tls/test/fuzz/seeds/fz_pem/storeAll new file mode 100644 index 000000000..acfe2a99a --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_pem/storeAll @@ -0,0 +1,51 @@ +-----BEGIN CERTIFICATE----- +MIIDCjCCAfKgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwJTEOMAwGA1UEAwwFcm9v +dFgxEzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAx +MDEwMDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RYMRMwEQYDVQQKDApvbXRscyB0ZXN0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjl/X0AtkVF3mbzHSa10F +niVY0XSWHJS8Qu3OKa37P5/z2lKNv2NjApJSpvAlrWpN2PXuzbzwP8AFdjyvC08x +HyWqzmDSSbwvZQP+ymDFWXcuhzYPvwclRZAQO5U7ksFhBRsFioS+I1JU5q/ZUYq/ +d4IDoDFf7tfHaSYJwB9rIcuRmGwsjB1Pk58ZHunOY5h2gV+ilPH1kab6J1ZQxhUM +0MLVnSe1kpKVyqJVy2OJYmip6Occ/p33RG5GAKAD435hJ1JUMzZthu1h+5hE3qij +DIrKbeu5v9rdK321wdXtAO1VskFhjSjdATNQxZG6ejYH+4t3Fpn8y1OR4nJa7bnM ++wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUNoddauw+9cAmaU6CYPxdy9f7GjQwDQYJKoZIhvcNAQELBQADggEBAEza +4qe8HG34kXBZpHuPAr478xNm5liobJ8mpbk7+NKg610Smgu0wBwYLL9F3fT/APq9 +KDOalVhNUGPk0xwADcI/Gaz2XIVwPmii4gJVAs9FTFwinLKrFGupjDTEntUGpoAW +kxRQBIcTKVw9UE+v4iqJx1NK7wcpf5FwUQSCLV9p7/fOqU7jK0zCl80DfZD1Uxtq +6K+s6WN+VtO4sCXEhxO6YHnVd0qT0dGPjE9mVREV10W7DEFfYZNha9uum54HMztS +5LCqUQt721f7a1e9NIHZ/esFBbfU2Ps/hKzv32wM5x/nS3kIZYlyoEKAjMWgNzCs +sxk653wZJatxyYjVxi0= +-----END CERTIFICATE----- +junk line outside any block +-----BEGIN CERTIFICATE----- +MIIBuzCCAUGgAwIBAgICEAEwCgYIKoZIzj0EAwMwJTEOMAwGA1UEAwwFcm9vdEUx +EzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAxMDEw +MDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RFMRMwEQYDVQQKDApvbXRscyB0ZXN0MHYw +EAYHKoZIzj0CAQYFK4EEACIDYgAE7mUb5cjD7iYnhrqfMq/bOd+lPiCCCo/wimon +KNlpJWz+x+uposHsc3WpDNK9olL7kX3F7wJLiYFHidqroJ6lBUcTDPHbBYhRiyDL +Isx0WRJ1Pd4FXWEYA1iEvGGo/uWVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud +DwEB/wQEAwIBBjAdBgNVHQ4EFgQU6C/LNgt4tWyn+MwtViVfiluelJUwCgYIKoZI +zj0EAwMDaAAwZQIxAIXKhAfq1zwi4QGzMVTLHNcy0CcxjkKQM1GiVbSMeaawXx1p +9HVKYlQWkFBUhkb2bAIwAQUMcHtlu6Cl+x/OrxwdfnQw78PgIzx+csJFU6I193Q0 +GpIYrP4uuOF5HF26Gch5 +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIDCjCCAfKgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwJTEOMAwGA1UEAwwFcm9v +dFIxEzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAx +MDEwMDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RSMRMwEQYDVQQKDApvbXRscyB0ZXN0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAre1Rf0TRY8RRqTMIeTpA +GQuJqjhsDxnXb6Ry4yYkspJ75DniN6beX7yqBERchCJVP0iF+VAwLwdykTKPwSSK +75hR6U7LQE6IHV9QGX0VlCV1juLud1m+EJKfmGTnej/W1lmhbRopwFbYaCDvn0mj +V7GJQHO/l5rPemJ7L+/XKoK9ruwMA6NNcbdiFBZrMqPeIJUq3NTyBrPDkYl+Gh77 +l4lHQYVNOc7Yt9x21UP4Y+72r2bEJQ4tFuk/MbF+MLQCl+7rAbI0PEJ9io4vzHVx +iDpDo3CXS6zqWEtQ/kPjDm92TmWk9Zo7ADqF6Nf9kwnEls3Zzkoa+TDxaQAKpv5P +gQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUXz0+NAAVx4d6fdJHKfO89i314vEwDQYJKoZIhvcNAQELBQADggEBAAVF +KtkqW9N52qvTcJVt5X5A4hQIqVeCxl+IseenfHm9cwvhJ9P58/05YdkvC+RFJxdI +2EIc7jWCuXqBjr7eU5kQ3YGl0MWWz4Cd0efUvv7UBUPpJsOhOOecvaj4TJ+Ar/L3 +SQQJJL7QIExn+pjcsCjPWJtJRRgwHYWcRLGiDrfJpxU+9qLVn8hnFlLPeUcUk2wJ +Xa/q0RKKSMKJhRoetarMnK14iot2oTmVpOaLtpavdHIJhgQZ9zpbca2XB7nT6CS+ +k5LkNfa0KBAjWjbdSPBqKIaBj/3GoFlCMHxM3zbbvP32Pazc8lqHZKJ1wxuolUXH +Gs0xRC4+QB+UsS8kKEs= +-----END CERTIFICATE----- diff --git a/om/tls/test/fuzz/seeds/fz_pem/storeBad b/om/tls/test/fuzz/seeds/fz_pem/storeBad new file mode 100644 index 000000000..a303fe936 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_pem/storeBad @@ -0,0 +1,38 @@ +-----BEGIN CERTIFICATE----- +MIIDCjCCAfKgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwJTEOMAwGA1UEAwwFcm9v +dFgxEzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAx +MDEwMDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RYMRMwEQYDVQQKDApvbXRscyB0ZXN0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjl/X0AtkVF3mbzHSa10F +niVY0XSWHJS8Qu3OKa37P5/z2lKNv2NjApJSpvAlrWpN2PXuzbzwP8AFdjyvC08x +HyWqzmDSSbwvZQP+ymDFWXcuhzYPvwclRZAQO5U7ksFhBRsFioS+I1JU5q/ZUYq/ +d4IDoDFf7tfHaSYJwB9rIcuRmGwsjB1Pk58ZHunOY5h2gV+ilPH1kab6J1ZQxhUM +0MLVnSe1kpKVyqJVy2OJYmip6Occ/p33RG5GAKAD435hJ1JUMzZthu1h+5hE3qij +DIrKbeu5v9rdK321wdXtAO1VskFhjSjdATNQxZG6ejYH+4t3Fpn8y1OR4nJa7bnM ++wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUNoddauw+9cAmaU6CYPxdy9f7GjQwDQYJKoZIhvcNAQELBQADggEBAEza +4qe8HG34kXBZpHuPAr478xNm5liobJ8mpbk7+NKg610Smgu0wBwYLL9F3fT/APq9 +KDOalVhNUGPk0xwADcI/Gaz2XIVwPmii4gJVAs9FTFwinLKrFGupjDTEntUGpoAW +kxRQBIcTKVw9UE+v4iqJx1NK7wcpf5FwUQSCLV9p7/fOqU7jK0zCl80DfZD1Uxtq +6K+s6WN+VtO4sCXEhxO6YHnVd0qT0dGPjE9mVREV10W7DEFfYZNha9uum54HMztS +5LCqUQt721f7a1e9NIHZ/esFBbfU2Ps/hKzv32wM5x/nS3kIZYlyoEKAjMWgNzCs +sxk653wZJatxyYjVxi0= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIDCjCCAfKgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwJTEOMAwGA1UEAwwFcm9v +*FIxEzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAx +MDEwMDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RSMRMwEQYDVQQKDApvbXRscyB0ZXN0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAre1Rf0TRY8RRqTMIeTpA +GQuJqjhsDxnXb6Ry4yYkspJ75DniN6beX7yqBERchCJVP0iF+VAwLwdykTKPwSSK +75hR6U7LQE6IHV9QGX0VlCV1juLud1m+EJKfmGTnej/W1lmhbRopwFbYaCDvn0mj +V7GJQHO/l5rPemJ7L+/XKoK9ruwMA6NNcbdiFBZrMqPeIJUq3NTyBrPDkYl+Gh77 +l4lHQYVNOc7Yt9x21UP4Y+72r2bEJQ4tFuk/MbF+MLQCl+7rAbI0PEJ9io4vzHVx +iDpDo3CXS6zqWEtQ/kPjDm92TmWk9Zo7ADqF6Nf9kwnEls3Zzkoa+TDxaQAKpv5P +gQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUXz0+NAAVx4d6fdJHKfO89i314vEwDQYJKoZIhvcNAQELBQADggEBAAVF +KtkqW9N52qvTcJVt5X5A4hQIqVeCxl+IseenfHm9cwvhJ9P58/05YdkvC+RFJxdI +2EIc7jWCuXqBjr7eU5kQ3YGl0MWWz4Cd0efUvv7UBUPpJsOhOOecvaj4TJ+Ar/L3 +SQQJJL7QIExn+pjcsCjPWJtJRRgwHYWcRLGiDrfJpxU+9qLVn8hnFlLPeUcUk2wJ +Xa/q0RKKSMKJhRoetarMnK14iot2oTmVpOaLtpavdHIJhgQZ9zpbca2XB7nT6CS+ +k5LkNfa0KBAjWjbdSPBqKIaBj/3GoFlCMHxM3zbbvP32Pazc8lqHZKJ1wxuolUXH +Gs0xRC4+QB+UsS8kKEs= +-----END CERTIFICATE----- diff --git a/om/tls/test/fuzz/seeds/fz_pem/storeDup b/om/tls/test/fuzz/seeds/fz_pem/storeDup new file mode 100644 index 000000000..6696020d7 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_pem/storeDup @@ -0,0 +1,38 @@ +-----BEGIN CERTIFICATE----- +MIIDCjCCAfKgAwIBAgICEAMwDQYJKoZIhvcNAQELBQAwJTEOMAwGA1UEAwwFcm9v +dFIxEzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAx +MDEwMDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RSMRMwEQYDVQQKDApvbXRscyB0ZXN0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvXUbZhU7DsvaVRIO+vdt +8fRnOs/Mgi6cD3jam/TSbW3OwSqNB5otN+HL1ZWxPTms2uXjIVZuiDFfwzuTsexH +psmio1C+JohqmjGPrJU7mD19qZ3p59RbEeBBkoOjIT9vx18pvhD9Lkj2MsCDPOf+ +mMtJhRQfKvfSywCxVqVNPxSqNNz93874N2tC5LmuBnNE8mKplojXIHkwaLtB4pT0 +ZWYv9J1Z4uRG9QIbDcWROY4tBAT/MpNNtVTpU+CTouswAXzMn/MRV+0HnDYzhjUH +6Ke1VzEcTZGudvAu0gHt6WJhpNEjqMr4rrkT95bbuqLeKHq0yQymarPz2UWR9j3b +qQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUQccDHQrp4YSINA9NmJ/h06g/mfgwDQYJKoZIhvcNAQELBQADggEBAIMp +PK6qBW+xbtjREH/zrPuxkPidGb6ni+6P0KyRg5b+xSHRHN9hCBo8QvsGDUrEWlOI +NQ8Q5lqrkOojDnbDiRx2Ygi/eAZjJTSy5tJzuYTIDGvXElOlQBORZE/CmK1m5BLK +uk4yB6pdmZAf5C+0d700g8NbjSZAYZCkdFA3ha/XA1w6HQcO2XVZLbmAbiVMbcm2 +R8QA2ORKPzJbucjrpGCjvoO7j+xDo6LhzFO4rTlppO8RM6ouyUTveB9sg4hoNydU +Ohxzsk2XQ0bkW9Bzu0LETepbO6Bq+XGjmAWx1Wl0lDyJ5heTMvqDAnOgh1kmJ3mh +BhSYFKTWf/ycMyS1D0M= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIDCjCCAfKgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwJTEOMAwGA1UEAwwFcm9v +dFIxEzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAx +MDEwMDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RSMRMwEQYDVQQKDApvbXRscyB0ZXN0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAre1Rf0TRY8RRqTMIeTpA +GQuJqjhsDxnXb6Ry4yYkspJ75DniN6beX7yqBERchCJVP0iF+VAwLwdykTKPwSSK +75hR6U7LQE6IHV9QGX0VlCV1juLud1m+EJKfmGTnej/W1lmhbRopwFbYaCDvn0mj +V7GJQHO/l5rPemJ7L+/XKoK9ruwMA6NNcbdiFBZrMqPeIJUq3NTyBrPDkYl+Gh77 +l4lHQYVNOc7Yt9x21UP4Y+72r2bEJQ4tFuk/MbF+MLQCl+7rAbI0PEJ9io4vzHVx +iDpDo3CXS6zqWEtQ/kPjDm92TmWk9Zo7ADqF6Nf9kwnEls3Zzkoa+TDxaQAKpv5P +gQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUXz0+NAAVx4d6fdJHKfO89i314vEwDQYJKoZIhvcNAQELBQADggEBAAVF +KtkqW9N52qvTcJVt5X5A4hQIqVeCxl+IseenfHm9cwvhJ9P58/05YdkvC+RFJxdI +2EIc7jWCuXqBjr7eU5kQ3YGl0MWWz4Cd0efUvv7UBUPpJsOhOOecvaj4TJ+Ar/L3 +SQQJJL7QIExn+pjcsCjPWJtJRRgwHYWcRLGiDrfJpxU+9qLVn8hnFlLPeUcUk2wJ +Xa/q0RKKSMKJhRoetarMnK14iot2oTmVpOaLtpavdHIJhgQZ9zpbca2XB7nT6CS+ +k5LkNfa0KBAjWjbdSPBqKIaBj/3GoFlCMHxM3zbbvP32Pazc8lqHZKJ1wxuolUXH +Gs0xRC4+QB+UsS8kKEs= +-----END CERTIFICATE----- diff --git a/om/tls/test/fuzz/seeds/fz_pem/storeE b/om/tls/test/fuzz/seeds/fz_pem/storeE new file mode 100644 index 000000000..8071c8dc6 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_pem/storeE @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBuzCCAUGgAwIBAgICEAEwCgYIKoZIzj0EAwMwJTEOMAwGA1UEAwwFcm9vdEUx +EzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAxMDEw +MDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RFMRMwEQYDVQQKDApvbXRscyB0ZXN0MHYw +EAYHKoZIzj0CAQYFK4EEACIDYgAE7mUb5cjD7iYnhrqfMq/bOd+lPiCCCo/wimon +KNlpJWz+x+uposHsc3WpDNK9olL7kX3F7wJLiYFHidqroJ6lBUcTDPHbBYhRiyDL +Isx0WRJ1Pd4FXWEYA1iEvGGo/uWVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud +DwEB/wQEAwIBBjAdBgNVHQ4EFgQU6C/LNgt4tWyn+MwtViVfiluelJUwCgYIKoZI +zj0EAwMDaAAwZQIxAIXKhAfq1zwi4QGzMVTLHNcy0CcxjkKQM1GiVbSMeaawXx1p +9HVKYlQWkFBUhkb2bAIwAQUMcHtlu6Cl+x/OrxwdfnQw78PgIzx+csJFU6I193Q0 +GpIYrP4uuOF5HF26Gch5 +-----END CERTIFICATE----- diff --git a/om/tls/test/fuzz/seeds/fz_pem/storeInt b/om/tls/test/fuzz/seeds/fz_pem/storeInt new file mode 100644 index 000000000..798fc9dbf --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_pem/storeInt @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDKDCCAhCgAwIBAgICEAQwDQYJKoZIhvcNAQELBQAwJTEOMAwGA1UEAwwFcm9v +dFIxEzARBgNVBAoMCm9tdGxzIHRlc3QwHhcNMjQwMTAxMDAwMDAwWhcNMzYwMTAx +MDAwMDAwWjAkMQ0wCwYDVQQDDARpbnRSMRMwEQYDVQQKDApvbXRscyB0ZXN0MIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtpr1x57WhfoGKQPd7YqDrRMg +rmKeLhVs0TMdzIQgTxJdTurJl7QZsp0v2xCblPLGZd/V5uhWiZDgjugCoJXDaTQb +YcQ2DnYdio4GZFDmxxjH90uRqBBpuq/2btaNPOMs7aVO8E93qZfmYlRDwW8F4jLD +MxQuOGBziZuBw4Phm9PmNXUxte4okRQdf9oWdUSk/q5ZMI/oti630ysEcb4qGiu0 +mRZn3XFvyB12TzrnSb787Pzw3P9NWPCMaauSEzKY7BjdschGjnwXMZDM7h53SnyH +t9Hnof6lPCcj1Idvs++0WW9hWuoIDB6alSsxn1fzVaQuCbqh1M0DtURLshXMUQID +AQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4E +FgQUHKPx7p9P9Uj0tY2JC2RcNYqgG+swHwYDVR0jBBgwFoAUXz0+NAAVx4d6fdJH +KfO89i314vEwDQYJKoZIhvcNAQELBQADggEBAKACGJViM0nDZbX8LRgC3nO3bh7h +YwrE1+Gei1Bv9aV3S+sgOIXeirdZ/RZiW4/6DJ1X4+mRZQ9O8eudjvb0IqJCPZ9Y +xUiJxGFIYqO0Uyy8TY1bFZGqKEKoTfYR9LNrimidX70ph3bLivDGQhWxzeQV3L17 +Gr6kDT9eQISpB5XonfuesjHAGrknp0lJXKjAz4uOUkuGTs48UO3OE2OYwmuPqvJ5 +4Vl2ESpV0+lzOOTO0KE6F25i6GYO4fMntfvhChZlXjAvc4bX81qeZzxQx8MdCv5m +AiQpj7jIYWDskXGHu2ySjtfcQikHYSWLJ6AOcpkrU84FUj+cR98KLvFHIP0= +-----END CERTIFICATE----- diff --git a/om/tls/test/fuzz/seeds/fz_pem/storeR b/om/tls/test/fuzz/seeds/fz_pem/storeR new file mode 100644 index 000000000..7d7f28a98 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_pem/storeR @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDCjCCAfKgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwJTEOMAwGA1UEAwwFcm9v +dFIxEzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAx +MDEwMDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RSMRMwEQYDVQQKDApvbXRscyB0ZXN0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAre1Rf0TRY8RRqTMIeTpA +GQuJqjhsDxnXb6Ry4yYkspJ75DniN6beX7yqBERchCJVP0iF+VAwLwdykTKPwSSK +75hR6U7LQE6IHV9QGX0VlCV1juLud1m+EJKfmGTnej/W1lmhbRopwFbYaCDvn0mj +V7GJQHO/l5rPemJ7L+/XKoK9ruwMA6NNcbdiFBZrMqPeIJUq3NTyBrPDkYl+Gh77 +l4lHQYVNOc7Yt9x21UP4Y+72r2bEJQ4tFuk/MbF+MLQCl+7rAbI0PEJ9io4vzHVx +iDpDo3CXS6zqWEtQ/kPjDm92TmWk9Zo7ADqF6Nf9kwnEls3Zzkoa+TDxaQAKpv5P +gQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUXz0+NAAVx4d6fdJHKfO89i314vEwDQYJKoZIhvcNAQELBQADggEBAAVF +KtkqW9N52qvTcJVt5X5A4hQIqVeCxl+IseenfHm9cwvhJ9P58/05YdkvC+RFJxdI +2EIc7jWCuXqBjr7eU5kQ3YGl0MWWz4Cd0efUvv7UBUPpJsOhOOecvaj4TJ+Ar/L3 +SQQJJL7QIExn+pjcsCjPWJtJRRgwHYWcRLGiDrfJpxU+9qLVn8hnFlLPeUcUk2wJ +Xa/q0RKKSMKJhRoetarMnK14iot2oTmVpOaLtpavdHIJhgQZ9zpbca2XB7nT6CS+ +k5LkNfa0KBAjWjbdSPBqKIaBj/3GoFlCMHxM3zbbvP32Pazc8lqHZKJ1wxuolUXH +Gs0xRC4+QB+UsS8kKEs= +-----END CERTIFICATE----- diff --git a/om/tls/test/fuzz/seeds/fz_pem/storeX b/om/tls/test/fuzz/seeds/fz_pem/storeX new file mode 100644 index 000000000..ee47bf880 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fz_pem/storeX @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDCjCCAfKgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwJTEOMAwGA1UEAwwFcm9v +dFgxEzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAx +MDEwMDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RYMRMwEQYDVQQKDApvbXRscyB0ZXN0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjl/X0AtkVF3mbzHSa10F +niVY0XSWHJS8Qu3OKa37P5/z2lKNv2NjApJSpvAlrWpN2PXuzbzwP8AFdjyvC08x +HyWqzmDSSbwvZQP+ymDFWXcuhzYPvwclRZAQO5U7ksFhBRsFioS+I1JU5q/ZUYq/ +d4IDoDFf7tfHaSYJwB9rIcuRmGwsjB1Pk58ZHunOY5h2gV+ilPH1kab6J1ZQxhUM +0MLVnSe1kpKVyqJVy2OJYmip6Occ/p33RG5GAKAD435hJ1JUMzZthu1h+5hE3qij +DIrKbeu5v9rdK321wdXtAO1VskFhjSjdATNQxZG6ejYH+4t3Fpn8y1OR4nJa7bnM ++wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUNoddauw+9cAmaU6CYPxdy9f7GjQwDQYJKoZIhvcNAQELBQADggEBAEza +4qe8HG34kXBZpHuPAr478xNm5liobJ8mpbk7+NKg610Smgu0wBwYLL9F3fT/APq9 +KDOalVhNUGPk0xwADcI/Gaz2XIVwPmii4gJVAs9FTFwinLKrFGupjDTEntUGpoAW +kxRQBIcTKVw9UE+v4iqJx1NK7wcpf5FwUQSCLV9p7/fOqU7jK0zCl80DfZD1Uxtq +6K+s6WN+VtO4sCXEhxO6YHnVd0qT0dGPjE9mVREV10W7DEFfYZNha9uum54HMztS +5LCqUQt721f7a1e9NIHZ/esFBbfU2Ps/hKzv32wM5x/nS3kIZYlyoEKAjMWgNzCs +sxk653wZJatxyYjVxi0= +-----END CERTIFICATE----- diff --git a/om/tls/test/fuzz/seeds/fz_plant/plain b/om/tls/test/fuzz/seeds/fz_plant/plain new file mode 100644 index 000000000..b2b8de2a4 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_plant/plain differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/c_own b/om/tls/test/fuzz/seeds/fz_x509/c_own new file mode 100644 index 000000000..7d1fc2454 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/c_own differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/c_rsa b/om/tls/test/fuzz/seeds/fz_x509/c_rsa new file mode 100644 index 000000000..6f1a3396f Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/c_rsa differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/cv_lE256 b/om/tls/test/fuzz/seeds/fz_x509/cv_lE256 new file mode 100644 index 000000000..1b1427719 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/cv_lE256 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/cv_lE384 b/om/tls/test/fuzz/seeds/fz_x509/cv_lE384 new file mode 100644 index 000000000..fbb9a96e2 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/cv_lE384 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/cv_lPSS384 b/om/tls/test/fuzz/seeds/fz_x509/cv_lPSS384 new file mode 100644 index 000000000..32d280a87 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/cv_lPSS384 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/cv_lPSS512 b/om/tls/test/fuzz/seeds/fz_x509/cv_lPSS512 new file mode 100644 index 000000000..cee61b875 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/cv_lPSS512 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/cv_lR b/om/tls/test/fuzz/seeds/fz_x509/cv_lR new file mode 100644 index 000000000..8a3707849 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/cv_lR differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/hq_late b/om/tls/test/fuzz/seeds/fz_x509/hq_late new file mode 100644 index 000000000..8bdcb841e Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/hq_late differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/hq_other b/om/tls/test/fuzz/seeds/fz_x509/hq_other new file mode 100644 index 000000000..a62377a4e Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/hq_other differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/hq_own b/om/tls/test/fuzz/seeds/fz_x509/hq_own new file mode 100644 index 000000000..8045a21a6 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/hq_own differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_intX6144 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_intX6144 new file mode 100644 index 000000000..7ea70b759 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_intX6144 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_intXe32 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_intXe32 new file mode 100644 index 000000000..f1294b9bb Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_intXe32 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_intXnc b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_intXnc new file mode 100644 index 000000000..9cdcae612 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_intXnc differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaX6144 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaX6144 new file mode 100644 index 000000000..c92d63456 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaX6144 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaXe32 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaXe32 new file mode 100644 index 000000000..cdaf91f7b Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaXe32 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaXnc b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaXnc new file mode 100644 index 000000000..e3ab4b461 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaXnc differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaXncOut b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaXncOut new file mode 100644 index 000000000..329c7b35a Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lViaXncOut differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lX4096 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lX4096 new file mode 100644 index 000000000..0bb2e0093 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lX4096 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lX6144 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lX6144 new file mode 100644 index 000000000..3f0f42c66 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lX6144 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXbase b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXbase new file mode 100644 index 000000000..6c1c58d6d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXbase differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXe1 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXe1 new file mode 100644 index 000000000..78f4ec7f9 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXe1 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXe3 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXe3 new file mode 100644 index 000000000..0241ed886 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXe3 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXe32 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXe32 new file mode 100644 index 000000000..1e31948df Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXe32 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXeven b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXeven new file mode 100644 index 000000000..40042b940 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_lXeven differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_rootX b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_rootX new file mode 100644 index 000000000..a65511eee Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_rootX differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_112 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_112 new file mode 100644 index 000000000..859587672 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_112 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_21 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_21 new file mode 100644 index 000000000..30dc821b2 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_21 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_five b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_five new file mode 100644 index 000000000..969613682 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_five differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_ok b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_ok new file mode 100644 index 000000000..420bb3fec Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_ok differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_one2 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_one2 new file mode 100644 index 000000000..22928faeb Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_one2 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_two1 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_two1 new file mode 100644 index 000000000..dbd999d7c Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_two1 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_two2 b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_two2 new file mode 100644 index 000000000..065747438 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_crafted_uid_two2 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_d1 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d1 new file mode 100644 index 000000000..e43584f78 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d1 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_d2 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d2 new file mode 100644 index 000000000..a15cc4f22 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d2 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_d3 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d3 new file mode 100644 index 000000000..ae912d2e1 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d3 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_d4 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d4 new file mode 100644 index 000000000..f818828b1 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d4 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_d5 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d5 new file mode 100644 index 000000000..7f6b67c69 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d5 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_d6 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d6 new file mode 100644 index 000000000..f5b737213 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d6 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_d7 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d7 new file mode 100644 index 000000000..c50e2fcfb Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d7 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_d8 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d8 new file mode 100644 index 000000000..8969dae9a Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_d8 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_garbage b/om/tls/test/fuzz/seeds/fz_x509/p_pki_garbage new file mode 100644 index 000000000..c02f08146 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_garbage differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_intE b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intE new file mode 100644 index 000000000..3b6c5ae2f Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intE differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_intEKUc b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intEKUc new file mode 100644 index 000000000..aced97403 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intEKUc differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_intNC b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intNC new file mode 100644 index 000000000..b10df9186 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intNC differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_intNoCA b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intNoCA new file mode 100644 index 000000000..ae808a0d3 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intNoCA differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_intNoKU b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intNoKU new file mode 100644 index 000000000..9c20a49c6 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intNoKU differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_intP0 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intP0 new file mode 100644 index 000000000..ea896d9aa Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intP0 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_intP0b b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intP0b new file mode 100644 index 000000000..d87a2869c Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intP0b differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_intPSS b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intPSS new file mode 100644 index 000000000..d54620b14 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intPSS differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_intR b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intR new file mode 100644 index 000000000..b65853412 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intR differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_intRexp b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intRexp new file mode 100644 index 000000000..548768029 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_intRexp differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_l2050 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_l2050 new file mode 100644 index 000000000..2c2908d9d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_l2050 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lCA b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lCA new file mode 100644 index 000000000..3d1bca93d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lCA differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lClient b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lClient new file mode 100644 index 000000000..9d148f202 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lClient differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lCrit b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lCrit new file mode 100644 index 000000000..93121e170 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lCrit differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lD7 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lD7 new file mode 100644 index 000000000..32e1e0e0f Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lD7 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lD8 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lD8 new file mode 100644 index 000000000..de4412e8f Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lD8 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lE256 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lE256 new file mode 100644 index 000000000..28e6797b0 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lE256 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lE384 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lE384 new file mode 100644 index 000000000..bda0f6d73 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lE384 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lE384b b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lE384b new file mode 100644 index 000000000..380c5f05b Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lE384b differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lEd b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lEd new file mode 100644 index 000000000..0bc02b8cd Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lEd differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lEint b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lEint new file mode 100644 index 000000000..7f86f7768 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lEint differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lExp b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lExp new file mode 100644 index 000000000..07eb37acf Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lExp differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lKUenc b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lKUenc new file mode 100644 index 000000000..83bc4274e Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lKUenc differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lNoSAN b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lNoSAN new file mode 100644 index 000000000..1a2b17f85 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lNoSAN differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lNonCrit b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lNonCrit new file mode 100644 index 000000000..a12376e1a Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lNonCrit differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lNyv b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lNyv new file mode 100644 index 000000000..b811ed15f Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lNyv differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPSS256 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPSS256 new file mode 100644 index 000000000..6ec45e9e3 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPSS256 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPSS384 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPSS384 new file mode 100644 index 000000000..572329a51 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPSS384 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPSS512 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPSS512 new file mode 100644 index 000000000..3ecaa96e2 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPSS512 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPart b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPart new file mode 100644 index 000000000..eca92b81d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lPart differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR new file mode 100644 index 000000000..91b61de51 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR1024 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR1024 new file mode 100644 index 000000000..dae4deb04 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR1024 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR384 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR384 new file mode 100644 index 000000000..1a7bb0b42 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR384 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR512 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR512 new file mode 100644 index 000000000..5bfcddf8d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lR512 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRalgmis b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRalgmis new file mode 100644 index 000000000..1f464054d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRalgmis differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRbadsig b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRbadsig new file mode 100644 index 000000000..26db53e89 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRbadsig differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRmin b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRmin new file mode 100644 index 000000000..3301b621d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRmin differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRpss b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRpss new file mode 100644 index 000000000..d89028f4f Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRpss differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRtrunc b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRtrunc new file mode 100644 index 000000000..409058b2d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lRtrunc differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lSHA1 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lSHA1 new file mode 100644 index 000000000..10dbe560e Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lSHA1 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lSelf b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lSelf new file mode 100644 index 000000000..01658bdda Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lSelf differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaEKUc b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaEKUc new file mode 100644 index 000000000..8d5127b5f Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaEKUc differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaExp b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaExp new file mode 100644 index 000000000..f4458a83d Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaExp differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaNC b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaNC new file mode 100644 index 000000000..9910262e5 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaNC differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaNoCA b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaNoCA new file mode 100644 index 000000000..2865f2be8 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaNoCA differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaNoKU b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaNoKU new file mode 100644 index 000000000..9d0ceeb0b Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaNoKU differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaP0 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaP0 new file mode 100644 index 000000000..32b08cc3b Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaP0 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaPSS b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaPSS new file mode 100644 index 000000000..b702c3ab6 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lViaPSS differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lWild b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lWild new file mode 100644 index 000000000..8fdd0ff0b Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lWild differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_lWild1 b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lWild1 new file mode 100644 index 000000000..72da23c8a Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_lWild1 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_rootE b/om/tls/test/fuzz/seeds/fz_x509/p_pki_rootE new file mode 100644 index 000000000..d75bb6dcc Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_rootE differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_rootR b/om/tls/test/fuzz/seeds/fz_x509/p_pki_rootR new file mode 100644 index 000000000..a2071e0d8 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_rootR differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_pki_rootX b/om/tls/test/fuzz/seeds/fz_x509/p_pki_rootX new file mode 100644 index 000000000..172e4e1b0 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_pki_rootX differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_real_api.github.com-1 b/om/tls/test/fuzz/seeds/fz_x509/p_real_api.github.com-1 new file mode 100644 index 000000000..b09ab9d51 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_real_api.github.com-1 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_real_api.github.com-2 b/om/tls/test/fuzz/seeds/fz_x509/p_real_api.github.com-2 new file mode 100644 index 000000000..31d0827c4 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_real_api.github.com-2 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_real_api.github.com-3 b/om/tls/test/fuzz/seeds/fz_x509/p_real_api.github.com-3 new file mode 100644 index 000000000..7b9e9bb16 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_real_api.github.com-3 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_real_mail.gandi.net-1 b/om/tls/test/fuzz/seeds/fz_x509/p_real_mail.gandi.net-1 new file mode 100644 index 000000000..44bf8df51 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_real_mail.gandi.net-1 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_real_mail.gandi.net-2 b/om/tls/test/fuzz/seeds/fz_x509/p_real_mail.gandi.net-2 new file mode 100644 index 000000000..76b25e7b6 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_real_mail.gandi.net-2 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_real_raw.githubusercontent.com-1 b/om/tls/test/fuzz/seeds/fz_x509/p_real_raw.githubusercontent.com-1 new file mode 100644 index 000000000..eea4370fe Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_real_raw.githubusercontent.com-1 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_real_raw.githubusercontent.com-2 b/om/tls/test/fuzz/seeds/fz_x509/p_real_raw.githubusercontent.com-2 new file mode 100644 index 000000000..a84ef768c Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_real_raw.githubusercontent.com-2 differ diff --git a/om/tls/test/fuzz/seeds/fz_x509/p_real_raw.githubusercontent.com-3 b/om/tls/test/fuzz/seeds/fz_x509/p_real_raw.githubusercontent.com-3 new file mode 100644 index 000000000..967937b73 Binary files /dev/null and b/om/tls/test/fuzz/seeds/fz_x509/p_real_raw.githubusercontent.com-3 differ diff --git a/om/tls/test/fuzz/seeds/fzstore.pem b/om/tls/test/fuzz/seeds/fzstore.pem new file mode 100644 index 000000000..57c7e6fd7 --- /dev/null +++ b/om/tls/test/fuzz/seeds/fzstore.pem @@ -0,0 +1,60 @@ +-----BEGIN CERTIFICATE----- +MIIDCjCCAfKgAwIBAgICEAIwDQYJKoZIhvcNAQELBQAwJTEOMAwGA1UEAwwFcm9v +dFgxEzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAx +MDEwMDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RYMRMwEQYDVQQKDApvbXRscyB0ZXN0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjl/X0AtkVF3mbzHSa10F +niVY0XSWHJS8Qu3OKa37P5/z2lKNv2NjApJSpvAlrWpN2PXuzbzwP8AFdjyvC08x +HyWqzmDSSbwvZQP+ymDFWXcuhzYPvwclRZAQO5U7ksFhBRsFioS+I1JU5q/ZUYq/ +d4IDoDFf7tfHaSYJwB9rIcuRmGwsjB1Pk58ZHunOY5h2gV+ilPH1kab6J1ZQxhUM +0MLVnSe1kpKVyqJVy2OJYmip6Occ/p33RG5GAKAD435hJ1JUMzZthu1h+5hE3qij +DIrKbeu5v9rdK321wdXtAO1VskFhjSjdATNQxZG6ejYH+4t3Fpn8y1OR4nJa7bnM ++wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUNoddauw+9cAmaU6CYPxdy9f7GjQwDQYJKoZIhvcNAQELBQADggEBAEza +4qe8HG34kXBZpHuPAr478xNm5liobJ8mpbk7+NKg610Smgu0wBwYLL9F3fT/APq9 +KDOalVhNUGPk0xwADcI/Gaz2XIVwPmii4gJVAs9FTFwinLKrFGupjDTEntUGpoAW +kxRQBIcTKVw9UE+v4iqJx1NK7wcpf5FwUQSCLV9p7/fOqU7jK0zCl80DfZD1Uxtq +6K+s6WN+VtO4sCXEhxO6YHnVd0qT0dGPjE9mVREV10W7DEFfYZNha9uum54HMztS +5LCqUQt721f7a1e9NIHZ/esFBbfU2Ps/hKzv32wM5x/nS3kIZYlyoEKAjMWgNzCs +sxk653wZJatxyYjVxi0= +-----END CERTIFICATE----- +junk line outside any block +-----BEGIN CERTIFICATE----- +MIIBuzCCAUGgAwIBAgICEAEwCgYIKoZIzj0EAwMwJTEOMAwGA1UEAwwFcm9vdEUx +EzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAxMDEw +MDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RFMRMwEQYDVQQKDApvbXRscyB0ZXN0MHYw +EAYHKoZIzj0CAQYFK4EEACIDYgAE7mUb5cjD7iYnhrqfMq/bOd+lPiCCCo/wimon +KNlpJWz+x+uposHsc3WpDNK9olL7kX3F7wJLiYFHidqroJ6lBUcTDPHbBYhRiyDL +Isx0WRJ1Pd4FXWEYA1iEvGGo/uWVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud +DwEB/wQEAwIBBjAdBgNVHQ4EFgQU6C/LNgt4tWyn+MwtViVfiluelJUwCgYIKoZI +zj0EAwMDaAAwZQIxAIXKhAfq1zwi4QGzMVTLHNcy0CcxjkKQM1GiVbSMeaawXx1p +9HVKYlQWkFBUhkb2bAIwAQUMcHtlu6Cl+x/OrxwdfnQw78PgIzx+csJFU6I193Q0 +GpIYrP4uuOF5HF26Gch5 +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIDCjCCAfKgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwJTEOMAwGA1UEAwwFcm9v +dFIxEzARBgNVBAoMCm9tdGxzIHRlc3QwIBcNMjAwMTAxMDAwMDAwWhgPMjA1MTAx +MDEwMDAwMDBaMCUxDjAMBgNVBAMMBXJvb3RSMRMwEQYDVQQKDApvbXRscyB0ZXN0 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAre1Rf0TRY8RRqTMIeTpA +GQuJqjhsDxnXb6Ry4yYkspJ75DniN6beX7yqBERchCJVP0iF+VAwLwdykTKPwSSK +75hR6U7LQE6IHV9QGX0VlCV1juLud1m+EJKfmGTnej/W1lmhbRopwFbYaCDvn0mj +V7GJQHO/l5rPemJ7L+/XKoK9ruwMA6NNcbdiFBZrMqPeIJUq3NTyBrPDkYl+Gh77 +l4lHQYVNOc7Yt9x21UP4Y+72r2bEJQ4tFuk/MbF+MLQCl+7rAbI0PEJ9io4vzHVx +iDpDo3CXS6zqWEtQ/kPjDm92TmWk9Zo7ADqF6Nf9kwnEls3Zzkoa+TDxaQAKpv5P +gQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUXz0+NAAVx4d6fdJHKfO89i314vEwDQYJKoZIhvcNAQELBQADggEBAAVF +KtkqW9N52qvTcJVt5X5A4hQIqVeCxl+IseenfHm9cwvhJ9P58/05YdkvC+RFJxdI +2EIc7jWCuXqBjr7eU5kQ3YGl0MWWz4Cd0efUvv7UBUPpJsOhOOecvaj4TJ+Ar/L3 +SQQJJL7QIExn+pjcsCjPWJtJRRgwHYWcRLGiDrfJpxU+9qLVn8hnFlLPeUcUk2wJ +Xa/q0RKKSMKJhRoetarMnK14iot2oTmVpOaLtpavdHIJhgQZ9zpbca2XB7nT6CS+ +k5LkNfa0KBAjWjbdSPBqKIaBj/3GoFlCMHxM3zbbvP32Pazc8lqHZKJ1wxuolUXH +Gs0xRC4+QB+UsS8kKEs= +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIBOjCB4aADAgECAgID6DAKBggqhkjOPQQDAjAUMRIwEAYDVQQDDAlvbWZ6IHJv +b3QwHhcNMjUwMTAxMDAwMDAwWhcNNDkxMjMxMDAwMDAwWjAUMRIwEAYDVQQDDAlv +bWZ6IHJvb3QwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARwexbPI2O7TtCoMFu6 +c7H2jZ/pDy4wcKNo08S1YExK5GPc+jeSmMZOqZGEOje/bdUY0OEFE+VZk2ug7Tr7 +NdIKoyMwITAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAKBggqhkjO +PQQDAgNIADBFAiEA+47lTm6e7685ASfHAXXsNKyq81WVnXrOhqXxuT3WbkECIFYZ +E4/DPJvzdJDQNlcBot0YWW7xCAT8ceGeKBhHOyHB +-----END CERTIFICATE----- diff --git a/om/tls/test/fuzz/service/fuzz-watchdog.sh b/om/tls/test/fuzz/service/fuzz-watchdog.sh new file mode 100755 index 000000000..2a3bbceec --- /dev/null +++ b/om/tls/test/fuzz/service/fuzz-watchdog.sh @@ -0,0 +1,142 @@ +#!/bin/sh +# SPDX-License-Identifier: Apache-2.0 +# fuzz-watchdog.sh: host orchestration (not part of the library). Pauses the om/tls fuzz workers +# (systemd --user unit tlsfuzz.service) whenever the Spark needs quiet, resumes them when every +# trigger has cleared, and stops the unit on the disk or size caps. Reads the same markers as +# ~/.local/bin/quiet-build / quiet-measure / spark-window / quietlock; never takes a lock itself +# (held locks are read from /proc/locks), never sends anything to 127.0.0.1:18091 (ss only). +# fuzz-watchdog.sh check one evaluation: prints "clear", "pause REASON" or "stop REASON"; +# exit 0 / 1 / 2 +# fuzz-watchdog.sh run loop every FUZZ_WATCH_S (10) s; STATUS + append-only LOG +# fuzz-watchdog.sh selftest every trigger against a synthetic marker (positive) and the same +# environment without it (negative control); exit 0 only if all hold +# Every path is an environment override so selftest can use synthetic markers. +set -u +H=${HOME:-/home/drakestapleton} +UNIT=${FUZZ_UNIT:-tlsfuzz.service} +FD=${FUZZ_DIR:-$H/handoffs/TlsProof/fuzz} +STATUS=${FUZZ_STATUS:-$FD/STATUS} +LOG=${FUZZ_LOG:-$FD/pause-resume.log} +CORPUS=${FUZZ_CORPUS:-$FD/corpus} +CRASHES=${FUZZ_CRASHES:-$H/handoffs/TlsProof/crashes} +WR=${SPARK_WINDOWS_ROOT:-$H/yardsticks/windows} +QL=${SPARK_QUIET_LOCK:-/tmp/aien-quiet.lock} +QG=${SPARK_QUIET_GATE:-/tmp/aien-quiet.gate} +QW=${SPARK_QUIET_WANT:-/tmp/aien-quiet.want.d} +GB=${SPARK_GB10_LOCK:-/tmp/aien-gb10.lock} +CLEAN=${FUZZ_CLEANUP_LOCK:-$H/.local/state/spark-cleanup/run.lock} +# Optional extra markers (empty by default). The timing lanes and GPU windows are already covered +# above: quiet-measure/spark-window take $QL/$QW/$QG, and every GPU window (Q27 included) holds $GB. +EQ=${FUZZ_EQ_GLOB:-} +Q27=${FUZZ_Q27_MARKERS:-} +SWEEP=${FUZZ_SWEEP_PATTERN:-} +QLBIN=${FUZZ_QUIETLOCK:-$H/.local/bin/quietlock} +PORT=${FUZZ_GUARD_PORT:-18091} +# 20-core host whose load1 ran 16.1-30.2 during the TlsProof bench (2026-10-26); the 2 niced workers stay on cpus 10-11. +LOADMAX=${FUZZ_LOAD_MAX:-16} +DISKMIN=${FUZZ_DISK_MIN_GIB:-150} +SIZEMAX=${FUZZ_SIZE_MAX_GIB:-20} + +# held FILE [MODE]: some process holds a flock on FILE (MODE WRITE = exclusive only) +held() { + [ -e "$1" ] || return 1 + i=$(stat -L -c %i "$1" 2>/dev/null) || return 1 + awk -v i=":$i\$" -v m="${2:-}" '$2=="FLOCK" && $6 ~ i && (m=="" || $4==m) {f=1} END {exit !f}' /proc/locks +} + +reason() { + [ -s "$WR/OPEN" ] && { echo "pause spark-window $(cat "$WR/OPEN")"; return; } + for f in "$QW"/*; do + [ -e "$f" ] || continue + p=$(basename "$f" | sed 's/^legacy-//'); kill -0 "$p" 2>/dev/null && { echo "pause quiet-measure wanted ($f)"; return; } + done + held "$QL" WRITE && { echo "pause quiet lock held exclusive (timing run)"; return; } + held "$QG" WRITE && { echo "pause quiet gate held (window draining)"; return; } + held "$GB" && { echo "pause $GB held"; return; } + if [ -x "$QLBIN" ] && ! "$QLBIN" check >/dev/null 2>&1; then echo "pause quietlock flag held"; return; fi + held "$CLEAN" && { echo "pause spark-cleanup running"; return; } + for f in $EQ; do held "$f" && { echo "pause bench lock $f held"; return; }; done + for f in $Q27; do [ -e "$f" ] && { echo "pause Q27 GPU window ($f)"; return; }; done + [ -n "$SWEEP" ] && pgrep -f "$SWEEP" >/dev/null 2>&1 && { echo "pause sweep running ($(pgrep -af "$SWEEP" | head -1 | cut -c1-80))"; return; } + [ -n "$(ss -ltnH "sport = :$PORT" 2>/dev/null)" ] || { echo "pause 127.0.0.1:$PORT not listening"; return; } + l=$(cut -d' ' -f1 /proc/loadavg) + awk -v l="$l" -v m="$LOADMAX" 'BEGIN{exit !(l>m)}' && { echo "pause load1 $l > $LOADMAX"; return; } + echo clear +} + +check() { + a=$(df -B1G --output=avail / | tail -1 | tr -d ' ') + [ "$a" -lt "$DISKMIN" ] && { echo "stop / free ${a} GiB < $DISKMIN GiB"; return 2; } + s=$(du -sb "$CORPUS" "$CRASHES" 2>/dev/null | awk '{t+=$1} END{print t+0}') + awk -v s="$s" -v m="$SIZEMAX" 'BEGIN{exit !(s > m*1073741824)}' && { echo "stop corpus+crashes $s bytes > $SIZEMAX GiB"; return 2; } + r=$(reason); echo "$r" + [ "$r" = clear ] && return 0 || return 1 +} + +note() { printf '%s %s\n' "$(date -u +%FT%TZ)" "$*" >> "$LOG"; } + +run() { + mkdir -p "$(dirname "$STATUS")"; st=on + while :; do + r=$(check); rc=$? + if [ $rc -eq 2 ]; then + # cap reached: stop the workers (they stay stopped until someone restarts the unit) + [ $st = stopped ] || { systemctl --user stop "$UNIT"; note "STOP $r"; }; st=stopped + elif [ $rc -eq 1 ]; then + # re-sent every tick so workers started or restarted while paused are paused too + systemctl --user kill --signal=SIGSTOP "$UNIT" 2>/dev/null + [ $st = on ] && note "PAUSE $r"; st=off + elif [ $st = off ]; then + systemctl --user kill --signal=SIGCONT "$UNIT" 2>/dev/null; st=on; note "RESUME" + fi + printf '%s %s %s\n' "$st" "$(date -u +%FT%TZ)" "$r" > "$STATUS.tmp" && mv -f "$STATUS.tmp" "$STATUS" + sleep "${FUZZ_WATCH_S:-10}" + done +} + +# selftest: a clear synthetic world, then one trigger at a time +selftest() { + T=$(mktemp -d /tmp/fuzzwd.XXXXXX); fails=0 + base() { + export SPARK_WINDOWS_ROOT=$T/win SPARK_QUIET_LOCK=$T/ql SPARK_QUIET_GATE=$T/qg SPARK_QUIET_WANT=$T/want \ + SPARK_GB10_LOCK=$T/gb FUZZ_CLEANUP_LOCK=$T/clean FUZZ_EQ_GLOB="$T/eq_*" \ + FUZZ_Q27_MARKERS=$T/q27 FUZZ_SWEEP_PATTERN=omfz-synthetic-sweep FUZZ_QUIETLOCK=$T/quietlock \ + FUZZ_GUARD_PORT=$PORT FUZZ_LOAD_MAX=100000 FUZZ_DISK_MIN_GIB=0 FUZZ_SIZE_MAX_GIB=100000 \ + FUZZ_CORPUS=$T/corpus FUZZ_CRASHES=$T/crashes + } + # hold MODE FILE NAME WANT: hold a flock in a process whose pid stays $! (exec), test, release + hold() { sh -c 'exec 9>"$2"; flock "$1" 9; exec sleep 30' _ "$1" "$2" & hp=$!; sleep 1; expect "$3" "$4"; kill $hp; wait $hp 2>/dev/null; } + mkdir -p "$T/win" "$T/want" "$T/corpus" "$T/crashes"; : > "$T/ql"; : > "$T/qg"; : > "$T/gb"; : > "$T/clean"; : > "$T/eq_x" + printf '#!/bin/sh\n[ -e %s/qflag ] && exit 1\nexit 0\n' "$T" > "$T/quietlock"; chmod +x "$T/quietlock" + expect() { # NAME WANT_EXIT + got=$(env "$0" check); rc=$? + if [ $rc -eq "$2" ]; then echo "PASS $1 -> $got"; else echo "FAIL $1 -> rc=$rc $got (want $2)"; fails=$((fails+1)); fi + } + base; expect baseline-clear 0 + echo w1 > "$T/win/OPEN"; expect spark-window 1; rm -f "$T/win/OPEN" + sleep 300 & sp=$!; : > "$T/want/$sp"; expect quiet-want-flag 1; rm -f "$T/want/$sp"; kill $sp + : > "$T/want/999999999"; expect quiet-want-dead-pid-ignored 0; rm -f "$T/want/999999999" + hold -x "$T/ql" quiet-lock-exclusive 1 + hold -s "$T/ql" quiet-lock-shared-build-ignored 0 + hold -x "$T/qg" quiet-gate 1 + hold -x "$T/gb" gb10-lock 1 + hold -s "$T/gb" gb10-lock-shared 1 + : > "$T/qflag"; expect quietlock-flag 1; rm -f "$T/qflag" + hold -x "$T/clean" spark-cleanup 1 + hold -x "$T/eq_x" eq-bench-lock 1 + : > "$T/q27"; expect q27-window 1; rm -f "$T/q27" + bash -c 'exec -a omfz-synthetic-sweep sleep 30' & sleep 1; expect alpha-r15-sweep 1; kill $! 2>/dev/null; wait $! 2>/dev/null + FUZZ_GUARD_PORT=1; export FUZZ_GUARD_PORT; expect port-not-listening 1; base + FUZZ_LOAD_MAX=0; export FUZZ_LOAD_MAX; expect load1 1; base + FUZZ_DISK_MIN_GIB=100000; export FUZZ_DISK_MIN_GIB; expect disk-floor 2; base + head -c 2048 /dev/zero > "$T/corpus/x"; FUZZ_SIZE_MAX_GIB=0; export FUZZ_SIZE_MAX_GIB; expect size-cap 2; base + expect baseline-clear-again 0 + rm -rf "$T"; echo "selftest fails=$fails"; [ $fails -eq 0 ] +} + +case "${1-}" in + check) check ;; + run) run ;; + selftest) selftest ;; + *) sed -n '2,13p' "$0"; exit 2 ;; +esac diff --git a/om/tls/test/fuzz/service/tlsfuzz-triage.service b/om/tls/test/fuzz/service/tlsfuzz-triage.service new file mode 100644 index 000000000..eecd922a8 --- /dev/null +++ b/om/tls/test/fuzz/service/tlsfuzz-triage.service @@ -0,0 +1,12 @@ +# Daily coverage stats + crash triage: reproduce natively, dedupe, copy to ~/handoffs/TlsProof/crashes/, +# one timestamped line on ~/handoffs/BOARD.md. +[Unit] +Description=om/tls fuzz daily triage + +[Service] +Type=oneshot +Environment=OUT=%h/.cache/omtls-fuzz +ExecStart=/bin/sh %h/.local/lib/omtls-fuzz/run.sh triage +Nice=19 +IOSchedulingClass=idle +CPUAffinity=10 11 diff --git a/om/tls/test/fuzz/service/tlsfuzz-triage.timer b/om/tls/test/fuzz/service/tlsfuzz-triage.timer new file mode 100644 index 000000000..3ad207f4b --- /dev/null +++ b/om/tls/test/fuzz/service/tlsfuzz-triage.timer @@ -0,0 +1,10 @@ +[Unit] +Description=om/tls fuzz daily triage + +[Timer] +OnCalendar=daily +Persistent=true +RandomizedDelaySec=900 + +[Install] +WantedBy=timers.target diff --git a/om/tls/test/fuzz/service/tlsfuzz-watch.service b/om/tls/test/fuzz/service/tlsfuzz-watch.service new file mode 100644 index 000000000..f77845e0b --- /dev/null +++ b/om/tls/test/fuzz/service/tlsfuzz-watch.service @@ -0,0 +1,16 @@ +# Self-pausing watchdog for tlsfuzz.service: checks every 10 s; STATUS + append-only pause/resume log +# in ~/handoffs/TlsProof/fuzz/. +[Unit] +Description=om/tls fuzz watchdog (pause on quiet/window/lock/load/18091 triggers) + +[Service] +Type=simple +ExecStart=/bin/sh %h/.local/lib/omtls-fuzz/service/fuzz-watchdog.sh run +Nice=19 +IOSchedulingClass=idle +CPUAffinity=10 11 +Restart=always +RestartSec=10 + +[Install] +WantedBy=default.target diff --git a/om/tls/test/fuzz/service/tlsfuzz.service b/om/tls/test/fuzz/service/tlsfuzz.service new file mode 100644 index 000000000..80a0c1f86 --- /dev/null +++ b/om/tls/test/fuzz/service/tlsfuzz.service @@ -0,0 +1,23 @@ +# om/tls fuzz workers (AFL++ qemu_mode), host tooling. Install: see ../run.sh header and NOTES. +# Two workers on cpus 10-11 only (A725 cores; never the X925 cores 5-9, 15-19), lowest CPU and I/O priority. +# fuzz-watchdog.sh (tlsfuzz-watch.service) SIGSTOPs/SIGCONTs this unit and stops it on the disk/size caps. +[Unit] +Description=om/tls fuzz workers (AFL++ qemu_mode, 2 workers on cpus 10-11) +After=tlsfuzz-watch.service + +[Service] +Type=simple +Environment=OUT=%h/.cache/omtls-fuzz FUZZ_CPUS=10\x2011 +ExecStartPre=/bin/sh %h/.local/lib/omtls-fuzz/run.sh build replay +ExecStart=/bin/sh %h/.local/lib/omtls-fuzz/run.sh service +Nice=19 +IOSchedulingClass=idle +CPUAffinity=10 11 +CPUQuota=200% +MemoryMax=8G +KillMode=control-group +Restart=on-failure +RestartSec=60 + +[Install] +WantedBy=default.target diff --git a/om/tls/test/tls/client.om b/om/tls/test/tls/client.om index 7714cdff9..e38a5d217 100644 --- a/om/tls/test/tls/client.om +++ b/om/tls/test/tls/client.om @@ -1,5 +1,5 @@ note client.om: test program for om/tls (program mode, composed after every om/tls unit). -note usage: client HOST PORT MODE [CONNECTHOST [STOREFILE]] +note usage: client HOST PORT MODE [CONNECTHOST [STOREFILE [PATH [OPTS]]]] note MODE get : HTTPS GET / (path from env-free arg 6 when given) with "Connection: close", note writes the decrypted response bytes to stdout note MODE smtp : implicit-TLS SMTP: reads the banner, sends EHLO and QUIT, writes the dialogue @@ -9,10 +9,15 @@ note handshake on the same connection, EHLO and QUIT inside TLS note CONNECTHOST (default HOST) is the name resolved for TCP; HOST is the TLS name (SNI and note certificate check), so a local server can be checked against a chosen name. note STOREFILE (default, or "-", the system bundle) is a PEM bundle of trust anchors. +note OPTS (tests) is "REC,HSMS,SPLIT,PAUSEMS": REC > 0 lowers the per-key record limit (tls_reclimit), +note HSMS > 0 sets the whole-handshake budget in ms (tls_hslimit), SPLIT = 1 sends the GET request +note one byte per record, PAUSEMS > 0 sleeps that long after tls_close before exiting (the stack +note residue check reads the process then). No deadline is set by the client: the library's +note handshake budget applies. note Exit 0 on success; on a TLS failure exit 10 + code and print "TLSERR detail ". note Exit 2 for a usage error, 3 for a DNS/connect failure. -text cusage "usage: client HOST PORT get|smtp|hs [CONNECTHOST [STOREFILE [PATH]]]\n" +text cusage "usage: client HOST PORT get|smtp|hs|tsmtp [CONNECTHOST [STOREFILE [PATH [REC,HSMS,SPLIT,PAUSEMS]]]]\n" text cterr "TLSERR " text cdet " detail " text cnl "\n" @@ -255,22 +260,60 @@ end ret e end -note after the handshake: hs closes, smtp talks, get sends m and copies the response +note after the handshake: hs closes, smtp talks, get sends m (one record per byte when bit 7 of +note mode is set) and copies the response fn cl_after cs edit uchar * m view uchar * mode ulong to ulong io = new uchar 16384 0 -if eq mode 104 +md = and mode 127 +if eq md 104 tls_close cs ret 0 end -if or eq mode 115 eq mode 116 -ret cl_smtp cs io mode +if or eq md 115 eq md 116 +ret cl_smtp cs io md end +if eq and mode 128 0 r = tls_write cs m if lt r 0 ret ulong neg r end ret cl_drain cs io end +for i ulong len m +r = tls_write cs part m i 1 +if lt r 0 +ret ulong neg r +end +end +ret cl_drain cs io +end + +note OPTS "REC,HSMS,SPLIT,PAUSEMS" from w[1536..1536+n): v[7..10]; 1 on a bad option +fn cl_opts w view uchar * n ulong v edit ulong * to ulong +k = ulong 7 +x = ulong 0 +for i ulong n +ch = ulong get w add 1536 i +if eq ch 44 +put v k x +k = add k 1 +x = 0 +if gt k 10 +ret 1 +end +continue +end +if or lt ch 48 gt ch 57 +ret 1 +end +x = add mul x 10 sub ch 48 +if gt x 99999999 +ret 1 +end +end +put v k x +ret 0 +end note w regions: TLS name 0..256, connect name 256..512, path 512..1536, argument 1536..5632, note request 8192..16384. v: 0 name length, 1 connect length, 2 path length, 3 port, 4 mode, @@ -309,6 +352,13 @@ pl = cl_arg 6 part w 1536 1024 tls_mov w 512 1536 pl put v 2 pl end +if ge na 8 +ol = cl_arg 7 part w 1536 4096 +if ne cl_opts w ol v 0 +ret 2 +end +end +note the store argument is read last: cl_trust uses it from w[1536] after parsing put v 5 0 if ge na 6 sl = cl_arg 5 part w 1536 4096 @@ -326,13 +376,19 @@ end ret tls_storef st part w 1536 sl end -note TLS name and request; v[6] = request length; 0 or a TLS code +note TLS name, test options and request; v[6] = request length; 0 or a TLS code fn cl_prep cs edit uchar * w edit uchar * v edit ulong * to ulong fl = ulong 0 if eq get v 4 103 fl = 1 end e = tls_init cs part w 0 get v 0 fl +if and eq e 0 ne get v 7 0 +e = tls_reclimit cs get v 7 +end +if and eq e 0 ne get v 8 0 +e = tls_hslimit cs mul get v 8 1000000 +end put v 6 0 if eq fl 1 put v 6 cl_req w get v 0 get v 2 @@ -341,7 +397,7 @@ ret e end fn cl_main cs edit uchar * st edit uchar * w edit uchar * to int -v = new ulong 8 0 +v = new ulong 12 0 if ne cl_parse w v 0 x = write 2 cusage 0 len cusage ret 2 @@ -357,7 +413,6 @@ fd = tls_dial part w 256 get v 1 get v 3 if lt fd 0 ret 3 end -tls_deadline cs add monons 30000000000 e = ulong 0 if eq get v 4 116 e = cl_starttls int fd @@ -365,7 +420,12 @@ end if eq e 0 e = tls_connect cs st int fd end -ret cl_go cs int fd part w 8192 get v 6 add get v 4 shl e 8 +md = get v 4 +if ne get v 9 0 +md = or md 128 +end +md = add md shl get v 10 16 +ret cl_go cs int fd part w 8192 get v 6 add md shl e 8 end note mode in bits 0..7, the handshake result above. After a failure the connection must stay @@ -373,11 +433,17 @@ note failed through tls_close (security review finding 11): tls_read then gives note anything else prints CLOSE_NOT_FAILED before the TLSERR line fn cl_go cs edit uchar * fd int m view uchar * me ulong to int io = new uchar 16 0 -e = shr me 8 +e = and shr me 8 255 if eq e 0 e = cl_after cs m and me 255 end +if eq e 0 +tls_close cs +end x = fclose fd +if ne shr me 16 0 +sl = sleepns long mul shr me 16 1000000 +end if ne e 0 if eq get cs 0 3 tls_close cs diff --git a/om/tls/test/tls/dit.om b/om/tls/test/tls/dit.om new file mode 100644 index 000000000..86a007f2f --- /dev/null +++ b/om/tls/test/tls/dit.om @@ -0,0 +1,26 @@ +note DIT probe: prints "hwdit N" (1: FEAT_DIT advertised by the kernel, 0: not, -1: auxv unreadable) +note and exits 0 when N is 0 or 1, 1 otherwise. The expectation on a GB10 (Cortex-X925 / A725) is 1; +note dit.sh compares it with /proc/cpuinfo. +text dmsg "hwdit " +fn main to int +o = new uchar 16 0 +v = tls_hwdit +bad = ulong 0 +if or lt v 0 gt v 1 +bad = 1 +end +k = ulong 0 +if lt v 0 +put o 0 45 +k = 1 +v = neg v +end +put o k add 48 uchar v +put o add k 1 10 +w = write 1 dmsg 0 len dmsg +w = write 1 o 0 add k 2 +if eq bad 1 +ret 1 +end +ret 0 +end diff --git a/om/tls/test/tls/fakesrv.py b/om/tls/test/tls/fakesrv.py index 52f45b235..d37c68ca8 100755 --- a/om/tls/test/tls/fakesrv.py +++ b/om/tls/test/tls/fakesrv.py @@ -20,7 +20,16 @@ # tickets1500 1500 NewSessionTicket messages after the handshake -> UNEXPECTED_MESSAGE # closehs encrypted close_notify after EncryptedExtensions -> ALERT_RECEIVED 0 # closepre plaintext close_notify instead of the ServerHello -> ALERT_RECEIVED 0 -import hashlib, hmac, os, socket, sys +# Outside-review fixes (key lifetime and handshake deadline); the client runs with OPTS: +# loris ServerHello trickled one byte per 250 ms for 8 s, then close -> TIMEOUT (HSMS=2000) +# slowsh ServerHello one byte per 20 ms, then a correct handshake -> OK (HSMS=10000) +# kuexact 3 empty records, reply, close_notify = 5 under one key -> OK (REC=5) +# kuover 4 empty records, reply, close_notify = 6 under one key -> SEQUENCE_LIMIT (REC=5) +# kurot 4 empty, KeyUpdate at sequence 4, reply under the next key -> OK (REC=5) +# kuw:N reads the request under the client's key following its KeyUpdates; more than N +# records under one key, or no KeyUpdate at all, is answered with a fatal alert +# -> OK (REC=N, SPLIT=1) +import hashlib, hmac, os, socket, sys, time from cryptography import x509 from cryptography.hazmat.primitives import hashes, serialization from cryptography.hazmat.primitives.asymmetric import ec @@ -57,6 +66,16 @@ class Keys: hdr = b"\x17\x03\x03" + u(len(inner) + 16, 2) return hdr + self.aead.encrypt(nonce, inner, hdr) + def open(self, rec): + nonce = bytes(a ^ b for a, b in zip(self.iv, u(self.seq, 12))) + self.seq += 1 + inner = self.aead.decrypt(nonce, rec[5:], rec[:5]).rstrip(b"\x00") + return inner[-1], inner[:-1] + + +def next_secret(secret): + return expand_label(secret, b"traffic upd", b"", 32) + def recv_record(c): h = c.recv(5, socket.MSG_WAITALL) @@ -89,6 +108,18 @@ while p < end: q += 4 + kn p += 4 + n CCS = b"\x14\x03\x03\x00\x01\x01" +OKMODES = ("ok", "cvbad", "cvkey", "cvskip", "empty1500", "empty50", "tickets1500", + "slowsh", "kuexact", "kuover", "kurot") +kuw = mode.startswith("kuw:") # kuw:N: the client must rekey before N records under one key +hold = 0.0 +if mode.startswith("hold:"): # hold:S: write every secret to $FAKESRV_KEYS, wait S s, then reply + hold = float(mode[5:]) + mode = "hold" + OKMODES += ("hold",) +if kuw: + kulimit = int(mode[4:]) + mode = "kuw" + OKMODES += ("kuw",) if mode == "closepre": c.sendall(b"\x15\x03\x03\x00\x02\x01\x00") else: @@ -100,7 +131,22 @@ else: exts = ext(43, b"\x03\x04") + ext(51, b"\x00\x1d\x00\x20" + spub) body = b"\x03\x03" + os.urandom(32) + bytes([len(sid)]) + sid + b"\x13\x03\x00" + u(len(exts), 2) + exts sh = b"\x02" + u(len(body), 3) + body - c.sendall(b"\x16\x03\x03" + u(len(sh), 2) + sh) + shrec = b"\x16\x03\x03" + u(len(sh), 2) + sh + if mode == "loris": + # slow loris: one ServerHello byte every 250 ms, never finishing; the client must give up + # on its handshake budget (TLS_ERR_TIMEOUT), not wait for this close (TLS_ERR_EOF) + for i in range(32): + try: + c.sendall(shrec[i:i + 1]); time.sleep(0.25) + except OSError: + break + c.close(); sys.exit(0) + if mode == "slowsh": + # slow but finishing: the whole ServerHello one byte every 20 ms (about 2 s) + for i in range(len(shrec)): + c.sendall(shrec[i:i + 1]); time.sleep(0.02) + else: + c.sendall(shrec) c.sendall(CCS) if mode == "ccs2": c.sendall(CCS) @@ -111,6 +157,7 @@ else: early = extract(bytes(32), bytes(32)) hs = extract(expand_label(early, b"derived", H(b""), 32), shared) s_hs = expand_label(hs, b"s hs traffic", H(tr), 32) + c_hs = expand_label(hs, b"c hs traffic", H(tr), 32) sw = Keys(s_hs) hmsg = lambda t, b: bytes([t]) + u(len(b), 3) + b ee = hmsg(8, b"\x00\x00") @@ -129,7 +176,7 @@ else: c.sendall(sw.seal(22, big[i:i + 1])) except OSError: break - if mode in ("ok", "cvbad", "cvkey", "cvskip", "empty1500", "empty50", "tickets1500"): + if mode in OKMODES: der = lambda f: x509.load_pem_x509_certificate(open(f"{d}/{f}", "rb").read()).public_bytes(serialization.Encoding.DER) cl = b"".join(u(len(x), 3) + x + b"\x00\x00" for x in (der("good.pem"), der("int.pem"))) cert = hmsg(11, b"\x00" + u(len(cl), 3) + cl) @@ -146,23 +193,74 @@ else: fin = hmsg(20, hmac.new(expand_label(s_hs, b"finished", b"", 32), H(tr), hashlib.sha256).digest()) tr += fin c.sendall(sw.seal(22, cert) + (sw.seal(22, cv) if cv else b"") + sw.seal(22, fin)) - if mode in ("ok", "empty1500", "empty50", "tickets1500"): + if mode in ("ok", "empty1500", "empty50", "tickets1500", "slowsh", "kuexact", "kuover", "kurot", "kuw", "hold"): ms = extract(expand_label(hs, b"derived", H(b""), 32), bytes(32)) - aw = Keys(expand_label(ms, b"s ap traffic", H(tr), 32)) + s_ap = expand_label(ms, b"s ap traffic", H(tr), 32) + aw = Keys(s_ap) + if mode == "hold": + c_ap = expand_label(ms, b"c ap traffic", H(tr), 32) + keys = {"shared": shared, "early": early, "hs": hs, "c_hs": c_hs, "s_hs": s_hs, + "ms": ms, "c_ap": c_ap, "s_ap": s_ap} + for nm, sec in (("c_hs", c_hs), ("s_hs", s_hs), ("c_ap", c_ap), ("s_ap", s_ap)): + keys[nm + "_key"] = expand_label(sec, b"key", b"", 32) + keys[nm + "_iv"] = expand_label(sec, b"iv", b"", 12) + keys["c_fin"] = expand_label(c_hs, b"finished", b"", 32) + keys["s_fin"] = expand_label(s_hs, b"finished", b"", 32) + with open(os.environ["FAKESRV_KEYS"], "w") as f: + for nm, val in keys.items(): + f.write("%s %s\n" % (nm, val.hex())) c.settimeout(10) # client: change_cipher_spec, Finished, then the request - for _ in range(3): + for _ in range(2 if mode == "kuw" else 3): if recv_record(c) is None: break out = b"" - if mode == "empty1500": + if mode == "kuw": + # read the request one record at a time under the client's application key, + # following its KeyUpdates; refuse more than kulimit records under one key + c_ap = expand_label(ms, b"c ap traffic", H(tr), 32) + ar = Keys(c_ap) + req, used, updates, bad = b"", 0, 0, None + while b"\r\n\r\n" not in req: + rec = recv_record(c) + if rec is None: + bad = "eof"; break + used += 1 + if used > kulimit: + bad = "limit"; break + t, data = ar.open(rec) + if t == 22 and data[:1] == b"\x18": + c_ap = next_secret(c_ap); ar = Keys(c_ap); used = 0; updates += 1 + elif t == 23: + req += data + else: + bad = "type%d" % t; break + if bad is None and updates == 0: + bad = "noupdate" + print("kuw: updates=%d bad=%s" % (updates, bad), flush=True) + if bad is not None: + out = aw.seal(21, b"\x02\x0a") + elif mode == "empty1500": out = b"".join(aw.seal(23, b"") for _ in range(1500)) elif mode == "tickets1500": nst = hmsg(4, u(60, 4) + u(1, 4) + b"\x01\x00" + u(2, 2) + b"tk" + b"\x00\x00") out = b"".join(aw.seal(22, nst) for _ in range(1500)) elif mode == "empty50": out = b"".join(aw.seal(23, b"") for _ in range(50)) - if mode in ("ok", "empty50"): + elif mode == "kuexact": + # with the client's limit at 5: records 0..4 = 3 empty, the reply, close_notify + out = b"".join(aw.seal(23, b"") for _ in range(3)) + elif mode == "kuover": + # 4 empty + reply + close_notify = 6 records under one key: the 6th must be refused + out = b"".join(aw.seal(23, b"") for _ in range(4)) + elif mode == "kurot": + # 4 empty, then KeyUpdate at the last allowed sequence number, reply under the next key + out = b"".join(aw.seal(23, b"") for _ in range(4)) + out += aw.seal(22, hmsg(24, b"\x00")) + s_ap = next_secret(s_ap); aw = Keys(s_ap) + if mode == "hold": + time.sleep(hold) + if mode in ("ok", "empty50", "slowsh", "kuexact", "kuover", "kurot", "hold") or (mode == "kuw" and not out): out += aw.seal(23, b"HTTP/1.0 200 ok\r\ncontent-length: 3\r\n\r\nok\n") + aw.seal(21, b"\x01\x00") try: c.sendall(out) diff --git a/om/tls/test/tls/interop.sh b/om/tls/test/tls/interop.sh index baab42c6f..ef82b5ed0 100755 --- a/om/tls/test/tls/interop.sh +++ b/om/tls/test/tls/interop.sh @@ -80,6 +80,15 @@ nextport() { port=$((port + 1)) while ss -Hltn "sport = :$port" | grep -q .; do port=$((port + 1)); done } +# listening PORT: wait until a server listens on 127.0.0.1:PORT (at most 15 s). A fixed sleep raced a +# cold python3 start on a hosted runner: the client connected first and exited 3 (connect failure). +listening() { + n=0 + until ss -Hltn "sport = :$1" | grep -q .; do + n=$((n + 1)); [ "$n" -gt 150 ] && return 1 + sleep 0.1 + done +} fail=0; rows=0 # row LABEL EXPECT CERT CHAIN SERVER-ARGS... : EXPECT is OK or the TLS error name (and x509 name) row() { @@ -89,7 +98,7 @@ row() { # shellcheck disable=SC2086 openssl s_server -accept "127.0.0.1:$port" -naccept 1 -cert "$cert.pem" -key "$cert.key" $ch -www "$@" > "s$port.log" 2>&1 & sp=$! - sleep 0.4 + listening "$port" timeout 30 "$client" localhost "$port" get 127.0.0.1 "$d/root.pem" > "c$port.out" 2> "c$port.err" rc=$? kill "$sp" 2> /dev/null; wait "$sp" 2> /dev/null @@ -121,7 +130,7 @@ fake() { nextport; rows=$((rows + 1)) python3 "$here/fakesh.py" "$port" "$1" > "f$port.log" 2>&1 & fp=$! - sleep 0.4 + listening "$port" timeout 30 "$client" localhost "$port" get 127.0.0.1 "$d/root.pem" > "c$port.out" 2> "c$port.err"; rc=$? kill "$fp" 2> /dev/null; wait "$fp" 2> /dev/null got="$(tr -d '\n' < "c$port.err") (exit $rc)" @@ -139,16 +148,17 @@ fake trail "TLSERR TLS_ERR_DECODE" # full handshakes from fakesrv.py (security review of omega-mv #813): CCS policy, record-count caps, # CertificateVerify refusals, close_notify during the handshake. EXPECT OK needs exit 0 and the reply. +# fsrv MODE EXPECT [OPTS]: OPTS is the client's "REC,HSMS,SPLIT" (record limit, handshake ms, split) fsrv() { nextport; rows=$((rows + 1)) python3 "$here/fakesrv.py" "$port" "$d" "$1" > "f$port.log" 2>&1 & fp=$! - sleep 0.6 - timeout 60 "$client" localhost "$port" get 127.0.0.1 "$d/root.pem" > "c$port.out" 2> "c$port.err"; rc=$? + listening "$port" + timeout 60 "$client" localhost "$port" get 127.0.0.1 "$d/root.pem" / "${3:-0}" > "c$port.out" 2> "c$port.err"; rc=$? kill "$fp" 2> /dev/null; wait "$fp" 2> /dev/null if [ "$rc" = 0 ] && grep -q '^HTTP/1.0 200 ok' "c$port.out"; then got=OK; else got="$(tr -d '\n' < "c$port.err") (exit $rc)"; fi case "$got" in "$2"*) v=PASS ;; *) v=FAIL; fail=1 ;; esac - printf '%s | %-28s | expect %-60s | got %s\n' "$v" "fakesrv: $1" "$2" "$got" + printf '%s | %-28s | expect %-60s | got %s\n' "$v" "fakesrv: $1${3:+ [$3]}" "$2" "$got" } fsrv ok OK fsrv empty50 OK @@ -165,6 +175,13 @@ fsrv empty1500 "TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17)" fsrv tickets1500 "TLSERR TLS_ERR_UNEXPECTED_MESSAGE detail 0 (exit 17)" fsrv closehs "TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31)" fsrv closepre "TLSERR TLS_ERR_ALERT_RECEIVED detail 0 (exit 31)" +# key lifetime (RFC 8446 section 5.5) with the test-only record limit, and the handshake budget +fsrv kuexact OK 5,0,0 +fsrv kuover "TLSERR TLS_ERR_SEQUENCE_LIMIT detail 0 (exit 38)" 5,0,0 +fsrv kurot OK 5,0,0 +fsrv kuw:8 OK 8,0,1 +fsrv loris "TLSERR TLS_ERR_TIMEOUT detail 0 (exit 13)" 0,2000,0 +fsrv slowsh OK 0,10000,0 # record tamper: a proxy flips one bit in the first server application-data record after the # handshake (the 5th server record); the client must refuse it with bad_record_mac @@ -173,7 +190,7 @@ openssl s_server -accept "127.0.0.1:$bp" -naccept 1 -cert good.pem -key good.key sp=$! python3 "$here/tamper.py" "$port" "$bp" > "p$port.log" 2>&1 & pp=$! -sleep 0.6 +listening "$bp"; listening "$port" timeout 30 "$client" localhost "$port" get 127.0.0.1 "$d/root.pem" > "c$port.out" 2> "c$port.err"; rc=$? kill "$sp" "$pp" 2> /dev/null; wait "$sp" "$pp" 2> /dev/null got="$(tr -d '\n' < "c$port.err") (exit $rc)" diff --git a/om/tls/test/tls/residue.py b/om/tls/test/tls/residue.py new file mode 100755 index 000000000..d9d947876 --- /dev/null +++ b/om/tls/test/tls/residue.py @@ -0,0 +1,129 @@ +#!/usr/bin/env python3 +# Secret residue check: do handshake secrets survive in the client's memory after the +# handshake, and do any keys survive tls_close? usage: residue.py CLIENT PKIDIR [--keep] +# +# fakesrv.py (mode hold:S) completes a handshake, writes every secret it derived to a file, +# waits S seconds and then answers. During the wait the client is blocked in tls_read with the +# handshake over; after the reply the client calls tls_close and (OPTS PAUSEMS) sleeps. At both +# points this script reads the client's writable private mappings through /proc/PID/mem (the +# client is its child, so Yama ptrace_scope 1 allows it) and counts every occurrence of each +# secret. Secrets are 32 bytes (16 for an AES key), so a chance match is impossible. +# +# Expectations (fail closed): +# after the handshake: c_ap/s_ap secrets, keys and ivs present (positive control: the scan +# works; they live in c[TLCAP..], c[TLWKEY..]); shared, early, hs, c_hs, s_hs, ms, the +# handshake keys and ivs and the finished keys absent everywhere. +# after tls_close: every secret absent. +# Prints RESIDUE PASS or RESIDUE FAIL with the offending secret names and the mapping they +# were found in. Exit 0 / 1; 3 (NOT_RUN) when /proc/PID/mem cannot be read. +import os, socket, subprocess, sys, tempfile, time + +HS_ONLY = ("shared", "early", "hs", "c_hs", "s_hs", "ms", "c_hs_key", "s_hs_key", + "c_hs_iv", "s_hs_iv", "c_fin", "s_fin") +AP = ("c_ap", "s_ap", "c_ap_key", "s_ap_key", "c_ap_iv", "s_ap_iv") + + +def free_port(): + s = socket.socket() + s.bind(("127.0.0.1", 0)) + p = s.getsockname()[1] + s.close() + return p + + +def scan(pid, secrets): + """{name: [(mapping, count), ...]} over every writable private mapping of pid.""" + found = {n: [] for n in secrets} + with open("/proc/%d/maps" % pid) as mf, open("/proc/%d/mem" % pid, "rb", 0) as mem: + for line in mf: + f = line.split() + lo, hi = (int(x, 16) for x in f[0].split("-")) + perms, name = f[1], (f[5] if len(f) > 5 else "anon") + if "w" not in perms or "p" not in perms or name.startswith("[v"): + continue + try: + mem.seek(lo) + data = mem.read(hi - lo) + except OSError: + continue + for n, v in secrets.items(): + k = data.count(v) + if k: + found[n].append((name, k)) + return found + + +def main(): + client, pki = sys.argv[1], sys.argv[2] + keep = "--keep" in sys.argv + work = tempfile.mkdtemp(prefix="residue-") + port = free_port() + keyfile = os.path.join(work, "keys.txt") + here = os.path.dirname(os.path.abspath(__file__)) + env = dict(os.environ, FAKESRV_KEYS=keyfile) + srv = subprocess.Popen([sys.executable, os.path.join(here, "fakesrv.py"), str(port), pki, "hold:4"], + stdout=open(os.path.join(work, "srv.log"), "w"), stderr=subprocess.STDOUT, env=env) + time.sleep(0.6) + cl = subprocess.Popen([client, "localhost", str(port), "get", "127.0.0.1", + os.path.join(pki, "root.pem"), "/", "0,0,0,4000"], + stdout=open(os.path.join(work, "client.out"), "w"), + stderr=open(os.path.join(work, "client.err"), "w")) + t0 = time.time() + while not os.path.exists(keyfile) and time.time() - t0 < 20: + time.sleep(0.05) + if not os.path.exists(keyfile): + print("RESIDUE NOT_RUN: fakesrv wrote no keys (%s)" % work) + cl.kill(); srv.kill() + return 3 + time.sleep(1.0) # the client has consumed Finished and is blocked in tls_read + secrets = {} + for line in open(keyfile): + n, h = line.split() + secrets[n] = bytes.fromhex(h) + try: + after_hs = scan(cl.pid, secrets) + except PermissionError as e: + print("RESIDUE NOT_RUN: /proc/%d/mem unreadable (%s)" % (cl.pid, e)) + cl.kill(); srv.kill() + return 3 + # wait for the reply, tls_close and the client's pause + t0 = time.time() + while time.time() - t0 < 20: + out = open(os.path.join(work, "client.out"), "rb").read() + if b"HTTP/1.0 200 ok" in out and cl.poll() is None: + break + time.sleep(0.05) + time.sleep(0.5) + if cl.poll() is not None: + print("RESIDUE NOT_RUN: client exited before the post-close scan (exit %s)" % cl.returncode) + srv.kill() + return 3 + after_close = scan(cl.pid, secrets) + cl.wait(timeout=20) + srv.wait(timeout=20) + bad = [] + for n in HS_ONLY: + if after_hs[n]: + bad.append("after handshake: %s in %s" % (n, after_hs[n])) + for n in AP: + if not after_hs[n]: + bad.append("after handshake: positive control %s not found (scan broken)" % n) + for n in secrets: + if after_close[n]: + bad.append("after tls_close: %s in %s" % (n, after_close[n])) + for n in sorted(secrets): + print("residue %-9s after-handshake=%-24s after-close=%s" % (n, after_hs[n] or "-", after_close[n] or "-")) + print("client exit %d, %s" % (cl.returncode, open(os.path.join(work, "client.err")).read().strip() or "no stderr")) + if cl.returncode != 0: + bad.append("client exit %d" % cl.returncode) + if bad: + print("RESIDUE FAIL\n " + "\n ".join(bad)) + return 1 + print("RESIDUE PASS secrets=%d hs_only=%d" % (len(secrets), len(HS_ONLY))) + if not keep: + subprocess.call(["rm", "-rf", work]) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/om/tls/test/tls/run.sh b/om/tls/test/tls/run.sh index 6f0faca0f..e5763865c 100755 --- a/om/tls/test/tls/run.sh +++ b/om/tls/test/tls/run.sh @@ -85,6 +85,20 @@ dmut "mutant dns owner ignored" 's/^if eq dns_neq r o cur 0$/if lt dns_neq r dmut "mutant dns label cap gone" 's/^if gt k 127$/if gt k 9999/' dmut "mutant dns_a4 name length unchecked" 's/^if gt len hn 253$/if gt len hn 9999/' +# DIT: tls_hwdit must agree with the kernel's cpuinfo flag (1 on a GB10, 0 on hosted runners); a +# mutant looking for an auxv key that no kernel emits (60) must report -1 on every host +if grep -qw dit /proc/cpuinfo; then dexp=1; else dexp=0; fi +build dit "$tls/tls.om" "$here/dit.om" || exit 1 +dgot=$("$out/dit/bin" | sed -n 's/^hwdit //p') +if [ "$dgot" = "$dexp" ]; then echo "PASS dit: hwdit=$dgot cpuinfo=$dexp"; else echo "FAIL dit: hwdit=$dgot cpuinfo=$dexp"; fail=1; fi +sed 's/^if eq k 16$/if eq k 60/' "$tls/tls.om" > "$out/m.om" +if cmp -s "$out/m.om" "$tls/tls.om"; then echo "FAIL mutant auxv key: the mutation did not apply"; fail=1 +else + rm -rf "$out/dm"; build dm "$out/m.om" "$here/dit.om" || fail=1 + mut=$((mut + 1)); mgot=$("$out/dm/bin" | sed -n 's/^hwdit //p') + if [ "$mgot" = "-1" ]; then mutok=$((mutok + 1)); echo "PASS mutant auxv key detected: hwdit=$mgot"; else echo "FAIL mutant auxv key not detected: hwdit=$mgot"; fail=1; fi +fi + # interop with the real tls.om build client "$tls/tls.om" "$here/client.om" || exit 1 if sh "$here/interop.sh" "$out/client/bin" > "$out/interop.log" 2>&1; then @@ -114,6 +128,34 @@ imut "mutant handshake close_notify unmapped" '/^if eq e TLCLOSE$/{n;s/^ret TLEA imut "mutant version not checked" 's/^ret TLEVER$/ret 0/' imut "mutant record MAC ignored" 's/^ret TLEMAC$/ret 0/' imut "mutant session id not checked" 's/^ret TLESID$/ret 0/' +# outside-review fixes: record limit on read and write, proactive KeyUpdate, handshake budget. +# "KeyUpdate not sent" is caught by the client's own seal limit (SEQUENCE_LIMIT); with both gone +# the kuw:8 server sees too many records under one key and answers with a fatal alert. +imut "mutant read record limit gone" '/^fn tls_open /,/^end$/s/^if ge tls_gn c TLRS 8 tls_reclim c$/if ge tls_gn c TLRS 8 99999999/' +imut "mutant write KeyUpdate not sent" 's/^if ge tls_gn c TLWS 8 sub tls_reclim c 1$/if ge tls_gn c TLWS 8 99999999/' +imut "mutant write limit and KeyUpdate gone" 's/^if ge tls_gn c TLWS 8 sub tls_reclim c 1$/if ge tls_gn c TLWS 8 99999999/; s/^if ge tls_gn c TLWS 8 tls_reclim c$/if ge tls_gn c TLWS 8 99999999/' +imut "mutant handshake budget not armed" 's/^tls_pn c TLDL add ulong monons b 8$/tls_pn c TLDL 0 8/' + +# secret residue (outside review, item 4b): after the handshake no handshake secret may remain in +# the client's memory; after tls_close no secret at all. The interop PKI must exist (built above). +res="NOT_RUN" +rc=0; python3 "$here/residue.py" "$out/client/bin" "$root/build/tls/interop" > "$out/residue.log" 2>&1 || rc=$? +if [ "$rc" = 0 ]; then res="PASS"; echo "PASS residue: $(tail -n 1 "$out/residue.log")" +elif [ "$rc" = 3 ]; then echo "NOT_RUN residue: $(tail -n 1 "$out/residue.log")" +else res="FAIL"; echo "FAIL residue:"; cat "$out/residue.log"; fail=1; fi +rmut() { # LABEL SED-EXPR: the residue check must fail on the mutant + [ "$res" = PASS ] || return + sed "$2" "$tls/tls.om" > "$out/m.om" + if cmp -s "$out/m.om" "$tls/tls.om"; then echo "FAIL $1: the mutation did not apply"; fail=1; return; fi + rm -rf "$out/rm"; build rm "$out/m.om" "$here/client.om" || { fail=1; return; } + mut=$((mut + 1)) + rc=0; python3 "$here/residue.py" "$out/rm/bin" "$root/build/tls/interop" > "$out/rm.log" 2>&1 || rc=$? + if [ "$rc" = 1 ]; then mutok=$((mutok + 1)); echo "PASS $1 detected: $(grep -c '^ after' "$out/rm.log") residues" + else echo "FAIL $1 not detected (exit $rc)"; fail=1; fi +} +rmut "mutant close keeps the traffic secrets" '/^fn tls_wipe /,/^end$/s/^tls_zero c TLCAP 64$/tls_zero c TLCAP 0/' +rmut "mutant handshake secrets kept after Finished" 's/^tls_zero c TLHS 128$/tls_zero c TLHS 0/' +rmut "mutant shared secret kept" 's/^tls_zero c TLSS 32$/tls_zero c TLSS 0/' if [ "${TLS_NET:-0}" = 1 ]; then if python3 "$here/parity.py" "$out/client/bin" api.github.com /licenses/mit /licenses/apache-2.0 /repos/torvalds/linux/license > "$out/net.log" 2>&1 \ @@ -128,6 +170,6 @@ else fi if [ $fail = 0 ]; then - echo "TLS PASS vectors=$kcount (rfc8448) dns=$dcount interop=$irows net=$net mutants=$mutok/$mut"; exit 0 + echo "TLS PASS vectors=$kcount (rfc8448) dns=$dcount dit=$dgot interop=$irows residue=$res net=$net mutants=$mutok/$mut"; exit 0 fi -echo "TLS FAIL vectors=${kcount:-0} dns=${dcount:-0} interop=${irows:-0} net=$net mutants=$mutok/$mut"; exit 1 +echo "TLS FAIL vectors=${kcount:-0} dns=${dcount:-0} dit=${dgot:-?} interop=${irows:-0} residue=$res net=$net mutants=$mutok/$mut"; exit 1 diff --git a/om/tls/test/tls/timing.om b/om/tls/test/tls/timing.om new file mode 100644 index 000000000..9e29830c8 --- /dev/null +++ b/om/tls/test/tls/timing.om @@ -0,0 +1,210 @@ +note dudect-style timing driver (Reparaz, Balasch, Verbauwhede 2016): usage: timing WHAT N +note WHAT: x25519 (scalar fixed vs random, base point fixed), chacha / aesgcm (key and nonce fixed +note vs random, 1024-byte plaintext fixed), cteq (32-byte compare: equal vs random second input, +note 2000 compares per measurement). Each of the N measurements draws its class from getrandom, +note prepares the input, then times one operation with monons and prints "CLASS NANOSECONDS". +note The statistics (Welch's t-test between the classes) are computed outside: timing.py. +note Exit 0; 2 on a usage error; 3 when an operation reports an error. +text tusage "usage: timing x25519|chacha|aesgcm|cteq N\n" +text tx "x25519" +text tc "chacha" +text ta "aesgcm" +text tq "cteq" + +fn tm_arg i ulong a edit uchar * to ulong +n = argread i a 0 len a +if lt n 0 +ret 0 +end +ret ulong n +end + +fn tm_num a view uchar * n ulong to ulong +v = ulong 0 +for i ulong n +d = ulong get a i +if or lt d 48 gt d 57 +ret 0 +end +v = add mul v 10 sub d 48 +if gt v 99999999 +ret 0 +end +end +ret v +end + +fn tm_is a view uchar * n ulong t view uchar * to ulong +if ne n len t +ret 0 +end +for i ulong n +if ne get a i get t i +ret 0 +end +end +ret 1 +end + +note fixed class: a constant pattern; random class: getrandom bytes. Both classes pay the +note getrandom call so the cache and TLB state before the timed window does not differ by class. +fn tm_fill b edit uchar * n ulong cls ulong to ulong +r = random b 0 n 0 +if ne r long n +ret 1 +end +if eq cls 0 +for i ulong n +put b i uchar add 17 rem mul i 7 211 +end +end +ret 0 +end + +fn tm_line cls ulong ns ulong o edit uchar * to ulong +put o 0 add 48 uchar cls +put o 1 32 +k = ulong 2 +d = new uchar 24 0 +m = ulong 0 +v = ns +while true bound 24 +put d m uchar add 48 rem v 10 +v = div v 10 +m = add m 1 +if eq v 0 +break +end +end +for i ulong m +put o k get d sub sub m 1 i +k = add k 1 +end +put o k 10 +ret add k 1 +end + +fn tm_emit cls ulong t0 long t1 long o edit uchar * to void +m = tm_line cls ulong sub t1 t0 o +w = write 1 o 0 m +end + +fn tm_x25519 n ulong o edit uchar * to ulong +k = new uchar 32 0 +u = new uchar 32 0 +s = new uchar 32 0 +c = new uchar 1 0 +put u 0 9 +for i ulong n +r = random c 0 1 0 +cls = and ulong get c 0 1 +if ne tm_fill k 32 cls 0 +ret 3 +end +t0 = monons +e = x25519_scalarmult s k u +t1 = monons +if ne e 0 +ret 3 +end +tm_emit cls t0 t1 o +end +ret 0 +end + +fn tm_pt buf edit uchar * to void +for j ulong len buf +put buf j uchar rem j 251 +end +end + +note which: 0 chacha, 1 aesgcm +fn tm_cls c edit uchar * to ulong +r = random c 0 1 0 +ret and ulong get c 0 1 +end + +fn tm_one kn view uchar * buf edit uchar * which ulong to ulong +ad = new uchar 5 0 +if eq which 0 +ret aead_chacha_seal kn ad buf +end +ret aead_aes128gcm_seal part kn 0 28 ad buf +end + +fn tm_aead n ulong o edit uchar * which ulong to ulong +kn = new uchar 44 0 +buf = new uchar 1040 0 +c = new uchar 1 0 +for i ulong n +cls = tm_cls c +if ne tm_fill kn 44 cls 0 +ret 3 +end +tm_pt buf +t0 = monons +e = tm_one kn buf which +t1 = monons +if ne e 0 +ret 3 +end +tm_emit cls t0 t1 o +end +ret 0 +end + +fn tm_cteq n ulong o edit uchar * to ulong +a = new uchar 32 0 +b = new uchar 32 0 +c = new uchar 1 0 +for i ulong 32 +put a i uchar add 17 rem mul i 7 211 +end +for i ulong n +r = random c 0 1 0 +cls = and ulong get c 0 1 +if ne tm_fill b 32 cls 0 +ret 3 +end +acc = ulong 0 +t0 = monons +for j ulong 2000 +acc = add acc tls_cteq a b 0 32 +end +t1 = monons +if and eq cls 0 ne acc 0 +ret 3 +end +tm_emit cls t0 t1 o +end +ret 0 +end + +fn main to int +a = new uchar 64 0 +o = new uchar 64 0 +if ne argcnt 3 +w = write 2 tusage 0 len tusage +ret 2 +end +wl = tm_arg 1 a +n = tm_num part a 32 32 tm_arg 2 part a 32 32 +if or eq n 0 eq wl 0 +w = write 2 tusage 0 len tusage +ret 2 +end +if eq tm_is a wl tx 1 +ret int tm_x25519 n o +end +if eq tm_is a wl tc 1 +ret int tm_aead n o 0 +end +if eq tm_is a wl ta 1 +ret int tm_aead n o 1 +end +if eq tm_is a wl tq 1 +ret int tm_cteq n o +end +w = write 2 tusage 0 len tusage +ret 2 +end diff --git a/om/tls/tls.om b/om/tls/tls.om index d96cc0860..0cc116998 100644 --- a/om/tls/tls.om +++ b/om/tls/tls.om @@ -39,6 +39,9 @@ const TLHF ulong 488 const TLDET ulong 492 note change_cipher_spec state: 0 none allowed yet, 1 one allowed (after ServerHello), 2 no more const TLCCS ulong 496 +note record limit override (4 bytes, 0 = TLKUREC) and handshake budget in ns (8 bytes, 0 = TLHSNS) +const TLKUL ulong 500 +const TLHSL ulong 504 const TLEPK ulong 512 const TLEPU ulong 544 const TLSID ulong 576 @@ -54,6 +57,10 @@ const TLLF ulong 36864 const TLLFSZ ulong 16896 const TLHB ulong 53760 const TLHBSZ ulong 65536 +note RFC 8446 section 5.5: at most 2^24.5 = 23726566 records under one AES-GCM key (applied to both +note suites); the whole handshake must finish within TLHSNS (30 s) unless the caller set a deadline +const TLKUREC ulong 23726566 +const TLHSNS ulong 30000000000 note error codes (tls_errname gives the names) const TLEARG ulong 1 @@ -132,6 +139,7 @@ text TLLUPD "traffic upd" text TLCVC "TLS 1.3, server CertificateVerify" text TLALPN "http/1.1" text TLRESOLV "/etc/resolv.conf" +text TLAUXV "/proc/self/auxv" text TLNS "nameserver" note ---- byte helpers (big-endian, n <= 8) ---- @@ -432,10 +440,41 @@ tls_pn c o add sq 1 8 ret 0 end -note decrypt the record at c[TLRB] whose body is ln bytes; 0 or TLEMAC +note the record limit in force: TLKUREC or the lower test-only value set by tls_reclimit +fn tls_reclim c view uchar * to ulong +v = tls_gn c TLKUL 4 +if eq v 0 +ret TLKUREC +end +ret v +end + +note tls_reclimit: lower the per-key record limit before tls_connect (tests); it cannot be raised +fn tls_reclimit c edit uchar * n ulong to ulong +if or ne get c TLPH 0 or eq n 0 ge n TLKUREC +ret TLEARG +end +tls_pn c TLKUL n 4 +ret 0 +end + +note tls_hslimit: the whole-handshake budget in ns used when no deadline is set (0 = TLHSNS) +fn tls_hslimit c edit uchar * ns ulong to ulong +if ne get c TLPH 0 +ret TLEARG +end +tls_pn c TLHSL ns 8 +ret 0 +end + +note decrypt the record at c[TLRB] whose body is ln bytes; 0, TLEMAC, or TLESEQ when the peer sent +note more records under this key than the limit allows without a KeyUpdate (fail closed) fn tls_open c edit uchar * ln ulong to ulong kn = new uchar 44 0 ad = new uchar 5 0 +if ge tls_gn c TLRS 8 tls_reclim c +ret TLESEQ +end for i ulong 5 put ad i get c add TLRB i end @@ -456,10 +495,14 @@ end ret 0 end -note encrypt c[TLWB+5 .. +n) (inner plaintext incl. type byte), header already at c[TLWB] +note encrypt c[TLWB+5 .. +n) (inner plaintext incl. type byte), header already at c[TLWB]; +note TLESEQ when the write key reached its record limit (tls_write rekeys before that) fn tls_seal c edit uchar * n ulong to ulong kn = new uchar 44 0 ad = new uchar 5 0 +if ge tls_gn c TLWS 8 tls_reclim c +ret TLESEQ +end for i ulong 5 put ad i get c add TLWB i end @@ -1531,9 +1574,7 @@ if ne d 0 tls_alert c d end put c TLPH 3 -tls_zero c TLWKEY 96 -tls_zero c TLCAP 64 -tls_zero c TLEPK 320 +tls_wipe c ret e end @@ -1595,7 +1636,9 @@ end ret 0 end -note full handshake on the connected socket fd; 0 or a named error code (tls_errname) +note full handshake on the connected socket fd; 0 or a named error code (tls_errname). +note Without a caller deadline (tls_deadline) the whole handshake is bounded by the budget of +note tls_hslimit (default TLHSNS, 30 s); that deadline is cleared again once connected. fn tls_connect c edit uchar * st view uchar * fd int to ulong if or ne get c TLPH 0 eq get c TLHL 0 ret TLESTAT @@ -1604,6 +1647,15 @@ if lt fd 0 ret TLEARG end tls_pn c TLFD ulong fd 4 +mine = ulong 0 +if eq tls_gn c TLDL 8 0 +mine = 1 +b = tls_gn c TLHSL 8 +if eq b 0 +b = TLHSNS +end +tls_pn c TLDL add ulong monons b 8 +end th = new ulong 40 0 sha256_init th e = tls_mkch c @@ -1628,6 +1680,9 @@ end if ne e 0 ret tls_abort c e end +if eq mine 1 +tls_pn c TLDL 0 8 +end put c TLPH 1 ret 0 end @@ -1650,6 +1705,21 @@ e = new uchar 1 0 r = tls_drv c tls_sel TLSAP TLSAP 32 TLIUPD part e 0 0 r = or r tls_keys c TLSAP 1 if eq v 1 +x = tls_kusend c +if ne x 0 +ret x +end +end +if ne r 0 +ret TLEARG +end +ret 0 +end + +note send KeyUpdate(update_not_requested) under the current write key, then switch to the next +note write key (RFC 8446 section 4.6.3 and 7.2); 0 or an error code +fn tls_kusend c edit uchar * to ulong +e = new uchar 1 0 b = add TLWB 5 put c b 24 tls_pn c add b 1 1 3 @@ -1658,9 +1728,8 @@ x = tls_wrbuf c 22 5 if ne x 0 ret x end -r = or r tls_drv c tls_sel TLCAP TLCAP 32 TLIUPD part e 0 0 +r = tls_drv c tls_sel TLCAP TLCAP 32 TLIUPD part e 0 0 r = or r tls_keys c TLCAP 0 -end if ne r 0 ret TLEARG end @@ -1775,13 +1844,21 @@ end ret TLEUNEX end -note tls_write: send all of m as application data; returns len m or minus an error code +note tls_write: send all of m as application data; returns len m or minus an error code. +note Before the write key's last allowed record a KeyUpdate is sent and the key rotated +note (RFC 8446 section 5.5), so application data never exhausts the record limit. fn tls_write c edit uchar * m view uchar * to long if ne get c TLPH 1 ret neg long TLESTAT end off = ulong 0 while lt off len m bound 999999 +if ge tls_gn c TLWS 8 sub tls_reclim c 1 +e = tls_kusend c +if ne e 0 +ret neg long tls_abort c e +end +end k = sub len m off if gt k 16384 k = 16384 @@ -1798,7 +1875,8 @@ end ret long len m end -note tls_close: send close_notify (when connected) and wipe the key material. The caller closes fd. +note tls_close: send close_notify (when connected), wipe the key material and every buffer that +note held plaintext, records or certificates. The caller closes fd. note A failed connection stays failed (later calls give TLS_ERR_STATE). fn tls_close c edit uchar * to void if eq get c TLPH 1 @@ -1809,9 +1887,62 @@ end if ne get c TLPH 3 put c TLPH 2 end +tls_wipe c +end + +note zero the secrets (keys, IVs, traffic secrets, ephemeral key, shared secret, transcript +note secrets) and the record, write, leaf and handshake buffers; the state words stay +fn tls_wipe c edit uchar * to void tls_zero c TLWKEY 96 tls_zero c TLCAP 64 tls_zero c TLEPK 320 +tls_zero c TLRB sub TLCSZ TLRB +end + +note ---- data-independent timing (Arm DIT, DDI0487 C5.2.4) ---- +note tls_hwdit: 1 when the kernel advertises FEAT_DIT in AT_HWCAP (/proc/self/auxv entry 16, +note bit 24 = HWCAP_DIT), 0 when it does not, -1 when auxv cannot be read. Whether the bit is +note advertised says nothing about PSTATE.DIT, which Linux starts at 0 for every process and +note this library cannot set: an `msr DIT, #1` needs a compiler word (see THREAT_MODEL.md). +fn tls_hwdit to long +b = new uchar 1024 0 +fd = fopen TLAUXV 0 len TLAUXV 0 0 +if lt fd 0 +ret -1 +end +n = long 0 +r = long 0 +while lt n 1024 bound 64 +r = read int fd b ulong n sub 1024 ulong n +if le r 0 +break +end +n = add n r +end +r = fclose int fd +if lt n 16 +ret -1 +end +for i ulong div ulong n 16 +o = mul i 16 +k = tls_gl b o +if eq k 16 +ret long and shr tls_gl b add o 8 24 1 +end +if eq k 0 +break +end +end +ret -1 +end + +note little-endian 64-bit word at b[o..o+8) +fn tls_gl b view uchar * o ulong to ulong +v = ulong 0 +for j ulong 8 +v = or v shl ulong get b add o j mul j 8 +end +ret v end note ---- DNS A lookup (RFC 1035) over UDP to the first IPv4 nameserver in /etc/resolv.conf ---- diff --git a/seed/json/.crumb b/seed/json/.crumb index 731cc0cae..4d952f8d5 100644 --- a/seed/json/.crumb +++ b/seed/json/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-29T01:41:23Z", + "compiled_at": "2026-10-30T02:45:42Z", "compiler": "crumb-compile/1", - "digest": "sha256:64de1d1ba72bd069fc265430a6aa4ea18b544024e3aba296da94b85c062b7122", + "digest": "sha256:cdea51250fba9ec472d79027b624c9e09bb984d407ebe5a2173810b4834b5cca", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 7, - "generated_at_commit": "28a7b749a6da68407af60a7cccaf34dc2e5eab48", - "source_tree": "sha256:dea98012ac396d8bdb162015e5edb802188484f525c87d383046ca778a4c2ebf" + "generated_at_commit": "c4bf4150b7f1111580cd714b12d020894425ff48", + "source_tree": "sha256:a77710476e49a2c6aa731bf7a18114e4fcf2980a5c2037ad2af3c3cb535048fc" } }, "layer": "seed", diff --git a/seed/json/README.md b/seed/json/README.md index 30da70896..9c629d84f 100644 --- a/seed/json/README.md +++ b/seed/json/README.md @@ -25,7 +25,7 @@ The units contain no `om2` line, no `global`, no `text` and no host word. The ca them into one OM-2 program unit: ```sh -{ printf 'om2\n'; cat seed/json/json.om seed/json/jsonw.om [seed/json/jsonf.om] seed/net/http.om app.om; } > app.full.om +{ printf 'om2\n'; cat seed/json/json.om seed/json/jsonw.om [seed/json/jsonf.om] seed/net/http.om seed/net/notls.om app.om; } > app.full.om nice -n 19 seed/out/omc < app.full.om > app ``` diff --git a/seed/net/.crumb b/seed/net/.crumb index 79be3cb59..bb948f73b 100644 --- a/seed/net/.crumb +++ b/seed/net/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-27T17:39:58Z", + "compiled_at": "2026-10-30T02:45:42Z", "compiler": "crumb-compile/1", - "digest": "sha256:7f14f94e063d7af7fcac85fe759f6d45538afd26aa0bea2a7f6c9fc43f74c6be", + "digest": "sha256:eae38c8e92dcbb7a885116b2aa1ad893ada4fd87dd4b8d93013c69537d624bd4", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "files": 7, - "generated_at_commit": "7900a8fcd3b028b27d2fc0f4a68c5597ca94fb31", - "source_tree": "sha256:35c88ddf89a1bfd85e7e5e6086509887c3d6f23c56d0e656e03ce4d55c398117" + "files": 11, + "generated_at_commit": "c4bf4150b7f1111580cd714b12d020894425ff48", + "source_tree": "sha256:ecd730ff47024ad7fdf333c9fa101f307a0ec564f4ba429f499f296cd7998090" } }, "invariants": [ diff --git a/seed/net/README.md b/seed/net/README.md index b7a1ea82e..e64b2c31e 100644 --- a/seed/net/README.md +++ b/seed/net/README.md @@ -14,10 +14,14 @@ only: no hardware or deployment claim. | Path | What it is | |---|---| | `http.om` | The library unit. No `om2` line, no `fn main`, no globals. | +| `notls.om` | The three transport hooks for a program without TLS (every one returns `HENOSUP`). Composed after `http.om`. | +| `https.om` | The same three hooks implemented with the om/tls TLS 1.3 client, plus `htlsinit` / `htlsconn` / `htlsend`. Composed after the om/tls units and `http.om`. | | `examples/sse_server.om` | An embeddable server: `/health`, `/events` (SSE), `/echo` (body up to 1 MiB). | | `examples/sse_client.om` | An incremental SSE client that prints one line per event. | | `tests/parse.om` | Memory-mode parser driver for the corpus. | | `tests/live.om` | Loopback socket tests: bodies, keep-alive, pipelining, SSE, malformed requests, deadlines, descriptor leaks. | +| `tests/https.om` | HTTPS GET through `https.om`: `https HOST PORT STOREFILE PATH [CONNECTHOST [IDLEMS]]`, body to stdout, `status N` / `HTTPSERR r` to stderr. | +| `tests/nosup.om` | A program without TLS must refuse every byte on a non-TCP transport. | | `tests/check.py` | Host referee: builds everything, runs the corpus, the mutants, `live.om` and the curl / http.client end-to-end check. | ## Building a program @@ -26,7 +30,16 @@ The library has no `om2` line, so the application build adds one line in front o concatenated units: ```sh -{ printf 'om2\n'; cat seed/net/http.om app.om; } | seed/out/omc > app +{ printf 'om2\n'; cat seed/net/http.om seed/net/notls.om app.om; } | seed/out/omc > app +``` + +A program that speaks HTTPS composes the om/tls units and `https.om` instead of `notls.om` +(exactly one of the two, after `http.om`): + +```sh +{ printf 'om2\n' + for u in sha2 hkdf x25519 chacha aesgcm ec rsa x509 tls; do cat om/tls/$u.om; done + cat seed/net/http.om seed/net/https.om app.om; } | seed/out/omc > app ``` A program that also parses JSON adds `seed/json/json.om` in the same `cat`. Names in @@ -158,6 +171,17 @@ st = hrsprd cs io final status (put cs HISHEAD 1 first after a n = hbodyrd cs io d Content-Length, chunked or close-delimited ``` +HTTPS (`https.om`): after `hinit` and before any I/O, `htlsinit cs io host` reserves the +transport region `io[HTB, HTB + TLCSZ)` (119296 bytes; `io` must hold it plus at least 512 +bytes of read and write regions) and starts the om/tls client for the TLS name `host` with +ALPN `http/1.1`; `htlsconn cs io st` runs the handshake against the trust store `st` +(`TLSTSZ` bytes filled by `tls_store` or `tls_storef`); the request and response functions +then work unchanged; `htlsend cs io` sends close_notify, wipes the keys and closes the +descriptor (`hclose` alone closes the socket without either). A TLS result `e` comes back as +`HETLS - e` (-601 .. -629, names in `tls_errname`), a TLS deadline as `HETIME`. A TCP end of +stream without close_notify is `HETLS - 4` (truncation), never a clean end of a body. +`tests/https.om` is the reference caller. + ## Server-sent events Writing: `hrspsse` sends the 200 head (`text/event-stream`, `Cache-Control: no-cache`, chunked), @@ -186,10 +210,13 @@ Every byte crosses three functions only: `hrecvio` (into the read region), `hrec caller's body array) and `hsendio` (from the write region), plus `hwait`. Sockets are O_NONBLOCK; a call that would block waits with `waitio` for at most min(idle, deadline - now), so there is no busy wait and no unbounded block. `get cs HXPORT` selects the transport: 0 is -plain TCP or Unix sockets; any other value returns `HENOSUP` today. The TLS lane (OmegaTLS, -`tls_read`/`tls_write` with their own monotonic deadline and whole-slice writes) plugs in by -keeping its connection state in the transport region `io[HTB, HTB + HTL)` and calling it from -those three functions; no other function changes. +plain TCP or Unix sockets; 1 calls the hooks `htlsrecv`, `htlsrecvd` and `htlssend`, which +`https.om` implements over om/tls (`tls_read` / `tls_write`, connection state in the transport +region `io[HTB, HTB + HTL)`; before each call the http.om wait policy, min(idle, deadline), is +handed to `tls_deadline`) and `notls.om` refuses with `HENOSUP`. Because Omega passes one +array to a call once, bytes between the TLS state and the read / write regions of the same `io` +cross a 16 KiB bounce array (one extra copy per record). No other function of `http.om` +touches the transport. ## Host words used @@ -234,9 +261,22 @@ Stages: (six requests on one keep-alive connection, the last with `Connection: close`), raw sockets (obs-fold 400, empty connection, HTTP/1.0) and `examples/sse_client.om`; the server's descriptor count must return to its start value after every connection, and the server must exit 0. +5. HTTPS (needs `openssl`): a throwaway PKI (root, leaf for `localhost`, leaf for another + name, leaf of an unrelated root), three Python `ssl` TLS 1.3 servers and one + `openssl s_server -www`, all on 127.0.0.1 ephemeral ports. `tests/nosup.om` (built with + `notls.om`) must refuse every byte on `HXPORT 1`, and its stub mutated to return 0 must + fail. `tests/https.om` (built with om/tls and `https.om`) runs nine rows: 6-byte, + 300 KiB Content-Length, chunked (chunk sizes 1 .. 60000) and close-delimited bodies + compared byte for byte, a server that closes TCP without close_notify (`HETLS - 4`), a + silent server under a 500 ms idle limit (`HETIME`), a wrong-name certificate and an + untrusted issuer (`HETLS - 17`), and the openssl page. Five mutants (read dispatch gone, + head read error or body truncation taken as end of stream, wait policy not handed to + TLS, records not written) must each fail a row. With `TLS_NET=1` two live read-only GETs + (`www.example.com/`, `api.github.com/licenses/mit`) must return 200 with the expected + text; without it that part is `NOT_RUN`. Every socket in the checks is 127.0.0.1 with a port chosen by the kernel. Nothing contacts port -18091 or any outside host. +18091; outside hosts are contacted only by the two `TLS_NET=1` rows. Re-verified 2026-10-26 after refresh onto main `c5d981041` with reseeded `seed/out/omc` `189ada82e00bb440cb41351bd252cc68c54a1b1050051cc42a1df700081c3b54`: `HTTP-CHECK PASS` (same counts). diff --git a/seed/net/http.om b/seed/net/http.om index a65305553..185b443c9 100644 --- a/seed/net/http.om +++ b/seed/net/http.om @@ -8,7 +8,9 @@ note A connection is two caller-owned arrays: note cs = new ulong HCSLEN 0 state (fd, buffer cursors, deadlines, framing, header index) note io = new uchar N 0 one byte array split by hinit into a read region io[0, HRCAP), note a write region io[HWB, HWB+HWCAP) and a transport region -note io[HTB, HTB+HTL) (empty for plain TCP; reserved for TLS) +note io[HTB, HTB+HTL) (empty for plain TCP; the TLS state for HTTPS) +note The transport hooks htlsrecv, htlsrecvd and htlssend (HXPORT 1) come from seed/net/https.om +note (om/tls) or seed/net/notls.om (HENOSUP); one of the two is composed after this unit. note Header and target offsets stored in cs are absolute offsets into io and stay valid until the note next hreqrd / hrsprd on the same cs. note @@ -383,7 +385,7 @@ if ne get cs HMEM 0 ret 0 end if ne get cs HXPORT 0 -ret HENOSUP +ret htlsrecv cs io off n end fd = int get cs HFD for it ulong 4096 @@ -407,7 +409,7 @@ if ne get cs HMEM 0 ret 0 end if ne get cs HXPORT 0 -ret HENOSUP +ret htlsrecvd cs io d end fd = int get cs HFD for it ulong 4096 @@ -431,7 +433,7 @@ if ne get cs HMEM 0 ret -9 end if ne get cs HXPORT 0 -ret HENOSUP +ret htlssend cs io off n end fd = int get cs HFD e = add off n diff --git a/seed/net/https.om b/seed/net/https.om new file mode 100644 index 000000000..1f0caff1d --- /dev/null +++ b/seed/net/https.om @@ -0,0 +1,174 @@ +note seed/net/https.om -- HTTPS transport for http.om: the TLS 1.3 client of om/tls plugged into +note the transport boundary (hrecvio, hrecvd, hsendio dispatch here when HXPORT is 1). +note Library unit: no `om2` line, no `fn main`, no globals. Compose the om/tls units, http.om and +note this file (in that order) in front of the application: +note { printf 'om2\n'; for u in sha2 hkdf x25519 chacha aesgcm ec rsa x509 tls; do cat om/tls/$u.om; done +note cat seed/net/http.om seed/net/https.om app.om; } | seed/out/omc > app +note A program without TLS composes seed/net/notls.om instead (same three function names, HENOSUP). +note +note The TLS connection state lives in the transport region io[HTB, HTB + TLCSZ) that htlsinit +note reserves at the end of io; the trust store is a caller-owned array of TLSTSZ bytes filled by +note tls_store / tls_storef. Because Omega passes an array to one call once, bytes between the +note TLS state and the read / write regions of the same io cross a 16 KiB bounce array (one copy). +note +note Client use (hinit first, no I/O before htlsinit): +note fd = hdial a tmo TCP +note r = hinit cs io int fd 0 +note r = htlsinit cs io host lay out the transport region, SNI and certificate name +note r = htlsconn cs io st handshake (tls_connect) under the handshake budget +note ... hreqst / hhend / hwfin / hrsprd / hbodyrd as over TCP ... +note htlsend cs io close_notify, wipe the keys, close fd +note Results: TLS error code e (tls_errname) is returned as HETLS - e (-601 .. -629); +note TLS_ERR_TIMEOUT is HETIME. A TCP end of stream without close_notify is an error (HETLS - 4, +note truncation), never a clean end; only close_notify gives 0 from the reads. +note +note Timeouts: before each TLS read or write the http.om wait policy (HIDLE single-wait limit and +note the HDL deadline) is given to tls_deadline, so the bounds of seed/net/README.md hold over TLS. + +const HETLS long -600 +const HTLBUF ulong 16384 + +note htlsinit: reserve io[HTB, HTB + TLCSZ) for the TLS state (io must hold it plus the read and +note write regions: at least TLCSZ + 512 bytes) and start the client for TLS name host with ALPN +note http/1.1. HEINVAL when I/O already happened on cs or io is too small. +fn htlsinit cs edit ulong * io edit uchar * host view uchar * to long +if or ne get cs HRLEN 0 ne get cs HWLEN 0 +ret HEINVAL +end +if or ne get cs HMEM 0 ne get cs HOPEN 1 +ret HEINVAL +end +if lt len io add TLCSZ 512 +ret HEINVAL +end +n = sub len io TLCSZ +w = get cs HWCAP +if gt w sub n 256 +w = sub n 256 +end +r = hlayout cs n w +if lt r 0 +ret r +end +put cs HTL TLCSZ +e = tls_init part io n TLCSZ host 1 +if ne e 0 +ret sub HETLS long e +end +put cs HXPORT 1 +ret 0 +end + +note htlsconn: the TLS handshake on the connection's fd with trust store st (tls_store or +note tls_storef); 0, HETIME or HETLS - e +fn htlsconn cs edit ulong * io edit uchar * st view uchar * to long +if ne get cs HXPORT 1 +ret HEINVAL +end +b = get cs HTB +e = tls_connect part io b TLCSZ st int get cs HFD +ret htlsmap long e +end + +note htlsmap: a TLS code as an http.om result +fn htlsmap e long to long +if eq e 0 +ret 0 +end +if eq e long TLETIME +ret HETIME +end +ret sub HETLS e +end + +note htlsarm: give the TLS state the wait policy of cs (min of idle and the deadline), 0 = none +fn htlsarm cs edit ulong * io edit uchar * to void +b = get cs HTB +dl = get cs HDL +iv = get cs HIDLE +if ne iv 0 +t = add ulong monons iv +if or eq dl 0 lt t dl +dl = t +end +end +tls_deadline part io b TLCSZ long dl +end + +note htlsrecv: at most n bytes into io[off, off+n) through TLS; count, 0 at close_notify, or +note negative (HETIME, HETLS - e) +fn htlsrecv cs edit ulong * io edit uchar * off ulong n ulong to long +bb = new uchar 16384 0 +k = n +if gt k HTLBUF +k = HTLBUF +end +htlsarm cs io +r = tls_read part io get cs HTB TLCSZ part bb 0 k +if lt r 0 +ret htlsmap neg r +end +for i ulong ulong r +put io add off i get bb i +end +ret r +end + +note htlsrecvd: at most len d bytes straight into the caller's array d +fn htlsrecvd cs edit ulong * io edit uchar * d edit uchar * to long +k = len d +if gt k HTLBUF +k = HTLBUF +end +htlsarm cs io +r = tls_read part io get cs HTB TLCSZ part d 0 k +if lt r 0 +ret htlsmap neg r +end +ret r +end + +note htlscp: io[s, s+n) into bb (at most 16 KiB); the count copied +fn htlscp bb edit uchar 16384 io view uchar * s ulong n ulong to ulong +k = n +if gt k HTLBUF +k = HTLBUF +end +for i ulong k +put bb i get io add s i +end +ret k +end + +note htlswr: one TLS write of bb[0, k) +fn htlswr cs edit ulong * io edit uchar * bb view uchar 16384 k ulong to long +htlsarm cs io +r = tls_write part io get cs HTB TLCSZ part bb 0 k +if lt r 0 +ret htlsmap neg r +end +ret 0 +end + +note htlssend: all of io[off, off+n) through TLS in records of at most 16 KiB; 0 or negative +fn htlssend cs edit ulong * io edit uchar * off ulong n ulong to long +bb = new uchar 16384 0 +p = ulong 0 +while lt p n bound 1024 +k = htlscp bb io add off p sub n p +r = htlswr cs io bb k +if lt r 0 +ret r +end +p = add p k +end +ret 0 +end + +note htlsend: close_notify when still connected, wipe the TLS keys and buffers, close the fd +fn htlsend cs edit ulong * io edit uchar * to long +if eq get cs HXPORT 1 +tls_close part io get cs HTB TLCSZ +end +ret hclose cs +end diff --git a/seed/net/notls.om b/seed/net/notls.om new file mode 100644 index 000000000..3987b49e0 --- /dev/null +++ b/seed/net/notls.om @@ -0,0 +1,14 @@ +note seed/net/notls.om -- the transport hooks of http.om for a program built without TLS. +note Library unit: no `om2` line, no `fn main`, no globals. Compose it right after http.om: +note { printf 'om2\n'; cat seed/net/http.om seed/net/notls.om app.om; } | seed/out/omc > app +note Every hook refuses with HENOSUP, so a connection whose HXPORT is not 0 cannot move bytes; +note seed/net/https.om is the implementation that plugs om/tls into these three names. +fn htlsrecv cs edit ulong * io edit uchar * off ulong n ulong to long +ret HENOSUP +end +fn htlsrecvd cs edit ulong * io edit uchar * d edit uchar * to long +ret HENOSUP +end +fn htlssend cs edit ulong * io edit uchar * off ulong n ulong to long +ret HENOSUP +end diff --git a/seed/net/tests/check.py b/seed/net/tests/check.py index 0973eda33..d3673d95b 100755 --- a/seed/net/tests/check.py +++ b/seed/net/tests/check.py @@ -10,7 +10,10 @@ Usage: nice -n 19 ionice -c3 python3 seed/net/tests/check.py [--omc PATH] [--ke Stages: build, corpus (hand cases + deterministic fuzz, seed 788), mutants (each must be caught), live (tests/live.om: keep-alive, 300 KiB / 1 MiB bodies, chunked, HEAD, pipelining, SSE, malformed requests, deadlines, fd leaks), e2e (examples/sse_server.om under curl and -http.client, examples/sse_client.om, server fd count). +http.client, examples/sse_client.om, server fd count), https (tests/https.om = http.om + +https.om + om/tls against a Python ssl TLS 1.3 server and openssl s_server with a throwaway PKI: +bodies, chunked, close-delimited, truncation, wrong name, untrusted issuer, deadline; mutants +of the glue and of the notls stub; with TLS_NET=1 two live read-only GETs). Exit 0 = PASS, 1 = FAIL, 3 = NOT_RUN (a prerequisite such as curl or the compiler is missing). Sockets: 127.0.0.1 with kernel-chosen ephemeral ports only. Never touches port 18091. """ @@ -30,6 +33,10 @@ HERE = os.path.dirname(os.path.abspath(__file__)) NET = os.path.dirname(HERE) ROOT = os.path.dirname(os.path.dirname(NET)) LIB = os.path.join(NET, "http.om") +NOTLS = os.path.join(NET, "notls.om") +HTTPS = os.path.join(NET, "https.om") +TLS_UNITS = ["sha2", "hkdf", "x25519", "chacha", "aesgcm", "ec", "rsa", "x509", "tls"] +TLSDIR = os.path.join(ROOT, "om", "tls") HEADMX = 2048 # parse.om: put cs HHEADMX 2048 HHMAX = 16 # parse.om: put cs HHMAX 16 @@ -980,6 +987,304 @@ def stage_e2e(omc, work, lib_src, log): log("HTTP-E2E PASS connections=%d (curl, http.client, raw, sse_client)" % E2E_CONNS) +# ======== https: http.om + https.om + om/tls against TLS 1.3 servers with a throwaway PKI +def ossl(work, *args): + p = subprocess.run(["openssl"] + list(args), cwd=work, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=120) + if p.returncode != 0: + raise Fail("openssl %s rc=%d %s" % (" ".join(args), p.returncode, p.stderr.decode(errors="replace").strip())) + + +def https_pki(work): + """root -> leaf for localhost (EC P-256), a leaf for another name, and an unrelated root's leaf.""" + d = os.path.join(work, "pki") + os.makedirs(d, exist_ok=True) + ca_ext = ["-addext", "basicConstraints=critical,CA:true", "-addext", "keyUsage=critical,keyCertSign,cRLSign"] + for root in ("root", "other"): + ossl(d, "genpkey", "-algorithm", "EC", "-pkeyopt", "ec_paramgen_curve:P-256", "-out", root + ".key") + ossl(d, "req", "-x509", "-new", "-key", root + ".key", "-subj", "/CN=http-check-" + root, "-days", "30", + "-sha256", *ca_ext, "-out", root + ".pem") + for name, san, root in (("leaf", "localhost", "root"), ("wrong", "other.example", "root"), ("stray", "localhost", "other")): + ossl(d, "genpkey", "-algorithm", "EC", "-pkeyopt", "ec_paramgen_curve:P-256", "-out", name + ".key") + ossl(d, "req", "-new", "-key", name + ".key", "-subj", "/CN=" + san, "-addext", "subjectAltName=DNS:" + san, + "-addext", "basicConstraints=critical,CA:false", "-addext", "keyUsage=critical,digitalSignature", + "-addext", "extendedKeyUsage=serverAuth", "-out", name + ".csr") + ossl(d, "x509", "-req", "-in", name + ".csr", "-CA", root + ".pem", "-CAkey", root + ".key", "-CAcreateserial", + "-days", "10", "-copy_extensions", "copy", "-out", name + ".pem") + return d + + +HTTPS_BIG = bytes((i * 7 + 3) & 255 for i in range(307200)) +HTTPS_CHUNKS = [1, 17, 4096, 16384, 16385, 3, 60000, 100] + + +def https_body(path): + """(response bytes, body the client must print, close mode) for one path of the Python server. + close mode: 'notify' = close_notify then close, 'raw' = close the socket without close_notify.""" + if path == "/small": + return b"HTTP/1.1 200 OK\r\nContent-Length: 6\r\nConnection: close\r\n\r\nhello\n", b"hello\n", "notify" + if path == "/big": + return b"HTTP/1.1 200 OK\r\nContent-Length: %d\r\nConnection: close\r\n\r\n" % len(HTTPS_BIG) + HTTPS_BIG, HTTPS_BIG, "notify" + if path == "/chunked": + body = HTTPS_BIG[:100000] + out = [b"HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\nConnection: close\r\n\r\n"] + pos = 0 + i = 0 + while pos < len(body): + n = min(HTTPS_CHUNKS[i % len(HTTPS_CHUNKS)], len(body) - pos) + out.append(b"%x\r\n" % n + body[pos:pos + n] + b"\r\n") + pos += n + i += 1 + out.append(b"0\r\n\r\n") + return b"".join(out), body, "notify" + if path == "/close": + return b"HTTP/1.0 200 OK\r\n\r\n" + HTTPS_BIG[:50000], HTTPS_BIG[:50000], "notify" + if path == "/trunc": + return b"HTTP/1.1 200 OK\r\nContent-Length: 100\r\n\r\n0123456789", b"0123456789", "raw" + if path == "/silent": + return b"", b"", "silent" + return b"HTTP/1.1 404 Not Found\r\nContent-Length: 0\r\nConnection: close\r\n\r\n", b"", "notify" + + +def https_serve(conn): + """One connection of the Python TLS server: read a request head, answer by path.""" + import ssl + try: + conn.settimeout(10) + head = b"" + while b"\r\n\r\n" not in head and len(head) < 65536: + b = conn.recv(4096) + if not b: + return + head += b + path = head.split(b" ", 2)[1].decode() + resp, _, mode = https_body(path) + if mode == "silent": + time.sleep(4) + conn.close() + return + conn.sendall(resp) + if mode == "raw": + fd = conn.detach() + os.close(fd) + return + try: + conn.unwrap() + except (OSError, ssl.SSLError): + pass + conn.close() + except (OSError, ssl.SSLError): + try: + conn.close() + except OSError: + pass + + +def https_server(pki, cert, stop): + """A TLS 1.3 listener on 127.0.0.1 (ephemeral port) in a thread; returns (port, thread).""" + import ssl + import threading + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) + ctx.minimum_version = ssl.TLSVersion.TLSv1_3 + ctx.load_cert_chain(os.path.join(pki, cert + ".pem"), os.path.join(pki, cert + ".key")) + ctx.set_alpn_protocols(["http/1.1"]) + ls = socket.socket() + ls.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + ls.bind(("127.0.0.1", 0)) + ls.listen(16) + ls.settimeout(0.5) + port = ls.getsockname()[1] + + def loop(): + while not stop.is_set(): + try: + c, _ = ls.accept() + except socket.timeout: + continue + except OSError: + break + try: + tc = ctx.wrap_socket(c, server_side=True) + except (OSError, ssl.SSLError): + c.close() + continue + threading.Thread(target=https_serve, args=(tc,), daemon=True).start() + ls.close() + t = threading.Thread(target=loop, daemon=True) + t.start() + return port, t + + +def https_run(binary, host, port, store, path, connect="127.0.0.1", idle=None, timeout=20): + """Run tests/https.om; (exit, body, status or None, HTTPSERR code or None).""" + args = [binary, host, str(port), store, path, connect] + if idle is not None: + args.append(str(idle)) + try: + p = subprocess.run(NICE + args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=timeout) + except subprocess.TimeoutExpired: + return "timeout", b"", None, None + st = err = None + for l in p.stderr.decode(errors="replace").splitlines(): + if l.startswith("status "): + st = int(l[7:]) + if l.startswith("HTTPSERR "): + err = int(l[9:]) + return p.returncode, p.stdout, st, err + + +HETLS = -600 +HETIME = -110 +HTTPS_ROWS = [ + # (name, path, cert, expected exit, expected HTTPSERR, idle ms) + ("small body", "/small", "leaf", 0, None, None), + ("300 KiB Content-Length body", "/big", "leaf", 0, None, None), + ("chunked body", "/chunked", "leaf", 0, None, None), + ("close-delimited body (close_notify ends it)", "/close", "leaf", 0, None, None), + ("truncation: TCP close without close_notify is an error", "/trunc", "leaf", 4, HETLS - 4, None), + ("silent server: idle limit through tls_deadline", "/silent", "leaf", 4, HETIME, 500), + ("wrong name in the certificate", "/small", "wrong", 4, HETLS - 17, None), + ("leaf of an untrusted root", "/small", "stray", 4, HETLS - 17, None), +] + + +def https_compose(src_lines, notls=False): + """The library source in front of tests/https.om or tests/nosup.om.""" + if notls: + return src_lines + units = b"".join(open(os.path.join(TLSDIR, u + ".om"), "rb").read() for u in TLS_UNITS) + return units + src_lines + + +def https_mutate(text, fn, old, new): + """Replace the first line equal to old after the line 'fn ...' (exactly one hit in that function).""" + lines = text.split("\n") + start = [i for i, l in enumerate(lines) if l.startswith("fn " + fn + " ")] + if len(start) != 1: + raise Fail("mutant: function %r found %d times" % (fn, len(start))) + end = start[0] + 1 + while end < len(lines) and not lines[end].startswith("fn "): + end += 1 + hits = [i for i in range(start[0], end) if lines[i] == old] + if len(hits) != 1: + raise Fail("mutant: line %r occurs %d times in %s (must be exactly once)" % (old, len(hits), fn)) + lines[hits[0]] = new + return "\n".join(lines), hits[0] + 1 + + +def https_rows(binary, pki, port, oport, log, label): + """All rows against the Python server (port) and openssl s_server -www (oport); the row that fails or None.""" + root = os.path.join(pki, "root.pem") + for name, path, cert, want_rc, want_err, idle in HTTPS_ROWS: + rc, body, st, err = https_run(binary, "localhost", port[cert], root, path, idle=idle) + _, want_body, _ = https_body(path) + ok = rc == want_rc and err == want_err + if want_rc == 0: + ok = ok and st == 200 and body == want_body + log("%s row %-52s rc=%s status=%s err=%s body=%d -> %s" % (label, name, rc, st, err, len(body), "ok" if ok else "MISMATCH")) + if not ok: + return name + if oport: + rc, body, st, err = https_run(binary, "localhost", oport, root, "/openssl-www") + ok = rc == 0 and st == 200 and b"Ciphers supported in s_server binary" in body and body.rstrip(b"\r\n").endswith(b"") + log("%s row %-52s rc=%s status=%s body=%d -> %s" % (label, "openssl s_server -www (HTTP/1.0, close-delimited)", rc, st, len(body), "ok" if ok else "MISMATCH")) + if not ok: + return "openssl s_server -www" + return None + + +HTTPS_MUTANTS = [ + # (name, unit, function, old line, new line) + ("http.om: read dispatch to TLS gone", "http", "hrecvio", "ret htlsrecv cs io off n", "ret HENOSUP"), + ("https.om: head read error taken as end of stream", "https", "htlsrecv", "ret htlsmap neg r", "ret 0"), + ("https.om: body truncation taken as end of stream", "https", "htlsrecvd", "ret htlsmap neg r", "ret 0"), + ("https.om: http.om wait policy not given to TLS", "https", "htlsarm", "tls_deadline part io b TLCSZ long dl", "tls_deadline part io b TLCSZ 0"), + ("https.om: records not written", "https", "htlswr", "r = tls_write part io get cs HTB TLCSZ part bb 0 k", "r = long 0"), +] + + +def stage_https(omc, work, http_src, notls_src, log): + import threading + if not shutil.which("openssl"): + raise NotRun("openssl is not installed") + for u in TLS_UNITS: + if not os.path.exists(os.path.join(TLSDIR, u + ".om")): + raise NotRun("om/tls/%s.om is missing" % u) + https_src = open(HTTPS, "rb").read() + pki = https_pki(work) + # the program without TLS refuses every byte on a non-TCP transport + nbin = os.path.join(work, "nosup") + compile_unit(omc, nbin, http_src + notls_src, "tests/nosup.om") + p = subprocess.run(NICE + [nbin], stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60) + if p.returncode != 0: + raise Fail("tests/nosup.om exit %d: a notls program moved bytes on HXPORT 1" % p.returncode) + log("https notls control: nosup exit 0") + mt, ln = https_mutate(notls_src.decode(), "htlsrecv", "ret HENOSUP", "ret 0") + compile_unit(omc, nbin, http_src + mt.encode(), "tests/nosup.om") + p = subprocess.run(NICE + [nbin], stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=60) + if p.returncode == 0: + raise Fail("notls mutant SURVIVED: notls.om htlsrecv returning 0 passes nosup") + log("https notls mutant killed: htlsrecv ret 0 (notls.om line %d, exit %d)" % (ln, p.returncode)) + # the real program + hbin = os.path.join(work, "https") + ssrc, sbin = compile_unit(omc, hbin, https_compose(http_src + https_src), "tests/https.om") + log("https.src=%s https.bin=%s https.om sha256=%s" % (ssrc, sbin, sha(https_src))) + stop = threading.Event() + port = {} + for cert in ("leaf", "wrong", "stray"): + port[cert], _ = https_server(pki, cert, stop) + # openssl s_server cannot report a kernel-chosen port: pick a free one and bind it + s = socket.socket() + s.bind(("127.0.0.1", 0)) + oport = s.getsockname()[1] + s.close() + osrv = subprocess.Popen(["openssl", "s_server", "-accept", "127.0.0.1:%d" % oport, "-cert", os.path.join(pki, "leaf.pem"), + "-key", os.path.join(pki, "leaf.key"), "-www", "-tls1_3"], + stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + try: + for _ in range(50): + try: + socket.create_connection(("127.0.0.1", oport), timeout=0.2).close() + break + except OSError: + time.sleep(0.1) + bad = https_rows(hbin, pki, port, oport, log, "https") + if bad: + raise Fail("https row %r" % bad) + log("HTTPS-ROWS PASS rows=%d" % (len(HTTPS_ROWS) + 1)) + mbin = os.path.join(work, "https-mutant") + for name, unit, fn, old, new in HTTPS_MUTANTS: + if unit == "http": + mt, ln = https_mutate(http_src.decode(), fn, old, new) + lib = mt.encode() + https_src + else: + mt, ln = https_mutate(https_src.decode(), fn, old, new) + lib = http_src + mt.encode() + try: + compile_unit(omc, mbin, https_compose(lib), "tests/https.om") + except Fail as e: + raise Fail("https mutant %r does not compile (invalid mutant): %s" % (name, e)) + bad = https_rows(mbin, pki, port, None, lambda s: None, "mutant") + if bad is None: + raise Fail("https mutant %r SURVIVED every row" % name) + log("https mutant killed: %s (%s.om line %d, by row %r)" % (name, unit, ln, bad)) + log("HTTPS-MUTANTS PASS killed=%d/%d" % (len(HTTPS_MUTANTS), len(HTTPS_MUTANTS))) + if os.environ.get("TLS_NET") == "1": + for host, path, needle in (("www.example.com", "/", b"Example Domain"), ("api.github.com", "/licenses/mit", b'"key":"mit"')): + rc, body, st, err = https_run(hbin, host, 443, "-", path, connect=host, timeout=60) + ok = rc == 0 and st == 200 and needle in body + log("https live %s%s rc=%s status=%s err=%s body=%d sha256=%s -> %s" % (host, path, rc, st, err, len(body), sha(body), "ok" if ok else "MISMATCH")) + if not ok: + raise Fail("https live GET %s%s" % (host, path)) + log("HTTPS-LIVE PASS rows=2") + else: + log("HTTPS-LIVE NOT_RUN (set TLS_NET=1 for two live read-only GETs)") + finally: + stop.set() + osrv.kill() + osrv.wait() + log("HTTPS PASS") + + def main(): args = sys.argv[1:] omc = os.path.join(ROOT, "seed", "out", "omc") @@ -996,7 +1301,9 @@ def main(): if not os.access(omc, os.X_OK): print("NOT_RUN: no compiler at %s" % omc) return 3 - lib_src = open(LIB, "rb").read() + http_src = open(LIB, "rb").read() + notls_src = open(NOTLS, "rb").read() + lib_src = http_src + notls_src work = keep or tempfile.mkdtemp(prefix="http-check-") os.makedirs(work, exist_ok=True) out = [] @@ -1005,7 +1312,7 @@ def main(): out.append(s) print(s, flush=True) - log("omc sha256=%s http.om sha256=%s" % (sha(open(omc, "rb").read()), sha(lib_src))) + log("omc sha256=%s http.om sha256=%s notls.om sha256=%s" % (sha(open(omc, "rb").read()), sha(http_src), sha(notls_src))) status = 0 try: cpath, expected = stage_corpus(omc, work, lib_src, log) @@ -1013,6 +1320,7 @@ def main(): stage_live(omc, work, lib_src, log) stage_live_mutants(omc, work, lib_src, log) stage_e2e(omc, work, lib_src, log) + stage_https(omc, work, http_src, notls_src, log) log("HTTP-CHECK PASS") except NotRun as e: log("HTTP-CHECK NOT_RUN %s" % e) diff --git a/seed/net/tests/https.om b/seed/net/tests/https.om new file mode 100644 index 000000000..88ddd8f05 --- /dev/null +++ b/seed/net/tests/https.om @@ -0,0 +1,189 @@ +note seed/net/tests/https.om -- HTTPS GET through http.om + https.om (om/tls) for tests/check.py. +note Composed after the om/tls units, http.om and https.om (see https.om). Program mode. +note usage: https HOST PORT STOREFILE PATH [CONNECTHOST [IDLEMS]] +note HOST is the TLS name (SNI, certificate check) and the Host header; CONNECTHOST (default +note HOST) is what is resolved and dialled; STOREFILE "-" is the system trust store; IDLEMS +note (default 30000) is the longest single wait and the head deadline in ms (hsettmo). +note Writes the decoded body bytes to stdout and "status N" (the final status) to stderr, then +note closes with close_notify. On any negative http.om result r it prints "HTTPSERR r" to stderr +note and exits 4 (HETLS - e for a TLS code e, HETIME at a deadline, HETRUNC on a short body). +note Exit 2 usage, 3 DNS or connect failure. +text uusage "usage: https HOST PORT STOREFILE PATH [CONNECTHOST]\n" +text uerr "HTTPSERR " +text ustat "status " +text unl "\n" +text uget "GET" +text uhost "Host" +text uuan "User-Agent" +text uuav "omega-http-check/1" + +note decimal number from b, or 0 +fn unum b view uchar * to ulong +v = ulong 0 +for i ulong len b +ch = ulong get b i +if or lt ch 48 gt ch 57 +ret 0 +end +v = add mul v 10 sub ch 48 +if gt v 65535 +ret 0 +end +end +ret v +end + +note signed decimal of v after the text t on stderr +fn umsg t view uchar * v long to void +b = new uchar 24 0 +x = write 2 t 0 len t +k = ulong 23 +n = v +sg = lt v 0 +if sg +n = neg v +end +u = ulong n +put b k 10 +while or gt u 0 eq k 23 bound 22 +k = sub k 1 +put b k uchar add 48 rem u 10 +u = div u 10 +end +if sg +k = sub k 1 +put b k 45 +end +x = write 2 b k sub 24 k +end + +note ubody: the decoded body to stdout; 0 at its end or a negative result +fn ubody cs edit ulong * io edit uchar * to long +d = new uchar 16384 0 +for it ulong 999999 +n = hbodyrd cs io d +if le n 0 +ret n +end +x = write 1 d 0 ulong n +end +ret HEBIG +end + +note ureq: the request and the response; hp = host length << 16 | path length; 0 or negative +fn ureq cs edit ulong * io edit uchar * w view uchar 4096 hp ulong to long +r = hreqst cs io uget +r = hfe r hreqtg cs io part w 1344 and hp 65535 +r = hfe r hhname cs io uhost +r = hfe r hhval cs io part w 0 shr hp 16 +r = hfe r hhname cs io uuan +r = hfe r hhval cs io uuav +r = hfe r hhend cs io 0 0 +r = hfe r hwfin cs io +if lt r 0 +ret r +end +r = hrsprd cs io +if lt r 0 +ret r +end +umsg ustat r +ret ubody cs io +end + +note w: host 0..256, port 256..320, store 320..1344, path 1344..2368, connect host 2368..2624 +note v: 0 host length, 1 path length, 2 store path length, 3 port, 4 connect host length, 5 idle ns +fn uargs w edit uchar 4096 v edit ulong 8 to int +if lt argcnt 5 +x = write 2 uusage 0 len uusage +ret 2 +end +hl = argread 1 w 0 255 +pl = argread 4 w 1344 1023 +sl = argread 3 w 320 1023 +pn = argread 2 w 256 6 +if or or or le hl 0 le pl 0 le sl 0 le pn 0 +ret 2 +end +po = unum part w 256 ulong pn +if eq po 0 +ret 2 +end +put v 0 ulong hl +put v 1 ulong pl +put v 2 ulong sl +put v 3 po +tls_mov w 2368 0 ulong hl +if ge argcnt 6 +hl = argread 5 w 2368 255 +if le hl 0 +ret 2 +end +end +put v 4 ulong hl +put v 5 30000000000 +if ge argcnt 7 +hl = argread 6 w 2624 8 +if le hl 0 +ret 2 +end +put v 5 mul unum part w 2624 ulong hl 1000000 +end +ret 0 +end + +note ustore: the trust store from STOREFILE ("-" = system); 0 or HETLS - e +fn ustore st edit uchar 262144 w view uchar 4096 sl ulong to long +e = ulong 0 +if and eq sl 1 eq get w 320 45 +e = tls_store st +else +e = tls_storef st part w 320 sl +end +if ne e 0 +ret sub HETLS long e +end +ret 0 +end + +note uconn: dial and the TLS setup (hinit, htlsinit); 0, -1000 (connect) or a negative result +fn uconn cs edit ulong * io edit uchar * w view uchar 4096 v view ulong 8 to long +fd = tls_dial part w 2368 get v 4 get v 3 +if lt fd 0 +ret -1000 +end +r = hinit cs io int fd 0 +hsettmo cs long get v 5 long get v 5 +ret hfe r htlsinit cs io part w 0 get v 0 +end + +fn main to int +cs = new ulong 320 0 +io = new uchar 262144 0 +st = new uchar 262144 0 +w = new uchar 4096 0 +v = new ulong 8 0 +e = uargs w v +if ne e 0 +ret e +end +r = ustore st w get v 2 +if ge r 0 +r = uconn cs io w v +end +if ge r 0 +r = htlsconn cs io st +end +if ge r 0 +r = ureq cs io w or shl get v 0 16 get v 1 +end +x = htlsend cs io +if eq r -1000 +ret 3 +end +if lt r 0 +umsg uerr r +ret 4 +end +ret 0 +end diff --git a/seed/net/tests/nosup.om b/seed/net/tests/nosup.om new file mode 100644 index 000000000..7ccce4e09 --- /dev/null +++ b/seed/net/tests/nosup.om @@ -0,0 +1,24 @@ +note seed/net/tests/nosup.om -- a program built without TLS (http.om + notls.om) must refuse +note every byte on a connection whose transport is not plain TCP (HXPORT 1): the three +note transport functions return HENOSUP. Exit 0 = all three refused; 1..3 name the one that did not. +fn main to int +cs = new ulong 320 0 +io = new uchar 4096 0 +d = new uchar 64 0 +r = hinit cs io 0 0 +if ne r 0 +ret 9 +end +put cs HXPORT 1 +if ne hrecvio cs io 0 16 HENOSUP +ret 1 +end +if ne hrecvd cs io d HENOSUP +ret 2 +end +if ne hsendio cs io get cs HWB 1 HENOSUP +ret 3 +end +put cs HOPEN 0 +ret 0 +end