mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@ziepe.ca>, Parav Pandit <parav@mellanox.com>,
	Jack Morgenstein <jackm@mellanox.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3][next] RDMA/core: Use size_{add,sub,mul}() in calls to struct_size()
Date: Tue, 19 Sep 2023 10:37:37 +0300	[thread overview]
Message-ID: <169510905734.14896.2991454817672701344.b4-ty@kernel.org> (raw)
In-Reply-To: <ZQdt4NsJFwwOYxUR@work>


On Sun, 17 Sep 2023 15:21:36 -0600, Gustavo A. R. Silva wrote:
> If, for any reason, the open-coded arithmetic causes a wraparound,
> the protection that `struct_size()` provides against potential integer
> overflows is defeated. Fix this by hardening calls to `struct_size()`
> with `size_add()`, `size_sub()` and `size_mul()`.
> 
> 

Applied, thanks!

[1/1] RDMA/core: Use size_{add,sub,mul}() in calls to struct_size()
      https://git.kernel.org/rdma/rdma/c/81760bedc65194

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>

      parent reply	other threads:[~2023-09-19  7:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-17 21:21 Gustavo A. R. Silva
2023-09-19  7:37 ` Leon Romanovsky
2023-09-19  7:37 ` 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=169510905734.14896.2991454817672701344.b4-ty@kernel.org \
    --to=leon@kernel.org \
    --cc=gustavo@embeddedor.com \
    --cc=gustavoars@kernel.org \
    --cc=jackm@mellanox.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=parav@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

all inboxes | Powered by JetHome®