From: sashiko-bot@kernel.org
To: "Harald Freudenberger" <freude@linux.ibm.com>
Cc: "Vasily Gorbik" <gor@linux.ibm.com>,
linux-s390@vger.kernel.org,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Heiko Carstens" <hca@linux.ibm.com>
Subject: Re: [PATCH v6 2/2] s390/zcrypt: Improve EP11 CPRB length and overflow checks
Date: Mon, 27 Jul 2026 08:45:31 +0000 [thread overview]
Message-ID: <20260727084532.6AF0A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260727083200.151976-3-freude@linux.ibm.com>
> The xcrb_msg_to_type6_ep11cprb_msgx() function lacks proper input
> validation, creating security vulnerabilities:
> 1. Missing minimum size validation: The ep11_cprb structure and
> subsequent payload fields (pld_tag, pld_lenfmt) are copied from
> userspace without verifying sufficient buffer length.
> 2. Arithmetic overflow in length calculations: CEIL4 alignment could
> overflow, bypassing size checks and enabling buffer overflows.
> 3. There was a gap between the message size copied from user space and
> the message buffer sent down to the card. The msg buffer size is
> rounded up to 4 byte boundary.
>
> Fix by using size_t for length calculations, adding U32_MAX boundary
> checks after alignment, and validating minimum request size and
> minimum reply size before copying from userspace. Also pad the gap
> between user space copied message and message buffer sent down to the
> card by zeros.
>
> Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260727083200.151976-1-freude@linux.ibm.com?part=2
next prev parent reply other threads:[~2026-07-27 8:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 8:31 [PATCH v6 0/2] Improve code in zcrypt msg type 6 handling Harald Freudenberger
2026-07-27 8:31 ` [PATCH v6 1/2] s390/zcrypt: Improve CCA CPRB length and overflow checks Harald Freudenberger
2026-07-27 8:47 ` sashiko-bot
2026-07-27 12:11 ` Holger Dengler
2026-07-27 8:32 ` [PATCH v6 2/2] s390/zcrypt: Improve EP11 " Harald Freudenberger
2026-07-27 8:45 ` sashiko-bot [this message]
2026-07-27 12:14 ` Holger Dengler
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=20260727084532.6AF0A1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=freude@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.