From: Jason Gunthorpe <jgg@ziepe.ca>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Yishai Hadas <yishaih@mellanox.com>,
Doug Ledford <dledford@redhat.com>,
linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: IB/mlx4: Potential buffer overflow in _mlx4_set_path()
Date: Wed, 13 Dec 2017 18:20:37 +0000 [thread overview]
Message-ID: <20171213182037.GF5984@ziepe.ca> (raw)
In-Reply-To: <20171205143923.26dqc3ekhbmtmsgt@mwanda>
On Tue, Dec 05, 2017 at 05:39:23PM +0300, Dan Carpenter wrote:
> Smatch complains about this code:
>
> drivers/infiniband/hw/mlx4/qp.c:1827 _mlx4_set_path()
> error: buffer overflow 'dev->dev->caps.gid_table_len' 3 <= 255
>
> The mlx4_ib_gid_index_to_real_index() does check that "port" is within
> bounds, but we don't check the return value for errors. It seems simple
> enough to add a check for that.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Thanks, applied to -next
Jason
prev parent reply other threads:[~2017-12-13 18:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 14:39 [PATCH] IB/mlx4: Potential buffer overflow in _mlx4_set_path() Dan Carpenter
2017-12-05 15:53 ` Leon Romanovsky
2017-12-13 18:20 ` Jason Gunthorpe [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=20171213182037.GF5984@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=dan.carpenter@oracle.com \
--cc=dledford@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=yishaih@mellanox.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