EXP-02: bodyExcerpt can leave a truncated credential in the excerpt #215
Labels
No labels
already-shipped
bug
documentation
duplicate
enhancement
external-review
good first issue
help wanted
in progress
invalid
needs-decision
proposal
question
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: crenshawdev/cadence-archived#215
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Requirement EXP-02, seeded at the v3.5.3 close. Found while carrying the v3.5.3
risk_surfacesurvivors forward, and still live at v3.5.3.bodyExcerpt's trailing-token safeguard runs only whenclean <= room, so a sanitizer shrink can pull a window-edge-truncated credential's head under the cap whilecleanstill exceeds it (review-provider.mjs:689).Failure scenario, from the fire that raised it: a >4096-byte body whose first ~3000 bytes are one credential assignment, followed by a URL with userinfo straddling the window edge. The partial URL moves to byte 961 of
clean,cleanis ~1173 against a room of 1009, so the head cut returns ~36 bytes of the secret.This is the one finding of the four blocker/high carried out of v3.5.3 that was NOT already fixed in the tree. The other three (the missing
reserror listener, the camelCase credential key, the quoted multi-word value) were verified fixed by probe at the close.Fix direction: the safeguard runs on the path that truncates, not only on the path that fits.
Fixed in v3.5.4 as EXP-02, merged in #217 and tagged v3.5.4. The fix carries a check watched failing against the unpatched tree first.