From: "Stephan Müller" <smueller@chronox.de>
To: herbert@gondor.apana.org.au
Cc: stable@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: authenc - cryptlen must be at least AAD len
Date: Wed, 06 Sep 2017 22:10:08 +0200 [thread overview]
Message-ID: <2430903.zcKRVmhyml@positron.chronox.de> (raw)
In-Reply-To: <4634467.01PS30tDXi@positron.chronox.de>
Am Mittwoch, 6. September 2017, 21:22:44 CEST schrieb Stephan Müller:
Hi Herbert,
> With AF_ALG, AAD len and cryptlen can be set freely by unprivileged
> user space. The cipher implementation must therefore validate the input
> data for sanity. For AEAD ciphers, this implies that cryptlen must be
> at least as large as AAD size.
>
> This fixes a kernel crash that can be triggered via AF_ALG detected by
> the fuzzing test implemented with libkcapi.
What is your opinion: should this check be rather added to crypto_aead_encrypt
(similar to a sanity check found in crypto_aead_decrypt)?
Ciao
Stephan
next prev parent reply other threads:[~2017-09-06 20:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 19:22 [PATCH] crypto: authenc - cryptlen must be at least AAD len Stephan Müller
2017-09-06 20:10 ` Stephan Müller [this message]
2017-09-07 3:54 ` Herbert Xu
2017-09-07 5:48 ` Stephan Müller
2017-09-07 6:01 ` Herbert Xu
2017-09-07 6:04 ` Stephan Mueller
2017-09-07 6:09 ` Herbert Xu
2017-09-08 22:20 ` [PATCH v2] crypto: add NULL check to scatterwalk_start Stephan Müller
2017-09-08 23:01 ` Stephan Müller
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=2430903.zcKRVmhyml@positron.chronox.de \
--to=smueller@chronox.de \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=stable@vger.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