summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-07-29 18:50:29 -0700
committerRaghavendra G <rgowdapp@redhat.com>2014-08-04 18:54:53 -0700
commit6cc22537b68cb52ebc0101fca7fb232c183b00a1 (patch)
treef5a2e8c1dc3447f600fc371796b26ffebaf74640 /extras
parent2ff46b74b25cc2e61bfe67c43b31d8f5ca88e4ac (diff)
socket: add boundary checks for iobuf_get2 over rpc_hdr_bytes
A malformed packet can cause a OOM while peforming iobuf_get2() on a large enough packet side. Such a scenario is observed when running vulnerability tests, it would look like one of those tests perhaps based on DDOS (Denial of Service) attacks hand-crafts a RPC packet which is of a large enough size - since we do not verify the size and do not provide any boundary checks, there are secenarios where it leads to OOM. Reproducible consistently with those tests has revealed that we should be ideally be adding a boundary check. Limit such an allocation to a 1gigabyte, as it might be sufficient to handle for all variety of RPC packets. Change-Id: I5f1411dd96d6f167993d28a1718ffef2fb4e9923 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8384 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'extras')
0 files changed, 0 insertions, 0 deletions