| 1 |
|
| MODULE = Hyperman PACKAGE = Hyperman |
| 2 |
|
| |
| 3 |
|
| # QUIC internals, for t/44-quic-cid.t. Author-facing and not documented: they |
| 4 |
|
| # exist because the two structures they drive cannot be reached any other way |
| 5 |
|
| # from Perl, and both are things a black-box test against a real client would |
| 6 |
|
| # not catch. |
| 7 |
|
| |
| 8 |
|
| # The Destination Connection ID map. A bug here misroutes one client's |
| 9 |
|
| # packets into another client's connection - a data disclosure - so this |
| 10 |
|
| # inserts many CIDs across many connections, looks every one up, retires a |
| 11 |
|
| # connection and a single CID, and asserts nothing else moved. 1 = every |
| 12 |
|
| # check passed. |
| 13 |
|
| IV |
| 14 |
|
| # uncoverable statement class:ignore_covered_err |
| 15 |
|
| # uncoverable subroutine class:ignore_covered_err |
| 16 |
|
| _quic_cid_selftest() |
| 17 |
|
| CODE: |
| 18 |
0 |
▶ | RETVAL = hm_quic_cid_selftest(); /* # uncoverable statement class:ignore_covered_err */ |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = hm_quic_cid_selftest(); /* # uncoverable statement class:ignore_covered_err */ |
0 |
0 |
0 |
|
| 19 |
|
| OUTPUT: |
| 20 |
|
| RETVAL |
| 21 |
|
| |
| 22 |
|
| # The expiry min-heap. A broken sift is either a connection that never times |
| 23 |
|
| # out or one that PTOs itself to death, and neither is visible from outside. |
| 24 |
|
| # Pushes in random order, moves deadlines both earlier and later, removes |
| 25 |
|
| # from the middle, and asserts the drain is monotonic and every cached |
| 26 |
|
| # heap_idx still agrees with the slot holding it. |
| 27 |
|
| IV |
| 28 |
|
| # uncoverable statement class:ignore_covered_err |
| 29 |
|
| # uncoverable subroutine class:ignore_covered_err |
| 30 |
|
| _quic_heap_selftest() |
| 31 |
|
| CODE: |
| 32 |
0 |
▶ | RETVAL = hm_quic_heap_selftest(); /* # uncoverable statement class:ignore_covered_err */ |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = hm_quic_heap_selftest(); /* # uncoverable statement class:ignore_covered_err */ |
0 |
0 |
0 |
|
| 33 |
|
| OUTPUT: |
| 34 |
|
| RETVAL |
| 35 |
|
| |
| 36 |
|
| # The per-source half-open table: one address cannot spend the Retry |
| 37 |
|
| # threshold alone. Counts per address, falls on completion, frees its slot. |
| 38 |
|
| IV |
| 39 |
|
| # uncoverable statement class:ignore_covered_err |
| 40 |
|
| # uncoverable subroutine class:ignore_covered_err |
| 41 |
|
| _quic_src_selftest() |
| 42 |
|
| CODE: |
| 43 |
0 |
▶ | RETVAL = hm_quic_src_selftest(); /* # uncoverable statement class:ignore_covered_err */ |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = hm_quic_src_selftest(); /* # uncoverable statement class:ignore_covered_err */ |
0 |
0 |
0 |
|
| 44 |
|
| OUTPUT: |
| 45 |
|
| RETVAL |
| 46 |
|
| |
| 47 |
|
| # Address-validation tokens: Retry, NEW_TOKEN and stateless reset. Asserts the |
| 48 |
|
| # property that matters - a token verifies for the address, connection id and |
| 49 |
|
| # secret it was minted for, and for nothing else. |
| 50 |
|
| IV |
| 51 |
|
| # uncoverable statement class:ignore_covered_err |
| 52 |
|
| # uncoverable subroutine class:ignore_covered_err |
| 53 |
|
| _quic_token_selftest() |
| 54 |
|
| CODE: |
| 55 |
0 |
▶ | RETVAL = hm_quic_token_selftest(); /* # uncoverable statement class:ignore_covered_err */ |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = hm_quic_token_selftest(); /* # uncoverable statement class:ignore_covered_err */ |
0 |
0 |
0 |
|
| 56 |
|
| OUTPUT: |
| 57 |
|
| RETVAL |
| 58 |
|
| |
| 59 |
|
| # ngtcp2_pkt_decode_version_cid over bytes from Perl: the first thing that |
| 60 |
|
| # touches an attacker-controlled datagram. Returns (rv, version, dcidlen, |
| 61 |
|
| # scidlen); rv 0 is decoded, -235 is NGTCP2_ERR_VERSION_NEGOTIATION, and |
| 62 |
|
| # anything else is a refusal. |
| 63 |
|
| void |
| 64 |
|
| # uncoverable statement class:ignore_covered_err |
| 65 |
|
| # uncoverable subroutine class:ignore_covered_err |
| 66 |
|
| _quic_decode_selftest(pkt) |
| 67 |
|
| SV *pkt |
| 68 |
|
| PREINIT: |
| 69 |
|
| STRLEN len; |
| 70 |
|
| const unsigned char *p; |
| 71 |
0 |
| int rv = -1; /* # uncoverable statement class:ignore_covered_err */ |
| 72 |
0 |
| uint32_t ver = 0; /* # uncoverable statement class:ignore_covered_err */ |
| 73 |
0 |
| size_t dlen = 0, slen = 0; /* # uncoverable statement class:ignore_covered_err */ |
| 74 |
|
| PPCODE: |
| 75 |
0 |
| p = (const unsigned char *)SvPV(pkt, len); /* # uncoverable statement class:ignore_covered_err */ |
| 76 |
0 |
| hm_quic_decode_probe(p, (size_t)len, &rv, &ver, &dlen, &slen); /* # uncoverable statement class:ignore_covered_err */ |
| 77 |
0 |
▶ | EXTEND(SP, 4); /* # uncoverable statement class:ignore_covered_err */ |
Branch: 1 branch
| Branch | True | False | Total |
| EXTEND(SP, 4); /* # uncoverable statement class:ignore_covered_err */ |
0 |
0 |
0 |
|
| 78 |
0 |
| mPUSHi(rv); /* # uncoverable statement class:ignore_covered_err */ |
| 79 |
0 |
| mPUSHu(ver); /* # uncoverable statement class:ignore_covered_err */ |
| 80 |
0 |
| mPUSHu((UV)dlen); /* # uncoverable statement class:ignore_covered_err */ |
| 81 |
0 |
| mPUSHu((UV)slen); /* # uncoverable statement class:ignore_covered_err */ |