search for: skcipher

Displaying 20 results from an estimated 35 matches for "skcipher".

2018 Jan 18
0
[BUG] skcipher: Test 1 failed (invalid result) on encryption for cts(virtio_crypto_aes_cbc)
Hello When modprobing tcrypt on a qemu virtual machine, I get the following trace in dmesg: skcipher: Test 1 failed (invalid result) on encryption for cts(virtio_crypto_aes_cbc) Regards Corentin Labbe
2020 May 26
1
[PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()
..."Fixes:" tag fixing commit: dbaf0624ffa5 ("crypto: add virtio-crypto driver"). The bot has tested the following trees: v5.6.14, v5.4.42, v4.19.124, v4.14.181. v5.6.14: Build OK! v5.4.42: Failed to apply! Possible dependencies: eee1d6fca0a0 ("crypto: virtio - switch to skcipher API") v4.19.124: Failed to apply! Possible dependencies: eee1d6fca0a0 ("crypto: virtio - switch to skcipher API") v4.14.181: Failed to apply! Possible dependencies: 500e6807ce93 ("crypto: virtio - implement missing support for output IVs") 67189375bb3a ("...
2019 Oct 14
0
[PATCH 03/25] crypto: virtio - switch to skcipher API
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support...
2019 Oct 24
0
[PATCH v2 03/27] crypto: virtio - switch to skcipher API
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing us to keep the ablkcipher support...
2020 Jun 16
0
[PATCH 5.7 094/163] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()
...smod crypto/tcrypto.ko with mode=155 ( testing "authenc(hmac(sha1),cbc(aes))" ). It's caused by reuse the memory of request structure. In crypto_authenc_init_tfm(), the reqsize is set to: [PART 1] sizeof(authenc_request_ctx) + [PART 2] ictx->reqoff + [PART 3] MAX(ahash part, skcipher part) and the 'PART 3' is used by both ahash and skcipher in turn. When the virtio_crypto driver finish skcipher req, it'll call ->complete callback(in crypto_finalize_skcipher_request) and then free its resources whose pointers are recorded in 'skcipher parts'. However, th...
2020 Jun 16
0
[PATCH 5.6 099/161] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()
...smod crypto/tcrypto.ko with mode=155 ( testing "authenc(hmac(sha1),cbc(aes))" ). It's caused by reuse the memory of request structure. In crypto_authenc_init_tfm(), the reqsize is set to: [PART 1] sizeof(authenc_request_ctx) + [PART 2] ictx->reqoff + [PART 3] MAX(ahash part, skcipher part) and the 'PART 3' is used by both ahash and skcipher in turn. When the virtio_crypto driver finish skcipher req, it'll call ->complete callback(in crypto_finalize_skcipher_request) and then free its resources whose pointers are recorded in 'skcipher parts'. However, th...
2020 Jun 19
0
[PATCH 4.14 049/190] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()
...smod crypto/tcrypto.ko with mode=155 ( testing "authenc(hmac(sha1),cbc(aes))" ). It's caused by reuse the memory of request structure. In crypto_authenc_init_tfm(), the reqsize is set to: [PART 1] sizeof(authenc_request_ctx) + [PART 2] ictx->reqoff + [PART 3] MAX(ahash part, skcipher part) and the 'PART 3' is used by both ahash and skcipher in turn. When the virtio_crypto driver finish skcipher req, it'll call ->complete callback(in crypto_finalize_skcipher_request) and then free its resources whose pointers are recorded in 'skcipher parts'. However, th...
2020 Jun 19
0
[PATCH 4.19 064/267] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()
...smod crypto/tcrypto.ko with mode=155 ( testing "authenc(hmac(sha1),cbc(aes))" ). It's caused by reuse the memory of request structure. In crypto_authenc_init_tfm(), the reqsize is set to: [PART 1] sizeof(authenc_request_ctx) + [PART 2] ictx->reqoff + [PART 3] MAX(ahash part, skcipher part) and the 'PART 3' is used by both ahash and skcipher in turn. When the virtio_crypto driver finish skcipher req, it'll call ->complete callback(in crypto_finalize_skcipher_request) and then free its resources whose pointers are recorded in 'skcipher parts'. However, th...
2020 Jun 16
0
[PATCH 5.4 086/134] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()
...smod crypto/tcrypto.ko with mode=155 ( testing "authenc(hmac(sha1),cbc(aes))" ). It's caused by reuse the memory of request structure. In crypto_authenc_init_tfm(), the reqsize is set to: [PART 1] sizeof(authenc_request_ctx) + [PART 2] ictx->reqoff + [PART 3] MAX(ahash part, skcipher part) and the 'PART 3' is used by both ahash and skcipher in turn. When the virtio_crypto driver finish skcipher req, it'll call ->complete callback(in crypto_finalize_skcipher_request) and then free its resources whose pointers are recorded in 'skcipher parts'. However, th...
2020 May 26
0
[PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()
...id S. Miller <davem at davemloft.net>; > Markus Elfring <Markus.Elfring at web.de>; > virtualization at lists.linux-foundation.org; linux-kernel at vger.kernel.org; > stable at vger.kernel.org > Subject: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in > virtio_crypto_skcipher_finalize_req() > > The system'll crash when the users insmod crypto/tcrypto.ko with mode=155 > ( testing "authenc(hmac(sha1),cbc(aes))" ). It's caused by reuse the memory of > request structure. > > In crypto_authenc_init_tfm(), the reqsize is set to: > [P...
2020 Jun 15
0
Patch "crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()" has been added to the 5.7-stable tree
This is a note to let you know that I've just added the patch titled crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req() to the 5.7-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: crypto-virtio-fix-use-after-free-in-virtio_crypto_skcipher_finalize_req.patch and it can be found in the queue-5.7 su...
2020 Jun 15
0
Patch "crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()" has been added to the 5.6-stable tree
This is a note to let you know that I've just added the patch titled crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req() to the 5.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: crypto-virtio-fix-use-after-free-in-virtio_crypto_skcipher_finalize_req.patch and it can be found in the queue-5.6 su...
2020 May 26
0
[PATCH v2 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()
..."Fixes:" tag fixing commit: dbaf0624ffa5 ("crypto: add virtio-crypto driver"). The bot has tested the following trees: v5.6.14, v5.4.42, v4.19.124, v4.14.181. v5.6.14: Build OK! v5.4.42: Failed to apply! Possible dependencies: eee1d6fca0a0 ("crypto: virtio - switch to skcipher API") v4.19.124: Failed to apply! Possible dependencies: eee1d6fca0a0 ("crypto: virtio - switch to skcipher API") v4.14.181: Failed to apply! Possible dependencies: 500e6807ce93 ("crypto: virtio - implement missing support for output IVs") 67189375bb3a ("...
2020 Jun 05
0
[PATCH v3 1/3] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()
..."Fixes:" tag fixing commit: dbaf0624ffa5 ("crypto: add virtio-crypto driver"). The bot has tested the following trees: v5.6.15, v5.4.43, v4.19.125, v4.14.182. v5.6.15: Build OK! v5.4.43: Failed to apply! Possible dependencies: eee1d6fca0a0 ("crypto: virtio - switch to skcipher API") v4.19.125: Failed to apply! Possible dependencies: eee1d6fca0a0 ("crypto: virtio - switch to skcipher API") v4.14.182: Failed to apply! Possible dependencies: 500e6807ce93 ("crypto: virtio - implement missing support for output IVs") 67189375bb3a ("...
2020 Jun 05
0
[PATCH v3 2/3] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()
..."Fixes:" tag fixing commit: dbaf0624ffa5 ("crypto: add virtio-crypto driver"). The bot has tested the following trees: v5.6.15, v5.4.43, v4.19.125, v4.14.182. v5.6.15: Build OK! v5.4.43: Failed to apply! Possible dependencies: eee1d6fca0a0 ("crypto: virtio - switch to skcipher API") v4.19.125: Failed to apply! Possible dependencies: eee1d6fca0a0 ("crypto: virtio - switch to skcipher API") v4.14.182: Failed to apply! Possible dependencies: 500e6807ce93 ("crypto: virtio - implement missing support for output IVs") 67189375bb3a ("...
2018 Jan 26
10
[PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests
Hello The current crypto_engine support only ahash and ablkcipher request. My first patch which try to add skcipher was Nacked, it will add too many functions and adding other algs(aead, asymetric_key) will make the situation worst. This patchset remove all algs specific stuff and now only process generic crypto_async_request. The requests handler function pointer are now moved out of struct engine and are now...
2018 Jan 26
10
[PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests
Hello The current crypto_engine support only ahash and ablkcipher request. My first patch which try to add skcipher was Nacked, it will add too many functions and adding other algs(aead, asymetric_key) will make the situation worst. This patchset remove all algs specific stuff and now only process generic crypto_async_request. The requests handler function pointer are now moved out of struct engine and are now...
2018 Jan 26
0
[PATCH v2 2/6] crypto: engine - Permit to enqueue all async requests
...- transfer the new request into the - * enginequeue + * crypto_transfer_ablkcipher_request_to_engine - transfer one ablkcipher_request + * to list into the engine queue * @engine: the hardware engine * @req: the request need to be listed into the engine queue + * TODO: Remove this function when skcipher conversion is finished */ -int crypto_transfer_hash_request(struct crypto_engine *engine, - struct ahash_request *req, bool need_pump) +int crypto_transfer_ablkcipher_request_to_engine(struct crypto_engine *engine, + struct ablkcipher_request *req) { - unsigned long flags; - int ret; -...
2018 Jan 10
1
[PATCH 2/6] crypto: engine - Permit to enqueue all async requests
...rue); > +} > + > +/** > + * crypto_transfer_cipher_request_to_engine - transfer one ablkcipher_request > + * to list into the engine queue > + * @engine: the hardware engine > + * @req: the request need to be listed into the engine queue > + * TODO: Remove this function when skcipher conversion is finished > + */ > int crypto_transfer_cipher_request_to_engine(struct crypto_engine *engine, > struct ablkcipher_request *req) > { > - return crypto_transfer_cipher_request(engine, req, true); > + return crypto_transfer_request_to_engine(engine, &...
2020 Jun 16
3
[PATCH v5 0/2] mm, treewide: Rename kzfree() to kfree_sensitive()
...| 4 +-- crypto/jitterentropy-kcapi.c | 2 +- crypto/rng.c | 2 +- crypto/rsa-pkcs1pad.c | 6 ++-- crypto/seqiv.c | 2 +- crypto/shash.c | 2 +- crypto/skcipher.c | 2 +- crypto/testmgr.c | 6 ++-- crypto/zstd.c | 2 +- .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +- .../allwinner/sun8i-ss/sun8i-ss-cipher.c | 2 +- drivers/crypto/amlogic/amlogic-gxl-cip...