You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
e2e: 17 security assertions scan for 0x8D (:status 404) while named and documented as 400 #1374
Seventeen assertions in the H2 security suite test for :status 404 while being named, commented
and reported as 400. The byte they scan for is 0x8D, which is HPACK indexed static entry 13 = :status 404; :status 400 is entry 12 = 0x8C.
Most of them are consumed through a permissive disjunction, so the term may never have fired.
Evidence
RFC 7541 static table, as loona-hpack-0.4.3/src/lib.rs:301-307 lists it:
0x8D & 0x7f = 13 → :status 404. 0x8C would be 400.
Sites: e2e/src/tests/h2_security_tests.rs (15 let got_400 plus comments at :577, :658) and e2e/src/tests/h2_security_header_injection.rs:73, :542. h2_security_tests.rs:658 states it
outright:
// Check for 400 status (HPACK static table index 13 = :status 400 = 0x8D).
Index 13 is 404.
Why it is not merely a naming defect
The value feeds permissive disjunctions:
let rejected = got_rst || got_goaway || got_400;// :589, :669let ok = got_rejection || got_400 || got_200 || frames.is_empty();// :755
If sozu emits a genuine 400, got_400 is false and the test passes on another disjunct — so the
term contributes nothing and nobody notices. The second form is weaker still: it accepts frames.is_empty(), i.e. a connection that produced nothing at all, as success.
Why a mechanical fix is wrong
Converting these to headers_status_matches(.., b"400") — now available after #1365 — would change
behaviour, not preserve it: a term that is currently always false becomes a live assertion that may
fail. Each site needs deciding on its merits: is the expected status 400 or 404, and should the
disjunct be load-bearing?
frames.is_empty() as an accepted outcome deserves its own look.
Provenance
Found while re-deriving a count for #1353, by an agent that declined the mechanical conversion for
exactly this reason. Recorded in e2e/COVERAGE.md as a precondition before anyone converts them.
Activity
test(e2e): decode every H2 status probe and derive the 810 budget