The header of a push-pull state message contains a count of nodes and user state
length. As an optimization, both of these fields are used to pre-allocate memory
to receive the remote state before copying it off the wire. But if the header
mismatches the actual state, a very small pull-push state message (or at least
one below the message size limit) can be used to consume excess memory on the
receiver.
Limit the memory allocated such that the maximum amount allocated cannot exceed
the maximum actual size of the push-pull state, either in number of nodes or
size of the user state.
Ref: https://hashicorp.atlassian.net/browse/SECVULN-42161
Ref: https://hashicorp.atlassian.net/browse/NMD-1523