Document the unbounded memory use of block-wise transfers
A block-wise transfer accumulates the entire response payload in memory
before delivering it, and the client imposes no upper bound on the
accumulated size. A malicious or malfunctioning server that keeps
setting the "more blocks" bit without ever sending a final block can
therefore drive the client to exhaust memory. The data is processed
after decryption, so DTLS does not prevent this.
Nothing in the public API lets an application observe the accumulated
size while a transfer is in progress so the exposure cannot be bounded
from outside. Aborting a transfer that runs too long via
QCoapReply::abortRequest() is the only available lever, and it bounds
elapsed time rather than size.
The proper fix would be a configurable cumulative-size limit, but that
needs a new public API. A fixed internal default could introduce
regressions.
For now, document the issue and fix it later with a new API.
Task-number: QTBUG-149344
Pick-to: 6.12 6.11 6.8
Change-Id: Ia6f526f88c929eee066fee1b2cbbe06185b4c79e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>