All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "RDS: Heap OOB write in rds_message_alloc_sgs()" has been added to the 4.4-stable tree
@ 2018-01-13 13:34 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-01-13 13:34 UTC (permalink / raw)
  To: simo.ghannam, davem, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    RDS: Heap OOB write in rds_message_alloc_sgs()

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rds-heap-oob-write-in-rds_message_alloc_sgs.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Sat Jan 13 14:28:20 CET 2018
From: Mohamed Ghannam <simo.ghannam@gmail.com>
Date: Tue, 2 Jan 2018 19:44:34 +0000
Subject: RDS: Heap OOB write in rds_message_alloc_sgs()

From: Mohamed Ghannam <simo.ghannam@gmail.com>


[ Upstream commit c095508770aebf1b9218e77026e48345d719b17c ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/rds/rdma.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -517,6 +517,9 @@ int rds_rdma_extra_size(struct rds_rdma_
 
 	local_vec = (struct rds_iovec __user *)(unsigned long) args->local_vec_addr;
 
+	if (args->nr_local == 0)
+		return -EINVAL;
+
 	/* figure out the number of pages in the vector */
 	for (i = 0; i < args->nr_local; i++) {
 		if (copy_from_user(&vec, &local_vec[i],


Patches currently in stable-queue which might be from simo.ghannam@gmail.com are

queue-4.4/rds-null-pointer-dereference-in-rds_atomic_free_op.patch
queue-4.4/rds-heap-oob-write-in-rds_message_alloc_sgs.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-13 13:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-13 13:34 Patch "RDS: Heap OOB write in rds_message_alloc_sgs()" has been added to the 4.4-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.