mcl-rag#26: cross-site reads refused, whole-host matching pinned, malformed MCL_RAG_HTTP_HOSTS entries named #28
Loading…
Reference in a new issue
No description provided.
Delete branch "saturnus/26-http-guard-follow-ups"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (hardening): close the three gaps Jupiter's review of #23 left open in the HTTP guard.
Refs #26 (the threat model and the GET probe are in c7454)
Sec-Fetch-Site: cross-siteis refused with 403cross_site_requeston every method, reads included. The probe found no content leak (noAccess-Control-*header, preflight 415, no JSONP shape, no side effects). It did find a timing and size oracle: by-source returns 5550 bytes for a guessed path that exists and 12 for one that does not, and each search costs CPU.same-origin,same-siteandnonepass, as does a request without the header (curl, measure.py).Host127.0.0.1.evil.example, localhost.evil.example and evil-localhost are refused;Originhttp://localhost.evil.example and the like cannot write;MCL_RAG_HTTP_HOSTSentries. One with a scheme, a port or a path is named in a warning when the listener starts. The boot goes on, since the API still answers under localhost. IP addresses, bracketed or not, are bare.509549f) and were red on the old guard for cross-site reads and the warning. 8 mutants were each caught by their case: host prefix, host suffix, origin prefix, origin suffix, POST-only writes, no cross-site check, every entry bare, and no warning at start.rebar3 ct(80 passed), eunit, dialyzer and lint are all green.Reqfrominit/2.