[A·M2.1 follow-up] Buffer-accumulating parse for Redis/SMTP emulators #23
Labels
No labels
bug
deploy
documentation
duplicate
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
femboy/blackwall#23
Loading…
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?
From the M2.1 whole-branch review (minor). The Redis emulator parses each individual read() (
parse_command(&chunk[..n])) rather than an accumulated buffer, so a client that fragments/pipelines a command across TCP segments can be mis-parsed. SMTP is line-buffered and fine, but worth a consistency pass. Fix: parse from an accumulated buffer and drain consumed bytes. Affects believability against well-behaved clients only; scanners send one tidy command per packet, so not a threat-model defect.