From: sashiko-bot@kernel.org
To: "Andrew Stellman" <bugs@stellman-greene.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next] RDMA/siw: Fix overflow in inline SGE length check
Date: Wed, 02 Dec 2026 17:01:09 +0000 [thread overview]
Message-ID: <sashiko-outbox-246274@kernel.org> (raw)
In-Reply-To: <20261202165018.50109-1-bugs@stellman-greene.com>
> From: Andrew Stellman <astellman@stellman-greene.com>
>
> siw_copy_inline_sgl() keeps a running total of the inline data length in
> the int 'bytes'. For each SGE it adds the u32 length to the total first
> and only then checks the total against SIW_MAX_INLINE. If the lengths
> add up to 2^32 or more, the total wraps around, and if the wrapped total
> is small enough, the check passes and memcpy() is called with the full
> SGE length to copy into the inline area of the send queue entry.
>
> A kernel caller that posts an IB_SEND_INLINE work request with SGE
> lengths of 16 and 0xfffffff8 gets a total of 8. siw_post_send()
> returns 0, and KASAN reports:
>
> [ 45.087395] ==================================================================
> [ 45.087402] BUG: KASAN: vmalloc-out-of-bounds in siw_copy_inline_sgl.isra.0+0xdc/0x1e0
> [ ... ]
> before adding it, so the total can't wrap. Such a work request now
> fails with -EINVAL instead of being posted.
>
> Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
> Signed-off-by: Andrew Stellman <astellman@stellman-greene.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202165018.50109-1-bugs@stellman-greene.com?part=1
prev parent reply other threads:[~2026-12-02 17:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 16:50 [PATCH rdma-next] RDMA/siw: Fix overflow in inline SGE length check Andrew Stellman
2026-12-02 17:01 ` sashiko-bot [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=sashiko-outbox-246274@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bugs@stellman-greene.com \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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