Imported from GitHub aien-dev/readings-window#9 (code only)
GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).
Base 3197d3b2851a60008302b5b5c9c0d82e8ae93cbb · Head 55ff64b75853085b696bdb44b7497b1d669b4b14
drakestapleton wrote on 2026-10-24 08:44 UTC
Static review of 3197d3b2851a60008302b5b5c9c0d82e8ae93cbb found a header-size limit bypass in src/tls.rs::read_head: a completed header is returned before MAX_HEAD is checked. A terminator arriving in the next chunk can therefore complete a header beyond the advertised cap.
Check the delimiter endpoint (i + 4) against MAX_HEAD before truncating/returning. Do not compare the entire buffer after finding the terminator: a valid smaller head may arrive with body bytes in the same read. A local correction and regressions cover the exact boundary, oversized/unterminated heads, and valid head plus trailing body. git diff --check passes; Rust compilation and execution are NOT_RUN because this workspace lacks an approved toolchain. No runtime pass or approval is claimed.
Separate source concern: HEAD_DEADLINE is checked before a blocking read, not after it. A read that completes after the deadline can still return success. Absolute deadline behavior needs controlled loopback validation; no indefinite-hang claim is made.
Before merge: execute the boundary regression against original and corrected code, run the full tests/release build, and qualify timeout behavior. CodeQL success alone does not establish these runtime bounds. No merge or deployment performed.
Fetch it
A git bundle of the pull request's head, 2844 bytes.