Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Finn Callies <fcallies@linux.ibm.com>
To: Harald Freudenberger <freude@linux.ibm.com>,
	dengler@linux.ibm.com, ifranzki@linux.ibm.com
Cc: linux-s390@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: [PATCH v1 1/1] s390/crypto: Fix out-of-bounds access in zcrypt message type handlers
Date: Thu, 27 Aug 2026 07:06:11 +0200	[thread overview]
Message-ID: <94c20832-0eeb-43a6-b5c6-4f47c4ea32b3@linux.ibm.com> (raw)
In-Reply-To: <20260826141252.113706-2-freude@linux.ibm.com>



On 26.08.26 16:12, Harald Freudenberger wrote:
> Add length validation before accessing reply message structures in
> zcrypt_msgtype6_receive(), zcrypt_msgtype6_receive_ep11(), and
> zcrypt_msgtype50_receive() to prevent out-of-bounds reads and
> potential kernel memory disclosure.
> 
> The handlers now verify that reply->len is sufficient before accessing
> structure fields like cprb_ver_id. When validation fails, only the
> message type field is overwritten with an error code, preventing
> attackers from mixing user-controlled request data with short hardware
> responses to bypass validation and leak kernel memory.
> 
> Fixes: 3b6245fd303f ("s390/zcrypt: Separate msgtype implementation from card modules.")
> Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
> Cc: stable@vger.kernel.org
> ---
>   drivers/s390/crypto/zcrypt_msgtype50.c | 3 ++-
>   drivers/s390/crypto/zcrypt_msgtype6.c  | 6 ++++--
>   2 files changed, 6 insertions(+), 3 deletions(-)

[ snip ]

Reviewed-by: Finn Callies <fcallies@linux.ibm.com>


      reply	other threads:[~2026-08-27  5:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 14:12 [PATCH v1 0/1] Fix zcrypt handler functions Harald Freudenberger
2026-08-26 14:12 ` [PATCH v1 1/1] s390/crypto: Fix out-of-bounds access in zcrypt message type handlers Harald Freudenberger
2026-08-27  5:06   ` Finn Callies [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=94c20832-0eeb-43a6-b5c6-4f47c4ea32b3@linux.ibm.com \
    --to=fcallies@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=dengler@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=ifranzki@linux.ibm.com \
    --cc=linux-s390@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