From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ruoyu Wang <ruoyuw560@gmail.com>
Cc: Alexander Graf <graf@amazon.com>,
The AWS Nitro Enclaves Team <aws-nitro-enclaves-devel@amazon.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] misc: nsm: fix CBOR short-length decoding
Date: Sat, 15 Aug 2026 13:50:20 +0900 [thread overview]
Message-ID: <2026081500-reliable-unfrosted-fccf@gregkh> (raw)
In-Reply-To: <20260814134013.1386522-1-ruoyuw560@gmail.com>
On Fri, Aug 14, 2026 at 09:40:13PM +0800, Ruoyu Wang wrote:
> CBOR encodes byte-string lengths from 0 through 23 directly in the
> additional-information field. cbor_object_get_array() only handles 23,
> so shorter byte strings leave array_len uninitialized. Reserved values
> 28 through 30 and the unsupported indefinite-length encoding also fall
> through without assigning it.
>
> parse_resp_get_random() then uses the indeterminate value for bounds
> checking and as the byte count returned to the hwrng core. This can
> reject a valid short response or report an incorrect amount of entropy.
>
> Decode the complete inline-length range and reject unsupported values.
> Extended definite-length encodings retain their existing behavior, and
> the existing size and INT_MAX checks continue to bound the returned
> slice.
>
> This issue was found by a static analysis checker and confirmed by
> manual source review.
So shouldn't an Assisted-by: tag be correct to use here?
Same for your other patches.
thanks,
greg k-h
prev parent reply other threads:[~2026-08-15 4:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 13:40 Ruoyu Wang
2026-08-15 4:50 ` Greg Kroah-Hartman [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=2026081500-reliable-unfrosted-fccf@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=aws-nitro-enclaves-devel@amazon.com \
--cc=graf@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ruoyuw560@gmail.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
all inboxes | Powered by JetHome®