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.4.y] IB/mlx5: Fix leaking stack memory to userspace
Date: Mon, 12 Aug 2019 11:51:36 +0100 [thread overview]
Message-ID: <20190812105136.151840-1-balsini@android.com> (raw)
In-Reply-To: <20190812104843.150191-1-balsini@android.com>
From: Jason Gunthorpe <jgg@mellanox.com>
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 43d277a931c2..c035abfe8c55 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -865,7 +865,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
{
struct mlx5_ib_resources *devr = &dev->devr;
struct mlx5_core_dev *mdev = dev->mdev;
- struct mlx5_ib_create_qp_resp resp;
+ struct mlx5_ib_create_qp_resp resp = {};
struct mlx5_create_qp_mbox_in *in;
struct mlx5_ib_create_qp ucmd;
int inlen = sizeof(*in);
--
2.23.0.rc1.153.gdeed80330f-goog
next prev parent reply other threads:[~2019-08-12 10:52 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 ` Alessio Balsini [this message]
2019-08-12 10:55 ` [PATCH 4.9.y 4.14.y] " Alessio Balsini
2019-08-12 14:23 ` 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=20190812105136.151840-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 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).