interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / om / tls / test / net / hostile.tsv

119 lines · 12698 bytes Raw Blame History
1# Hostile-server cases for the om/tls client (hostile.py modes). Not duplicated from
2# test/tls/interop.sh (fakesh: tls12 hrr suite sid group zero dupext trail; fakesrv: ccs2 ccsflood
3# ccspre ccslate encccs frag cvbad cvkey cvskip empty1500 empty50 tickets1500 closehs closepre ku*
4# loris slowsh; tamper proxy).
5# columns (tab separated): case, expect, alerts, check, rfc, description
6# expect OK the client completes the GET (exit 0, the reply on stdout)
7# ABORT the client fails with any TLSERR (never a hang, trap or exit 0)
8# ABORT:NAME the client fails with TLS_ERR_NAME
9# ABORT_OR_OK the RFC puts no requirement on the receiver; either outcome passes, no hang
10# alerts the alert descriptions the client may send when it aborts (RFC 8446 section 6.2):
11# a list, "*" any (also none), "-" none expected (the peer already failed the session)
12# check extra facts the server or stdout must show ("-" none): key=value from the server's
13# SRV line, or !out:TEXT (stdout must not contain TEXT)
14sh_dgrd12 ABORT 70,47 - 4.1.3, 4.2.1, D.1 TLS 1.2 ServerHello (no supported_versions), random ends DOWNGRD\x01
15sh_dgrd11 ABORT 70,47 - 4.1.3, D.1 legacy_version 0x0302, no supported_versions, random ends DOWNGRD\x00
16sh_sv0303 ABORT 47 - 4.2.1 (MUST illegal_parameter: selected version prior to TLS 1.3) supported_versions selects 0x0303
17sh_sv7f ABORT 47 - 4.2.1 (MUST illegal_parameter: version not offered) supported_versions selects draft 0x7f1c
18sh_svlen ABORT 50,47 - 4.2.1, 6.2 decode_error supported_versions body of 3 bytes
19sh_suite_tls12 ABORT 47 - 4.1.3 (MUST illegal_parameter: suite not offered) cipher suite 0xc02f (a TLS 1.2 suite)
20sh_comp1 ABORT 47,50 - 4.1.3 legacy_compression_method MUST be 0 compression method 1
21sh_sid33 ABORT 50,47 - 4.1.3 legacy_session_id_echo <0..32> session id length 33
22sh_extlen ABORT 50 - 4.1.3, 6.2 decode_error extensions length 5 bytes beyond the message
23sh_noks ABORT 109,47 - 4.2.8, 9.2 (missing_extension) ServerHello without key_share (no PSK offered)
24sh_dupks ABORT * - 4.2 (MUST NOT send two extensions of one type; receiver alert not specified) key_share twice
25sh_kslen31 ABORT 47,50 - 4.2.8.2 (x25519 share is 32 bytes) x25519 share of 31 bytes
26sh_ks_lo1 ABORT 47 - 7.4.2 (MUST abort on all-zero shared secret), RFC 7748 6.1 x25519 share u=1 (small order)
27sh_ks_lo8 ABORT 47 - 7.4.2, RFC 7748 6.1 x25519 share of an order-8 point
28sh_ks_hibit OK - - RFC 7748 5 (receiver MUST mask bit 255) valid x25519 share with bit 255 set
29sh_ext_unsol ABORT 110 - 4.2 (MUST unsupported_extension for an unsolicited extension) unknown extension 0x0a0a in ServerHello
30sh_ext_psk ABORT 110,47 - 4.2, 4.2.11 (no PSK offered) pre_shared_key in ServerHello
31sh_ext_sni ABORT 47 - 4.2 (MUST illegal_parameter: recognised extension not allowed in this message) server_name in ServerHello
32sh_ext_cookie ABORT 47,110 - 4.2 (cookie is for HelloRetryRequest only) cookie in ServerHello
33sh_ext_early ABORT 47,110 - 4.2 (early_data not allowed in ServerHello) early_data in ServerHello
34sh_ext_ksalias ABORT 109,110 - 4.2 (MUST unsupported_extension), 4.2.8 (key_share MUST be present; missing_extension) no key_share; a valid x25519 key_share body under unknown extension type 0x0a0a
35sh_twice ABORT 10 - 5.1 (MUST unexpected_message: handshake data spanning a key change) two ServerHellos in one record
36sh_plus_ee ABORT 10 - 5.1 (MUST unexpected_message: handshake data spanning a key change) plaintext EncryptedExtensions behind the ServerHello in its record
37sh_split OK - - 5.1 (handshake messages may be fragmented) ServerHello split across two records
38sh_rec0301 OK - - 5.1 (legacy_record_version MUST be ignored) ServerHello record with version 0x0301
39sh_hs_zero ABORT_OR_OK * - 5.1 (zero-length handshake fragments MUST NOT be sent; receiver alert not specified) zero-length handshake record before the ServerHello
40rec_unknown_type ABORT 10 - 5 (MUST unexpected_message for an unexpected record type) record type 0x63 before the ServerHello
41rec_appdata_plain ABORT 10 - 5 (MUST unexpected_message) plaintext application_data before the ServerHello
42rec_overflow_plain ABORT 22 - 5.1 (MUST record_overflow above 2^14) plaintext handshake record of 2^14+1 bytes
43rec_alert_frag ABORT 50,10 - 5.1 (alerts MUST NOT be fragmented), 6 plaintext alert record of 1 byte
44rec_alert_zero ABORT * - 5.1 (zero-length alert fragments MUST NOT be sent; receiver alert not specified) plaintext alert record of 0 bytes
45rec_alert_unknown_plain ABORT:ALERT_RECEIVED - - 6 (unknown alert types MUST be treated as error alerts) plaintext fatal alert 200 before the ServerHello
46ccs_val2 ABORT 10 - 5 (MUST unexpected_message for a change_cipher_spec value other than 0x01) change_cipher_spec body 0x02
47ccs_len2 ABORT 10,50 - 5 (single byte 0x01 only) change_cipher_spec body 0x01 0x01
48ccs_zero ABORT 10,50 - 5 change_cipher_spec of 0 bytes
49ee_ks ABORT 47 - 4.2 (MUST illegal_parameter: key_share not allowed in EncryptedExtensions) key_share in EncryptedExtensions
50ee_sv ABORT 47 - 4.2 (MUST illegal_parameter) supported_versions in EncryptedExtensions
51ee_psk ABORT 47,110 - 4.2 pre_shared_key in EncryptedExtensions
52ee_dup ABORT * - 4.2 (MUST NOT send two extensions of one type; receiver alert not specified) server_name twice in EncryptedExtensions
53ee_unsol ABORT 110 - 4.2 (MUST unsupported_extension) unknown extension 0x0a0a in EncryptedExtensions
54ee_mfl ABORT 110 - 4.2 (MUST unsupported_extension), RFC 6066 4 max_fragment_length not offered
55ee_alpn_other ABORT 47,120 - RFC 7301 3.1 (server selects one of the client's protocols) ALPN selects h2, the client offered http/1.1 only
56ee_alpn_two ABORT 47,50,120 - RFC 7301 3.1 (ProtocolNameList MUST contain exactly one name) ALPN response naming http/1.1 and h2
57ee_trail ABORT 50 - 4.3.1, 6.2 decode_error EncryptedExtensions with a trailing byte
58ee_twice ABORT 10 - 4 (message order), 6.2 unexpected_message EncryptedExtensions twice
59ee_bigdecl ABORT * - 4 (handshake length 2^24-1; must not wait for or allocate it) EncryptedExtensions declaring 0xffffff bytes
60ee_zero_frag ABORT_OR_OK 10,50 - 5.1 (zero-length handshake fragments MUST NOT be sent) empty protected handshake record before EncryptedExtensions
61order_cert_first ABORT 10 - 4.4.1, 6.2 unexpected_message Certificate before EncryptedExtensions
62order_fin_noauth ABORT 10 - 4.4.2 (server authentication is required without PSK) EncryptedExtensions then Finished, no Certificate
63order_cv_first ABORT 10 - 4.4.1 CertificateVerify before Certificate
64cr_hs OK - ccert=empty,cfin=ok 4.3.2, 4.4.2.4 (client MUST send an empty Certificate when it has none) CertificateRequest in the handshake
65cr_ctx ABORT_OR_OK 47 - 4.3.2 (context SHALL be zero length in the handshake; sender rule) CertificateRequest with a 2-byte context in the handshake
66cr_nosigalgs ABORT_OR_OK 109 - 4.3.2 (signature_algorithms MUST be present; sender rule) CertificateRequest without signature_algorithms
67cert_ctx ABORT_OR_OK 47,50 - 4.4.2 (server certificate_request_context SHALL be zero length; sender rule) server Certificate with a 2-byte context
68cert_empty ABORT 50 - 4.4.2.4 (MUST decode_error on an empty server Certificate) Certificate with no entries
69cert_zero_entry ABORT 50,42 - 4.4.2 Certificate entry of 0 bytes
70cert_list_overrun ABORT 50 - 4.4.2, 6.2 decode_error certificate_list length 10 bytes beyond the message
71cert_entry_ext ABORT 110 - 4.4.2 (entry extensions MUST answer the ClientHello), 4.2 (MUST unsupported_extension) unknown extension on the leaf CertificateEntry
72cv_pkcs1 ABORT 47,51 - 4.4.3 (RSASSA-PKCS1-v1_5 MUST NOT be used in CertificateVerify) valid rsa_pkcs1_sha256 signature from an RSA leaf
73cv_unoffered ABORT 47,51 - 4.4.3 (scheme MUST be one the client offered) scheme ecdsa_secp521r1_sha512 (not offered) on an ECDSA signature
74cv_keymismatch ABORT 47,51 - 4.4.3, 4.2.3 scheme rsa_pss_rsae_sha256 with an EC leaf
75cv_ctxclient ABORT 51 - 4.4.3 (server context string), 6.2 decrypt_error signature over the client context string
76cv_empty ABORT 50,51 - 4.4.3 empty signature
77cv_trail ABORT 50 - 4.4.3, 6.2 decode_error CertificateVerify with a trailing byte
78cv_twice ABORT 10 - 4.4.1 CertificateVerify twice
79cv_highs OK - - RFC 8446 4.4.3, FIPS 186-5 6.4.2 (ECDSA (r, n-s) verifies) ECDSA signature with s replaced by n-s
80fin_bad ABORT 51 - 4.4.4 (MUST decrypt_error) server Finished with one bit flipped
81fin_short ABORT 50,51 - 4.4.4, 6.2 decode_error server Finished of 31 bytes
82fin_long ABORT 50,51 - 4.4.4, 6.2 decode_error server Finished of 33 bytes
83fin_plus_nst ABORT 10 - 5.1 (MUST unexpected_message: message after Finished in the same record spans a key change) NewSessionTicket in the server Finished record
84fin_twice ABORT 10 - 4.4.4, 4.6 a second Finished after the handshake
85hs_appdata_early ABORT 10 - 2, 5 (application data before Finished) protected application_data between EncryptedExtensions and Certificate
86hs_plain_alert ABORT * - 5, 6 plaintext fatal alert 40 after the ServerHello
87hs_frag_ee OK - - 5.1 EncryptedExtensions split across two records
88hs_coalesce OK - - 5.1 EncryptedExtensions, Certificate, CertificateVerify, Finished in one record
89hs_pad_big OK - - 5.4 (padding) EncryptedExtensions record with 16000 padding bytes
90rec_allzero ABORT 10 - 5.4 (MUST unexpected_message when the inner plaintext has no non-zero byte) protected record with an all-zero inner plaintext
91rec_innertype_unk ABORT 10 - 5 (MUST unexpected_message) inner content type 0x63
92rec_overflow_cipher ABORT 22 - 5.2 (MUST record_overflow above 2^14+256) protected record of 2^14+257 bytes
93rec_overflow_inner ABORT 22 - 5.4 (full TLSInnerPlaintext MUST NOT exceed 2^14+1), 5.2; tlsfuzzer test_tls13_record_layer_limits.py:272-291 expects record_overflow inner plaintext of 2^14+2 bytes (small content, large padding)
94rec_short ABORT 20,50 - 5.2 (MUST bad_record_mac when decryption fails) protected record of 5 bytes (shorter than the tag)
95rec_replay ABORT 20 - 5.2, 5.3 (per-record nonce) the EncryptedExtensions record sent twice
96rec_outer_type22 ABORT 10,20,50 - 5, 5.2 (protected records carry opaque_type 23) protected record with outer type 22
97ccs_post ABORT 10 - 5 (change_cipher_spec after the peer's Finished MUST be unexpected_message) plaintext change_cipher_spec after the handshake
98post_cr ABORT 10 - 4.6.2 (MUST unexpected_message without post_handshake_auth) post-handshake CertificateRequest
99post_unknown_hs ABORT 10 - 4, 6.2 unexpected_message post-handshake handshake type 99
100post_sh ABORT 10 - 4, 6.2 ServerHello after the handshake
101post_ku_req OK - - 4.6.3 KeyUpdate(update_requested), then the reply under the next key
102post_ku_bad ABORT 47 - 4.6.3 (MUST illegal_parameter for another value) KeyUpdate with request_update = 2
103post_ku_len ABORT 50 - 4.6.3, 6.2 decode_error KeyUpdate of 2 bytes
104post_ku_flood ABORT:UNEXPECTED_MESSAGE 10 - 4.6.3, client policy (1000 records without data) 1001 KeyUpdate(update_requested) records
105post_nst_split OK - - 5.1 NewSessionTicket split across two records
106post_interleave ABORT 10 - 5.1 (handshake messages MUST NOT be interleaved with other record types) application data between two NewSessionTicket fragments
107post_nst_trail ABORT_OR_OK 50 - 4.6.1 (the client does not resume; parsing optional) NewSessionTicket with a trailing byte
108post_plain_close ABORT * - 5, 6.1 (unprotected close_notify after the handshake) partial reply, then a plaintext close_notify
109post_trunc ABORT:EOF - - 6.1 (truncation without close_notify) partial reply (4 of 100 body bytes), TCP FIN
110post_trunc_full ABORT:EOF - - 6.1 whole reply, TCP FIN without close_notify
111post_alert_unknown ABORT:ALERT_RECEIVED - - 6 (unknown alert MUST be treated as an error) protected fatal alert 200
112post_alert_warn ABORT:ALERT_RECEIVED - - 6 (alerts other than close_notify/user_canceled are fatal whatever the level) protected bad_certificate with level warning
113post_user_canceled ABORT_OR_OK * - 6.1 (user_canceled is a closure alert) user_canceled, then the reply
114post_alert_trail ABORT 50 - 6, 6.2 decode_error protected alert record of 3 bytes
115post_close_then_data OK - !out:EXTRA-AFTER-CLOSE 6.1 (data after close_notify MUST be ignored) reply, close_notify, then application data
116post_appdata_max OK - - 5.1, 5.4 (2^14 bytes of plaintext is the maximum allowed) reply in one record of exactly 2^14 bytes
117post_empty_hs ABORT_OR_OK 10,50 - 5.1 empty protected handshake record after the handshake
118post_hs_bigdecl ABORT * - 4 NewSessionTicket declaring 0xffffff bytes
119post_appdata_over ABORT 22 - 5.1, 5.2 (MUST record_overflow above 2^14 plaintext bytes); tlsfuzzer test_tls13_record_layer_limits.py:226-240 application data record carrying 2^14+1 content bytes