From: Leon Romanovsky <leonro@nvidia.com>
To: Bernard Metzler <bmt@zurich.ibm.com>
Cc: <linux-rdma@vger.kernel.org>, <jgg@nvidia.com>,
Olga Kornievskaia <kolga@netapp.com>, Tom Talpey <tom@talpey.com>
Subject: Re: [PATCH v2] RDMA/siw: Fix immediate work request flush to completion queue.
Date: Sun, 6 Nov 2022 20:53:26 +0200 [thread overview]
Message-ID: <Y2gCph5bw1y9zCzF@unreal> (raw)
In-Reply-To: <20221102093110.661109-1-bmt@zurich.ibm.com>
On Wed, Nov 02, 2022 at 10:31:10AM +0100, Bernard Metzler wrote:
> Correctly set send queue element opcode during immediate work request
> flushing in post sendqueue operation, if the QP is in ERROR state.
> An undefined ocode value results in out-of-bounds access to an array
> for mapping the opcode between siw internal and RDMA core representation
> in work completion generation. It resulted in a KASAN BUG report
> of type 'global-out-of-bounds' during NFSoRDMA testing.
> This patch further fixes a potential case of a malicious user which may
> write undefined values for completion queue elements status or opcode,
> if the CQ is memory mapped to user land. It avoids the same out-of-bounds
> access to arrays for status and opcode mapping as described above.
Please split commit message to paragraphs.
>
> Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
> Fixes: b0fff7317bb4 ("rdma/siw: completion queue methods")
>
No blank line here
> Reported-by: Olga Kornievskaia <kolga@netapp.com>
> Reviewed-by: Tom Talpey <tom@talpey.com>
> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
>
> ----
It should be "---" and not "----" for git to trim changelog.
> v1 -> v2:
> Change return code of siw_sq_flush_wr() to -EINVAL
> for unexpected opcodes.
>
> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
Another SOB.
> ---
> drivers/infiniband/sw/siw/siw_cq.c | 24 ++++++++++++++--
> drivers/infiniband/sw/siw/siw_verbs.c | 40 ++++++++++++++++++++++++---
> 2 files changed, 58 insertions(+), 6 deletions(-)
Thanks
prev parent reply other threads:[~2022-11-06 18:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 9:31 [PATCH v2] RDMA/siw: Fix immediate work request flush to completion queue Bernard Metzler
2022-11-06 18:53 ` Leon Romanovsky [this message]
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=Y2gCph5bw1y9zCzF@unreal \
--to=leonro@nvidia.com \
--cc=bmt@zurich.ibm.com \
--cc=jgg@nvidia.com \
--cc=kolga@netapp.com \
--cc=linux-rdma@vger.kernel.org \
--cc=tom@talpey.com \
/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).