[A·M2.1 follow-up] Buffer-accumulating parse for Redis/SMTP emulators #23

Closed
opened 2026-06-25 05:10:20 +00:00 by vxfemboy · 0 comments
vxfemboy commented 2026-06-25 05:10:20 +00:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
femboy/blackwall#23
No description provided.