From: Alessio Balsini <balsini@android.com>
To: gregkh@linuxfoundation.org
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@android.com, Jason Gunthorpe <jgg@mellanox.com>,
Leon Romanovsky <leonro@mellanox.com>,
Alessio Balsini <balsini@android.com>
Subject: [PATCH 4.9.y 4.14.y] IB/mlx5: Fix leaking stack memory to userspace
Date: Mon, 12 Aug 2019 11:55:03 +0100 [thread overview]
Message-ID: <20190812105503.153253-1-balsini@android.com> (raw)
In-Reply-To: <20190812105136.151840-1-balsini@android.com>
From: Jason Gunthorpe <jgg@mellanox.com>
commit 0625b4ba1a5d4703c7fb01c497bd6c156908af00 upstream.
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Alessio Balsini <balsini@android.com>
---
drivers/infiniband/hw/mlx5/qp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index a7bc89f5dae7..89357d9e489d 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -1515,7 +1515,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
struct mlx5_ib_resources *devr = &dev->devr;
int inlen = MLX5_ST_SZ_BYTES(create_qp_in);
struct mlx5_core_dev *mdev = dev->mdev;
- struct mlx5_ib_create_qp_resp resp;
+ struct mlx5_ib_create_qp_resp resp = {};
struct mlx5_ib_cq *send_cq;
struct mlx5_ib_cq *recv_cq;
unsigned long flags;
--
2.23.0.rc1.153.gdeed80330f-goog
next prev parent reply other threads:[~2019-08-12 10:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 10:48 [PATCH 3.18.y] IB/mlx5: Fix leaking stack memory to userspace Alessio Balsini
2019-08-12 10:51 ` [PATCH 4.4.y] " Alessio Balsini
2019-08-12 10:55 ` Alessio Balsini [this message]
2019-08-12 14:23 ` [PATCH 4.9.y 4.14.y] " Greg KH
2019-08-13 9:27 ` Alessio Balsini
2019-08-13 10:01 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190812105503.153253-1-balsini@android.com \
--to=balsini@android.com \
--cc=gregkh@linuxfoundation.org \
--cc=jgg@mellanox.com \
--cc=kernel-team@android.com \
--cc=leonro@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.