From: Andrew Stellman <bugs@stellman-greene.com>
To: Bernard Metzler <bernard.metzler@linux.dev>
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH rdma-next] RDMA/siw: Fix overflow in inline SGE length check
Date: Wed, 2 Dec 2026 14:48:29 -0500 [thread overview]
Message-ID: <20261202194829.5633-1-bugs@stellman-greene.com> (raw)
In-Reply-To: <63fd6336-4370-4f2b-bcec-1e18c6b5ce84@linux.dev>
On Wed, Dec 02, 2026 at 07:18:50PM +0100, Bernard Metzler wrote:
> The bug is that 'bytes' is declared signed while 'core_sge->length'
> is unsigned. Just make it unsigned as well.
Thanks, Bernard. I tried that. With 'bytes' as unsigned int, the same
test (inline SGE lengths 16 and 0xfffffff8) still posted and KASAN still
reported the out-of-bounds write, because the sum wraps to 8. With
'bytes' as u64 it returned -EINVAL and KASAN was quiet, the same as v1.
Would you rather have the u64 version, or keep v1's check before the
addition?
Andrew
prev parent reply other threads:[~2026-12-02 19:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 16:50 Andrew Stellman
2026-12-02 18:18 ` Bernard Metzler
2026-12-02 19:48 ` Andrew Stellman [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=20261202194829.5633-1-bugs@stellman-greene.com \
--to=bugs@stellman-greene.com \
--cc=bernard.metzler@linux.dev \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@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
all inboxes | Powered by JetHome®