gRPC data: projected read decode limit is per-type, but raw response size is bounded only by channel MaxMessageBytes #963

Closed
opened 2026-12-01 20:47:01 -05:00 by dohertj2 · 1 comment
Owner

Follow-up to #960 (75e6ff9af). Reads now reserve by declared type (16 KiB scalar) and use that as the decode limit, so up to 64 concurrent reads fit in the 1 MiB MaxPendingBytes budget. But the raw gRPC response is still bounded only by the channel MaxMessageBytes, so a misbehaving origin could briefly hold ~64 x MaxMessageBytes in transport buffers before decode refuses each one. Consider a per-call receive-size limit matched to the reservation (CallOptions / per-method MaxReceiveMessageSize) or accounting raw bytes against the budget.

Follow-up to #960 (75e6ff9af). Reads now reserve by declared type (16 KiB scalar) and use that as the decode limit, so up to 64 concurrent reads fit in the 1 MiB MaxPendingBytes budget. But the raw gRPC response is still bounded only by the channel MaxMessageBytes, so a misbehaving origin could briefly hold ~64 x MaxMessageBytes in transport buffers before decode refuses each one. Consider a per-call receive-size limit matched to the reservation (CallOptions / per-method MaxReceiveMessageSize) or accounting raw bytes against the budget.
dohertj2 added the type:followuppriority:p3 labels 2026-12-01 20:47:01 -05:00
Author
Owner

Fixed in 1724a175b (merged to master, not yet pushed); evidence docs/plans/evidence/grpc-data-ext/963.md — oversized 1 MiB response to a 16 KiB read now refused after the 5-byte length prefix (was 1,048,581 bytes buffered). Post-merge: Runtime DataConnections 1022/1022, Host.IntegrationTests GrpcData 26/26. HistoryRead / CallConditionMethod / write-path metadata stay on the channel maximum (outside the small read budget).

Fixed in 1724a175b (merged to master, not yet pushed); evidence docs/plans/evidence/grpc-data-ext/963.md — oversized 1 MiB response to a 16 KiB read now refused after the 5-byte length prefix (was 1,048,581 bytes buffered). Post-merge: Runtime DataConnections 1022/1022, Host.IntegrationTests GrpcData 26/26. HistoryRead / CallConditionMethod / write-path metadata stay on the channel maximum (outside the small read budget).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#963