From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [PATCH] crypto: arm64/sm4 - Fix possible crash in GCM cryption
Date: Tue, 31 Jan 2023 17:39:50 +0800 [thread overview]
Message-ID: <c0986327-71b5-0d8e-a126-5f9f632cc6af@linux.alibaba.com> (raw)
In-Reply-To: <Y9eHXVyiSk0b+ovp@gondor.apana.org.au>
Hi Herbert,
On 1/30/23 5:01 PM, Herbert Xu wrote:
> On Mon, Jan 30, 2023 at 04:15:33PM +0800, Herbert Xu wrote:
>>
>> Actually I think there is a serious bug here. If you're doing an
>> empty message, you must not call skcipher_walk_done as that may
>> then free random uninitialised stack memory.
>
> Hah, I had forgotten that this thread started with your patch
> to fix this exact bug :)
>
> Could you confirm that you did copy this from ccm?
>
> It would be nice if you could rewrite your loop in a form similar
> to my patch to ccm.
>
> Thanks,
These codes are copied from gcm and ccm at the same time. I am not sure
which has more components, but I will rewrite the gcm and ccm encryption
loop of sm4 as soon as possible.
Cheers,
Tianjia
next prev parent reply other threads:[~2023-01-31 9:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 14:19 [PATCH] crypto: arm64/sm4 - Fix possible crash in GCM cryption Tianjia Zhang
2023-01-18 14:54 ` Herbert Xu
2023-01-30 7:34 ` Tianjia Zhang
2023-01-30 8:15 ` Herbert Xu
2023-01-30 9:01 ` Herbert Xu
2023-01-31 9:39 ` Tianjia Zhang [this message]
2023-01-30 7:35 ` [PATCH v2] " Tianjia Zhang
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=c0986327-71b5-0d8e-a126-5f9f632cc6af@linux.alibaba.com \
--to=tianjia.zhang@linux.alibaba.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will@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