Linux cryptographic layer development
 help / color / mirror / Atom feed
From: "Guozihua (Scott)" <guozihua@huawei.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: <linux-crypto@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<herbert@gondor.apana.org.au>, <davem@davemloft.net>,
	<catalin.marinas@arm.com>, <will@kernel.org>
Subject: Re: [PATCH] arm64/crypto: poly1305 fix a read out-of-bound
Date: Tue, 12 Jul 2022 15:46:58 +0800	[thread overview]
Message-ID: <b8546932-109f-a2d8-66cf-37512afd3927@huawei.com> (raw)
In-Reply-To: <Ys0ip6SdCfWmbA1V@sol.localdomain>

On 2022/7/12 15:28, Eric Biggers wrote:
> On Tue, Jul 12, 2022 at 12:08:36AM -0700, Eric Biggers wrote:
>>
>> Is the special reproducer really needed?  I'd expect this to be reproduced by
>> the existing crypto self-tests just by booting a kernel built with both
>> CONFIG_KASAN=y and CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y.
>>
> 
> Ah, probably the self-tests don't find this because with poly1305 the key is
> actually read from the "data", and for the self-tests the data addresses happens
> to always be in the kernel direct map, so KASAN doesn't work for it (I think).
> Ideally the self-tests would test with kmalloc'ed data buffers too, or a buffer
> in vmalloc'ed memory that's directly followed by a guard page.
> 
> - Eric
> .

Hi Eric,

I just tried and it seems that the extra self-test won't find this bug 
so I will just keep the reproducer in place.

-- 
Best
GUO Zihua

      reply	other threads:[~2022-07-12  7:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12  3:32 [PATCH] arm64/crypto: poly1305 fix a read out-of-bound GUO Zihua
2022-07-12  7:08 ` Eric Biggers
2022-07-12  7:26   ` Guozihua (Scott)
2022-07-12  7:28   ` Eric Biggers
2022-07-12  7:46     ` Guozihua (Scott) [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=b8546932-109f-a2d8-66cf-37512afd3927@huawei.com \
    --to=guozihua@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@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