From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Yuval Shaia <yuval.shaia@oracle.com>
Cc: Ilan Tayari <ilant@mellanox.com>,
Boris Pismenny <borisp@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
Matan Barak <matanb@mellanox.com>,
Leon Romanovsky <leon@kernel.org>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/mlx5/core/fpga/ipsec: Fix use-after-free
Date: Thu, 22 Mar 2018 13:37:29 -0500 [thread overview]
Message-ID: <b19ec4fc-03fa-385f-a9d6-40b9d7b42830@embeddedor.com> (raw)
In-Reply-To: <20180322183225.GA24009@yuvallap>
Hi Yuval,
On 03/22/2018 01:32 PM, Yuval Shaia wrote:
> On Thu, Mar 22, 2018 at 01:03:42PM -0500, Gustavo A. R. Silva wrote:
>> _rule_ is being freed and then dereferenced by accessing rule->ctx
>>
>> Fix this by copying the value returned by PTR_ERR(rule->ctx) into a local
>> variable for its safe use after freeing _rule_
>>
>> Addresses-Coverity-ID: 1466041 ("Read from pointer after free")
>> Fixes: 05564d0ae075 ("net/mlx5: Add flow-steering commands for FPGA IPSec implementation")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>
> Prefix should not be that long, a short one as this is enough.
>
Yeah. Actually, I was suspicious about it.
> net/mlx5: Fix use-after-free
>
> Besides that - lgtm.
>
> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
>
I'll send v2 with a short prefix and add your Reviewed-by.
Thanks for the feedback.
--
Gustavo
prev parent reply other threads:[~2018-03-22 18:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 18:03 [PATCH] net/mlx5/core/fpga/ipsec: Fix use-after-free Gustavo A. R. Silva
2018-03-22 18:32 ` Yuval Shaia
2018-03-22 18:37 ` Gustavo A. R. Silva [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=b19ec4fc-03fa-385f-a9d6-40b9d7b42830@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=borisp@mellanox.com \
--cc=ilant@mellanox.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=matanb@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=yuval.shaia@oracle.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).