linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] nvme-rdma: Don't leak uninitialized memory in connect request private data
@ 2016-07-31  7:27 Roland Dreier
  2016-07-31  7:27 ` [PATCH 2/2] nvme-rdma: Add handling for connecting to IPv6 targets Roland Dreier
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Roland Dreier @ 2016-07-31  7:27 UTC (permalink / raw)


From: Roland Dreier <roland@purestorage.com>

Zero out the full nvme_rdma_cm_req structure before sending it.
Otherwise we end up leaking kernel memory in the reserved field, which
might break forward compatibility in the future.

Signed-off-by: Roland Dreier <roland at purestorage.com>
---
 drivers/nvme/host/rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 3e3ce2b0424e..b96b88369871 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1269,7 +1269,7 @@ static int nvme_rdma_route_resolved(struct nvme_rdma_queue *queue)
 {
 	struct nvme_rdma_ctrl *ctrl = queue->ctrl;
 	struct rdma_conn_param param = { };
-	struct nvme_rdma_cm_req priv;
+	struct nvme_rdma_cm_req priv = { };
 	int ret;
 
 	param.qp_num = queue->qp->qp_num;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2016-08-22  6:47 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-31  7:27 [PATCH 1/2] nvme-rdma: Don't leak uninitialized memory in connect request private data Roland Dreier
2016-07-31  7:27 ` [PATCH 2/2] nvme-rdma: Add handling for connecting to IPv6 targets Roland Dreier
2016-07-31  8:45   ` Sagi Grimberg
2016-07-31 10:58     ` Sagi Grimberg
2016-07-31 15:33       ` Roland Dreier
2016-08-01  5:58         ` Sagi Grimberg
2016-08-01  6:15           ` Sagi Grimberg
2016-08-01 11:09       ` Christoph Hellwig
2016-08-01 11:24         ` Sagi Grimberg
2016-08-01 15:50           ` Christoph Hellwig
2016-08-01 16:06             ` Roland Dreier
2016-08-02  6:43               ` Sagi Grimberg
2016-08-02 12:51               ` Christoph Hellwig
2016-08-18  7:44               ` Sagi Grimberg
2016-08-22  4:44                 ` Roland Dreier
2016-08-22  6:47                   ` Sagi Grimberg
2016-08-02  6:41             ` Sagi Grimberg
2016-08-01 11:09   ` Christoph Hellwig
2016-07-31  8:44 ` [PATCH 1/2] nvme-rdma: Don't leak uninitialized memory in connect request private data Sagi Grimberg
2016-08-01 11:07 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).