Linux Security Modules development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH] KEYS: asymmetric: fix out_len bounds check and in2_len union clobber in keyctl_pkey
Date: Sat, 19 Sep 2026 22:27:43 +0000	[thread overview]
Message-ID: <20260919222744.483391F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260919221742.3709658-1-benquike@gmail.com>

> Fix two bugs in asymmetric keyctl parameter validation:
> 
> 1. In keyctl_pkey_params_get_2() (security/keys/keyctl_pkey.c),
>    params->in2_len and params->out_len share an anonymous union.
>    Assigning params->in2_len for KEYCTL_PKEY_VERIFY after setting
>    params->out_len clobbers out_len, and info.max_data_size is checked
>    against in_len instead of out_len for encrypt/decrypt/sign
>    operations.
> 2. In software_key_determine_akcipher()
>    (crypto/asymmetric_keys/public_key.c), ensure buffer length checks
>    properly validate both input and output sizes against the key's
>    maximum size.
> 
> Fixes: 00d60fd3b932 ("KEYS: Provide keyctls to drive the new key type ops for asymmetric keys [ver #2]")
> Assisted-by: LLM
> Signed-off-by: Hui Peng <benquike@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260919221742.3709658-1-benquike@gmail.com?part=1


      reply	other threads:[~2026-09-19 22:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-19 22:17 [PATCH] KEYS: asymmetric: fix out_len bounds check and in2_len union clobber in keyctl_pkey Hui Peng
2026-09-19 22:27 ` 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=20260919222744.483391F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-security-module@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