Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Yuqi Xu <xuyuqiabc@gmail.com>
To: Ignat Korchagin <ignat@linux.win>
Cc: linux-crypto@vger.kernel.org, keyrings@vger.kernel.org,
	David Howells <dhowells@redhat.com>,
	Lukas Wunner <lukas@wunner.de>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Rusty Russell <rusty@rustcorp.com.au>,
	stable@vger.kernel.org, Vega <vega@nebusec.ai>,
	Ren Wei <weir@nebusec.ai>,
	xuyq21@lenovo.com
Subject: Re: [PATCH v4] KEYS: Account for asymmetric key payload data in the quota
Date: Sat, 21 Nov 2026 18:18:41 +0800	[thread overview]
Message-ID: <20261121181841.58673-reply-xuyuqiabc@gmail.com> (raw)
In-Reply-To: <CAOs+rJWf5JEMD7UC-4YS2ayAX5f2SUgr5s9DCwmWXExBhqaEJA@mail.gmail.com>

Hi Ignat,

Thanks for the review.

> SInce we touch PKCS8 as well, missing a relevant "Fixes:"

You are right. v5 adds:

Fixes: 3c58b2362ba8 ("KEYS: Implement PKCS#8 RSA Private Key parser [ver #2]")

> While today indeed only the asymmetric keys hit this I wonder if the
> fix is better to be in key_payload_reserve(). Something like a fail if
> key->quotelen + delta > USHRT_MAX. That fixes all current and future
> key types.

Agreed. v5 adds that guard to key_payload_reserve(), so every key type is
covered. The asymmetric parsers still charge the actual retained payload
and keep their early rejection before the payload is installed.

The common check also covers keyring link accounting and big_key
updates, which use the same field: a charge that would exceed USHRT_MAX
bytes now fails instead of wrapping the counter.

v5 is now sent as a separate patch.

Thanks,
Yuqi


      reply	other threads:[~2026-11-21 10:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26  2:49 [PATCH v4] KEYS: Account for asymmetric key payload data in the quota Yuqi Xu
2026-11-06 18:23 ` Ignat Korchagin
2026-11-21 10:18   ` Yuqi Xu [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=20261121181841.58673-reply-xuyuqiabc@gmail.com \
    --to=xuyuqiabc@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=ignat@linux.win \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=rusty@rustcorp.com.au \
    --cc=stable@vger.kernel.org \
    --cc=vega@nebusec.ai \
    --cc=weir@nebusec.ai \
    --cc=xuyq21@lenovo.com \
    /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