Stephan Mueller
5102981212
crypto: drbg - prevent invalid SG mappings
...
When using SGs, only heap memory (memory that is valid as per
virt_addr_valid) is allowed to be referenced. The CTR DRBG used to
reference the caller-provided memory directly in an SG. In case the
caller provided stack memory pointers, the SG mapping is not considered
to be valid. In some cases, this would even cause a paging fault.
The change adds a new scratch buffer that is used unconditionally to
catch the cases where the caller-provided buffer is not suitable for
use in an SG. The crypto operation of the CTR DRBG produces its output
with that scratch buffer and finally copies the content of the
scratch buffer to the caller's buffer.
The scratch buffer is allocated during allocation time of the CTR DRBG
as its access is protected with the DRBG mutex.
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2016-11-30 19:46:44 +08:00
..
internal
crypto: skcipher - Remove top-level givcipher interface
2016-07-18 17:35:46 +08:00
ablk_helper.h
aead.h
crypto: aead - Add chunk size
2016-07-18 17:35:38 +08:00
aes.h
akcipher.h
crypto: doc - add akcipher API
2016-02-17 04:07:53 +08:00
algapi.h
crypto: engine - move crypto engine to its own header
2016-09-07 21:08:26 +08:00
authenc.h
b128ops.h
blowfish.h
cast5.h
cast6.h
cast_common.h
chacha20.h
random: replace non-blocking pool with a Chacha20-based CRNG
2016-07-03 00:57:23 -04:00
cryptd.h
crypto: cryptd - Add helpers to check whether a tfm is queued
2016-06-23 18:29:52 +08:00
crypto_wq.h
ctr.h
des.h
dh.h
crypto: dh - Add DH software implementation
2016-06-23 18:29:56 +08:00
drbg.h
crypto: drbg - prevent invalid SG mappings
2016-11-30 19:46:44 +08:00
ecdh.h
crypto: ecdh - Add ECDH software support
2016-06-23 18:29:57 +08:00
engine.h
crypto: engine - permit to enqueue ashash_request
2016-09-07 21:08:27 +08:00
gf128mul.h
ghash.h
crypto: ghash-generic - move common definitions to a new header file
2016-10-02 22:26:40 +08:00
hash.h
crypto: doc - document correct return value for request allocation
2016-04-15 22:35:44 +08:00
hash_info.h
keys, trusted: select hash algorithm for TPM2 chips
2015-12-20 15:27:12 +02:00
if_alg.h
crypto: af_alg - Allow af_af_alg_release_parent to be called on nokey path
2016-01-18 18:16:32 +08:00
kpp.h
crypto: ecdh - Add ECDH software support
2016-06-23 18:29:57 +08:00
lrw.h
mcryptd.h
crypto: sha1-mb - async implementation for sha1-mb
2016-06-23 18:29:55 +08:00
md5.h
crypto: hash - add zero length message hash for shax and md5
2015-12-22 20:43:35 +08:00
null.h
crypto: null - Remove default null blkcipher
2016-07-18 17:35:44 +08:00
padlock.h
pcrypt.h
pkcs7.h
PKCS#7: Make trust determination dependent on contents of trust keyring
2016-04-06 16:14:24 +01:00
poly1305.h
crypto: poly1305 - Export common Poly1305 helpers
2015-07-17 21:20:26 +08:00
public_key.h
KEYS: Move the point of trust determination to __key_link()
2016-04-11 22:43:43 +01:00
rng.h
crypto: doc - Fix typo in crypto-API.xml
2015-06-04 15:05:08 +08:00
scatterwalk.h
crypto: scatterwalk - Inline start/map/done
2016-07-18 17:35:50 +08:00
serpent.h
sha.h
crypto: hash - add zero length message hash for shax and md5
2015-12-22 20:43:35 +08:00
sha1_base.h
crypto: sha1 - implement base layer for SHA-1
2015-04-10 21:39:39 +08:00
sha3.h
crypto: sha3 - Add SHA-3 hash algorithm
2016-06-20 19:25:01 +08:00
sha256_base.h
crypto: sha256 - implement base layer for SHA-256
2015-04-10 21:39:39 +08:00
sha512_base.h
crypto: sha512 - implement base layer for SHA-512
2015-04-10 21:39:39 +08:00
skcipher.h
crypto: skcipher - Add comment for skcipher_alg->base
2016-07-19 15:42:42 +08:00
twofish.h
vmac.h
xts.h
crypto: xts - consolidate sanity check for keys
2016-02-17 04:07:51 +08:00