summaryrefslogtreecommitdiff
path: root/net/smc/smc_core.c
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2019-10-17 15:44:03 +0300
committerDavid S. Miller <davem@davemloft.net>2019-10-18 20:19:43 +0300
commitae6fcfbf5f03de3407b809aaee319330d3dc7f8b (patch)
tree5fbcf9656666a376a80edc90c21a1de0da79e343 /net/smc/smc_core.c
parentec3359b685db834c249953db6ac5717bf5cde425 (diff)
downloadlinux-ae6fcfbf5f03de3407b809aaee319330d3dc7f8b.tar.xz
vsock/virtio: discard packets if credit is not respected
If the remote peer doesn't respect the credit information (buf_alloc, fwd_cnt), sending more data than it can send, we should drop the packets to prevent a malicious peer from using all of our memory. This is patch follows the VIRTIO spec: "VIRTIO_VSOCK_OP_RW data packets MUST only be transmitted when the peer has sufficient free buffer space for the payload" Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_core.c')
0 files changed, 0 insertions, 0 deletions