RDS: Heap OOB write in rds_message_alloc_sgs()
authorMohamed Ghannam <simo.ghannam@gmail.com>
Tue, 2 Jan 2018 19:44:34 +0000 (19:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Jan 2018 16:23:05 +0000 (11:23 -0500)
commitc095508770aebf1b9218e77026e48345d719b17c
tree1f112b635b9bde56a91b6b3de0045f3cbc8ff5ef
parentc0bace798436bca0fdc221ff61143f1376a9c3de
RDS: Heap OOB write in rds_message_alloc_sgs()

When args->nr_local is 0, nr_pages gets also 0 due some size
calculation via rds_rm_size(), which is later used to allocate
pages for DMA, this bug produces a heap Out-Of-Bound write access
to a specific memory region.

Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/rdma.c