Skip to contentSkip to conversation

crypto: virtio: Fix two crash issue

PATCH Superseded Longpeng(Mike) 6 participants 19 messages May 26, 2020 – Jun 2, 2020

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover crypto: virtio: Fix two crash issue

Changes since v1:
- remove some redundant checks [Jason]
- normalize the commit message [Markus]

Cc Gonglei <[email protected]>
Cc Herbert Xu <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Markus Elfring <[email protected]>

Longpeng(Mike) (2):
crypto: virtio: Fix src/dst scatterlist calculation in
__virtio_crypto_skcipher_do_req()
crypto: virtio: Fix use-after-free in
virtio_crypto_skcipher_finalize_req()

 drivers/crypto/virtio/virtio_crypto_algs.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
Signature · 1 line
2.23.0
#1 lore raw

PATCH v2 1/2 crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

The system will crash when the users insmod crypto/tcrypt.ko with mode=38 ( testing "cts(cbc(aes))" ).

Usually the next entry of one sg will be @sg@ + 1, but if this sg element is part of a chained scatterlist, it could jump to the start of a new scatterlist array. Fix it by sg_next() on calculation of src/dst scatterlist.

Fixes dbaf0624ffa5 ("crypto: add virtio-crypto driver")
Cc Herbert Xu <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Markus Elfring <[email protected]>

Message-Id: <20200123101000.GB24255@Red>

---
 drivers/crypto/virtio/virtio_crypto_algs.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/crypto/virtio/virtio_crypto_algs.c +10 -5
index fd045e64972a..5f8243563009 100644
@@ -350,13 +350,18 @@ __virtio_crypto_skcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req,
 	int err;
 	unsigned long flags;
 	struct scatterlist outhdr, iv_sg, status_sg, **sgs;
-	int i;
 	u64 dst_len;
 	unsigned int num_out = 0, num_in = 0;
 	int sg_total;
 	uint8_t *iv;
+	struct scatterlist *sg;
 
 	src_nents = sg_nents_for_len(req->src, req->cryptlen);
+	if (src_nents < 0) {
+		pr_err("Invalid number of src SG.\n");
+		return src_nents;
+	}
+
 	dst_nents = sg_nents(req->dst);
 
 	pr_debug("virtio_crypto: Number of sgs (src_nents: %d, dst_nents: %d)\n",
@@ -442,12 +447,12 @@ __virtio_crypto_skcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req,
 	vc_sym_req->iv = iv;
 
 	/* Source data */
-	for (i = 0; i < src_nents; i++)
-		sgs[num_out++] = &req->src[i];
+	for (sg = req->src; src_nents; sg = sg_next(sg), src_nents--)
+		sgs[num_out++] = sg;
 
 	/* Destination data */
-	for (i = 0; i < dst_nents; i++)
-		sgs[num_out + num_in++] = &req->dst[i];
+	for (sg = req->dst; sg; sg = sg_next(sg))
+		sgs[num_out + num_in++] = sg;
 
 	/* Status */
 	sg_init_one(&status_sg, &vc_req->status, sizeof(vc_req->status));
Signature · 1 line
2.23.0
#2 lore raw

Re: [PATCH v2 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

Quoted 1 line

Fix it by sg_next() on calculation of src/dst scatterlist.

Wording adjustment:
… by calling the function “sg_next” …

…

Quoted 2 lines

+++ b/drivers/crypto/virtio/virtio_crypto_algs.c

(quoted diff) +0 -0
@@ -350,13 +350,18 @@ __virtio_crypto_skcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req,

…

drivers/crypto/virtio/virtio_crypto_algs.c __virtio_crypto_skcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, · line 365

Quoted 7 lines
drivers/crypto/virtio/virtio_crypto_algs.c +5 -0
 	src_nents = sg_nents_for_len(req->src, req->cryptlen);
+	if (src_nents < 0) {
+		pr_err("Invalid number of src SG.\n");
+		return src_nents;
+	}
+
 	dst_nents = sg_nents(req->dst);

…

I suggest to move the addition of such input parameter validation to a separate update step.

Regards,
Markus

#3 lore raw

Re: [PATCH v2 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

Hi Markus,

Quoted 5 lines · Markus Elfring
Quoted 1 line

Fix it by sg_next() on calculation of src/dst scatterlist.

Wording adjustment:
… by calling the function “sg_next” …

OK, thanks.

Quoted 14 lines

…

Quoted 2 lines

+++ b/drivers/crypto/virtio/virtio_crypto_algs.c

(quoted diff) +0 -0
@@ -350,13 +350,18 @@ __virtio_crypto_skcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req,

…

Quoted 7 lines
drivers/crypto/virtio/virtio_crypto_algs.c +5 -0
 	src_nents = sg_nents_for_len(req->src, req->cryptlen);
+	if (src_nents < 0) {
+		pr_err("Invalid number of src SG.\n");
+		return src_nents;
+	}
+
 	dst_nents = sg_nents(req->dst);

…

Quoted 3 lines

I suggest to move the addition of such input parameter validation to a separate update step.

Um...The 'src_nents' will be used as a loop condition, so validate it here is needed ?

'''
/* Source data */
- for (i = 0; i < src_nents; i++)
- sgs[num_out++] = &req->src[i];
+ for (sg = req->src; src_nents; sg = sg_next(sg), src_nents--)
+ sgs[num_out++] = sg;
'''

Quoted 3 lines

Regards,
Markus

Signature · 3 lines
---
Regards,
Longpeng(Mike)
#4 lore raw

Re: [v2 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

Quoted 5 lines
Quoted 3 lines

I suggest to move the addition of such input parameter validation to a separate update step.

Um...The 'src_nents' will be used as a loop condition, so validate it here is needed ?

Would you prefer to add such checking as the first update in another small patch series?

Regards,
Markus

maintainer
#5 lore raw

Re: [PATCH v2 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

In reply to Longpeng(Mike)

<20200123101000.GB24255@Red>
References: <[email protected]> <20200123101000.GB24255@Red>

Hi

[This is an automated email]

This commit has been processed because it contains a "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 ("crypto: virtio - convert to new crypto engine API") d0d859bb87ac ("crypto: virtio - Register an algo only if it's supported") e02b8b43f55a ("crypto: virtio - pr_err() strings should end with newlines") eee1d6fca0a0 ("crypto: virtio - switch to skcipher API")

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Signature · 2 lines
Thanks
Sasha
maintainer
#6 lore raw

Re: [PATCH v2 1/2] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()

In reply to Longpeng(Mike)

<20200123101000.GB24255@Red>
References: <[email protected]> <20200123101000.GB24255@Red>

Hi

[This is an automated email]

This commit has been processed because it contains a "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 ("crypto: virtio - convert to new crypto engine API") d0d859bb87ac ("crypto: virtio - Register an algo only if it's supported") e02b8b43f55a ("crypto: virtio - pr_err() strings should end with newlines") eee1d6fca0a0 ("crypto: virtio - switch to skcipher API")

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Signature · 2 lines
Thanks
Sasha
#7 lore raw

PATCH v2 2/2 crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

In reply to Longpeng(Mike)

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:
[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, the ->complete is 'crypto_authenc_encrypt_done' in this case, it will use the 'ahash part' of the request and change its content, so virtio_crypto driver will get the wrong pointer after ->complete finish and mistakenly free some other's memory. So the system will crash when these memory will be used again.

The resources which need to be cleaned up are not used any more. But the pointers of these resources may be changed in the function "crypto_finalize_skcipher_request". Thus release specific resources before calling this function.

Fixes dbaf0624ffa5 ("crypto: add virtio-crypto driver")
Cc Gonglei <[email protected]>
Cc Herbert Xu <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Markus Elfring <[email protected]>

Message-Id: <20200123101000.GB24255@Red>

---
 drivers/crypto/virtio/virtio_crypto_algs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/crypto/virtio/virtio_crypto_algs.c +3 -2
index 5f8243563009..52261b6c247e 100644
@@ -582,10 +582,11 @@ static void virtio_crypto_skcipher_finalize_req(
 		scatterwalk_map_and_copy(req->iv, req->dst,
 					 req->cryptlen - AES_BLOCK_SIZE,
 					 AES_BLOCK_SIZE, 0);
-	crypto_finalize_skcipher_request(vc_sym_req->base.dataq->engine,
-					   req, err);
 	kzfree(vc_sym_req->iv);
 	virtcrypto_clear_request(&vc_sym_req->base);
+
+	crypto_finalize_skcipher_request(vc_sym_req->base.dataq->engine,
+					   req, err);
 }
 
 static struct virtio_crypto_algo virtio_crypto_algs[] = { {
Signature · 1 line
2.23.0
#8 lore raw

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

Quoted 3 lines

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.

Wording adjustments:
* … system will crash …
* … It is caused by reusing the …

Quoted 1 line

when these memory will be used again.

when this memory …

Quoted 1 line

… Thus release specific resources before

Is there a need to improve also this information another bit?

Regards,
Markus

#9 lore raw

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

Hi Markus,

Quoted 4 lines · Markus Elfring
Quoted 3 lines

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.

Quoted 9 lines

Wording adjustments:
* … system will crash …
* … It is caused by reusing the …

Quoted 1 line

when these memory will be used again.

when this memory …

OK.

Quoted 5 lines
Quoted 2 lines

… Thus release specific resources before

Is there a need to improve also this information another bit?

You mean the last two paragraph is redundant ?
'''
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, the ->complete is 'crypto_authenc_encrypt_done' in this case, it will use the 'ahash part' of the request and change its content, so virtio_crypto driver will get the wrong pointer after ->complete finish and mistakenly free some other's memory. So the system will crash when these memory will be used again.

The resources which need to be cleaned up are not used any more. But the pointers of these resources may be changed in the function "crypto_finalize_skcipher_request". Thus release specific resources before calling this function.
'''

How about:
'''
When the virtio_crypto driver finish the skcipher request, it will call the function "crypto_finalize_skcipher_request()" and then free the resources whose pointers are stored in the 'skcipher parts', but the pointers of these resources
may be changed in that function. Thus fix it by releasing these resources
befored calling the function "crypto_finalize_skcipher_request()". '''

Quoted 3 lines

Regards,
Markus

---
Regards,
Longpeng(Mike)

#10 lore raw

Re: [v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

… Thus release specific resources before

Is there a need to improve also this information another bit?

You mean the last two paragraph is redundant ?

No.

I became curious if you would like to choose a more helpful information according to the wording “specific resources”.

Regards,
Markus

#11 lore raw

Re: [v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

Quoted 6 lines · Markus Elfring
Quoted 5 lines
Quoted 4 lines
Quoted 1 line

… Thus release specific resources before

Is there a need to improve also this information another bit?

You mean the last two paragraph is redundant ?

Quoted 8 lines

No.

I became curious if you would like to choose a more helpful information according to the wording “specific resources”.

Regards,
Markus

Hi Markus,

I respect your work, but please let us to focus on the code itself. I think experts in this area know what these patches want to solve after look at the code.

I hope experts in the thread could review the code when you free, thanks :)

---
Regards,
Longpeng(Mike)

#12 lore raw

Re: [v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

Quoted 2 lines

I respect your work, but please let us to focus on the code itself. I think experts in this area know what these patches want to solve after look at the code.

I suggest to reconsider such a view.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=9cb1fd0efd195590b828b9b865421ad345a4a145#n102

Regards,
Markus

maintainer
#13 lore raw

Re: [v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

In reply to Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Quoted 17 lines · Cloud Infrastructure Service Product Dept.)
Quoted 6 lines · Markus Elfring
Quoted 5 lines
Quoted 4 lines
Quoted 1 line

… Thus release specific resources before

Is there a need to improve also this information another bit?

You mean the last two paragraph is redundant ?

Quoted 8 lines

No.

I became curious if you would like to choose a more helpful information according to the wording “specific resources”.

Regards,
Markus

Quoted 6 lines

Hi Markus,

I respect your work, but please let us to focus on the code itself. I think experts in this area know what these patches want to solve after look at the code.

I hope experts in the thread could review the code when you free, thanks :)

Please note that you are responding to someone who is known to be a pain in patch reviews and has been blocked by many kernel developers/maintainers because they just waste people's time.

I suggest you all do the same here, and just ignore them, like I do :)

thanks,

greg k-h

maintainer Acked-by on v2 2/2
#14 lore raw

RE: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

In reply to Longpeng(Mike)
Quoted 52 lines

-----Original Message-----
From: Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Sent: Tuesday, May 26, 2020 11:20 AM
To: [email protected]
Cc: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) <[email protected]>; LABBE Corentin <[email protected]>; Gonglei (Arei) <[email protected]>; Herbert Xu <[email protected]>; Michael S. Tsirkin <[email protected]>; Jason Wang <[email protected]>; David S. Miller <[email protected]>; Markus Elfring <[email protected]>; [email protected]; [email protected]; [email protected]
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:
[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, the ->complete is 'crypto_authenc_encrypt_done' in this case, it will use the 'ahash part' of the request and change its content, so virtio_crypto driver will get the wrong pointer after ->complete finish and mistakenly free some other's memory. So the system will crash when these memory will be used again.

The resources which need to be cleaned up are not used any more. But the pointers of these resources may be changed in the function "crypto_finalize_skcipher_request". Thus release specific resources before calling this function.

Fixes dbaf0624ffa5 ("crypto: add virtio-crypto driver")
Cc Gonglei <[email protected]>
Cc Herbert Xu <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
Cc Jason Wang <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Markus Elfring <[email protected]>
Quoted 3 lines

Message-Id: <20200123101000.GB24255@Red>

---

Regards,
-Gonglei

Quoted 24 lines
 drivers/crypto/virtio/virtio_crypto_algs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/crypto/virtio/virtio_crypto_algs.c +3 -3
index 5f8243563009..52261b6c247e 100644
@@ -582,10 +582,11 @@ static void virtio_crypto_skcipher_finalize_req(
 		scatterwalk_map_and_copy(req->iv, req->dst,
 					 req->cryptlen - AES_BLOCK_SIZE,
 					 AES_BLOCK_SIZE, 0);
-	crypto_finalize_skcipher_request(vc_sym_req->base.dataq->engine,
-					   req, err);
 	kzfree(vc_sym_req->iv);
 	virtcrypto_clear_request(&vc_sym_req->base);
+
+	crypto_finalize_skcipher_request(vc_sym_req->base.dataq->engine,
+					   req, err);
 }
 
 static struct virtio_crypto_algo virtio_crypto_algs[] = { {
--

2.23.0

maintainer
#15 lore raw

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

In reply to Longpeng(Mike)

<20200123101000.GB24255@Red>
References: <[email protected]> <20200123101000.GB24255@Red>

Hi

[This is an automated email]

This commit has been processed because it contains a "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 ("crypto: virtio - convert to new crypto engine API") d0d859bb87ac ("crypto: virtio - Register an algo only if it's supported") e02b8b43f55a ("crypto: virtio - pr_err() strings should end with newlines") eee1d6fca0a0 ("crypto: virtio - switch to skcipher API")

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Signature · 2 lines
Thanks
Sasha
#16 lore raw

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

Quoted 28 lines · Sasha Levin

<20200123101000.GB24255@Red>
References: <[email protected]> <20200123101000.GB24255@Red>

Hi

[This is an automated email]

This commit has been processed because it contains a "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 ("crypto: virtio - convert to new crypto engine API") d0d859bb87ac ("crypto: virtio - Register an algo only if it's supported") e02b8b43f55a ("crypto: virtio - pr_err() strings should end with newlines") eee1d6fca0a0 ("crypto: virtio - switch to skcipher API")

Quoted 3 lines

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Mike could you comment on backporting?

Quoted 3 lines
Signature · 2 lines
Thanks
Sasha
#17 lore raw

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

Quoted 29 lines · Michael S. Tsirkin
Quoted 28 lines · Sasha Levin

<20200123101000.GB24255@Red>
References: <[email protected]> <20200123101000.GB24255@Red>

Hi

[This is an automated email]

This commit has been processed because it contains a "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 ("crypto: virtio - convert to new crypto engine API") d0d859bb87ac ("crypto: virtio - Register an algo only if it's supported") e02b8b43f55a ("crypto: virtio - pr_err() strings should end with newlines") eee1d6fca0a0 ("crypto: virtio - switch to skcipher API")

Quoted 6 lines
Quoted 3 lines

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Mike could you comment on backporting?

Hi Michael,

I will send V3, so I will resolve these conflicts later. :)

Quoted 6 lines
Quoted 3 lines
Signature · 2 lines
Thanks
Sasha

.

---
Regards,
Longpeng(Mike)

maintainer
#18 lore raw

Re: [PATCH v2 2/2] crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()

In reply to Longpeng(Mike)

<20200123101000.GB24255@Red>
References: <[email protected]> <20200123101000.GB24255@Red>

Hi

[This is an automated email]

This commit has been processed because it contains a "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 ("crypto: virtio - convert to new crypto engine API") d0d859bb87ac ("crypto: virtio - Register an algo only if it's supported") e02b8b43f55a ("crypto: virtio - pr_err() strings should end with newlines") eee1d6fca0a0 ("crypto: virtio - switch to skcipher API")

NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

Signature · 2 lines
Thanks
Sasha