From: "Stephan Müller" <smueller@chronox.de>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org
Subject: [PATCH 0/2] crypto: AF_ALG memory management fix
Date: Sun, 25 Dec 2016 18:13:49 +0100 [thread overview]
Message-ID: <1486189.x0AQ4O6r2j@positron.chronox.de> (raw)
Hi Herbert,
please find attached memory management updates to
- simplify the code: the old AIO memory management is very
complex and seemingly very fragile -- the update now
eliminates all reported bugs in the skcipher and AEAD
interfaces which allowed the kernel to be crashed by
an unprivileged user
- streamline the code: there is one code path for AIO and sync
operation; the code between algif_skcipher and algif_aead
is very similar (if that patch set is accepted, I volunteer
to reduce code duplication by moving service operations
into af_alg.c and to further unify the TX SGL handling)
- unify the AIO and sync operation which only differ in the
kernel crypto API callback and whether to wait for the
crypto operation or not
- fix all reported bugs regarding the handling of multiple
IOCBs.
The following testing was performed:
- stress testing to verify that no memleaks exist
- testing using Tadeusz Struck AIO test tool (see
https://github.com/tstruk/afalg_async_test) -- the AEAD test
is not applicable any more due to the changed user space
interface; the skcipher test works once the user space
interface change is honored in the test code
- using the libkcapi test suite, all tests including the
originally failing ones (AIO with multiple IOCBs) work now --
the current libkcapi code artificially limits the AEAD
operation to one IOCB. After altering the libkcapi code
to allow multiple IOCBs, the testing works flawless.
Stephan Mueller (2):
crypto: aead AF_ALG - overhaul memory management
crypto: skcipher AF_ALG - overhaul memory management
crypto/algif_aead.c | 439 ++++++++++++++++++++
+---------------------------
crypto/algif_skcipher.c | 438 +++++++++++++++++++----------------------------
2 files changed, 369 insertions(+), 508 deletions(-)
--
2.9.3
next reply other threads:[~2016-12-25 17:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-25 17:13 Stephan Müller [this message]
2016-12-25 17:15 ` [PATCH 1/2] crypto: aead AF_ALG - overhaul memory management Stephan Müller
2017-01-12 15:51 ` Herbert Xu
2017-01-12 15:56 ` Stephan Müller
2017-01-12 16:05 ` Stephan Müller
2017-01-12 16:07 ` Herbert Xu
2017-01-12 16:10 ` Stephan Müller
2017-01-12 16:17 ` Herbert Xu
2017-01-12 16:19 ` Stephan Müller
2017-01-13 10:21 ` Herbert Xu
2017-01-13 10:49 ` Stephan Müller
2017-01-13 11:03 ` Herbert Xu
2017-01-13 11:10 ` Stephan Müller
2017-01-13 11:12 ` Herbert Xu
2017-01-13 11:16 ` Stephan Müller
2017-01-13 11:25 ` Herbert Xu
2017-01-13 11:51 ` Stephan Müller
2017-01-16 13:41 ` Stephan Müller
2016-12-25 17:15 ` [PATCH 2/2] crypto: skcipher " 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=1486189.x0AQ4O6r2j@positron.chronox.de \
--to=smueller@chronox.de \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@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;
as well as URLs for NNTP newsgroup(s).