From: Greg Kroah-Hartman Date: Thu, 7 Sep 2023 10:20:39 +0000 (+0100) Subject: 5.15-stable patches X-Git-Tag: v6.1.53~151 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=07b60d6300a29c746a03786e58e55b790264250b;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: crypto-rsa-pkcs1pad-use-helper-to-set-reqsize.patch --- diff --git a/queue-5.15/crypto-rsa-pkcs1pad-use-helper-to-set-reqsize.patch b/queue-5.15/crypto-rsa-pkcs1pad-use-helper-to-set-reqsize.patch new file mode 100644 index 00000000000..4b7266aed30 --- /dev/null +++ b/queue-5.15/crypto-rsa-pkcs1pad-use-helper-to-set-reqsize.patch @@ -0,0 +1,39 @@ +From 5b11d1a360ea23c80c6d4ec3f5986a788d0a0995 Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Tue, 22 Nov 2022 13:53:38 +0800 +Subject: crypto: rsa-pkcs1pad - Use helper to set reqsize + +From: Herbert Xu + +commit 5b11d1a360ea23c80c6d4ec3f5986a788d0a0995 upstream. + +The value of reqsize must only be changed through the helper. + +Signed-off-by: Herbert Xu +Cc: Giovanni Cabiddu +Signed-off-by: Greg Kroah-Hartman +--- + crypto/rsa-pkcs1pad.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/crypto/rsa-pkcs1pad.c ++++ b/crypto/rsa-pkcs1pad.c +@@ -574,6 +574,10 @@ static int pkcs1pad_init_tfm(struct cryp + return PTR_ERR(child_tfm); + + ctx->child = child_tfm; ++ ++ akcipher_set_reqsize(tfm, sizeof(struct pkcs1pad_request) + ++ crypto_akcipher_reqsize(child_tfm)); ++ + return 0; + } + +@@ -669,7 +673,6 @@ static int pkcs1pad_create(struct crypto + inst->alg.set_pub_key = pkcs1pad_set_pub_key; + inst->alg.set_priv_key = pkcs1pad_set_priv_key; + inst->alg.max_size = pkcs1pad_get_max_size; +- inst->alg.reqsize = sizeof(struct pkcs1pad_request) + rsa_alg->reqsize; + + inst->free = pkcs1pad_free; + diff --git a/queue-5.15/series b/queue-5.15/series index c778a8c2226..29a93922983 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -46,3 +46,4 @@ scsi-lpfc-fix-incorrect-big-endian-type-assignment-i.patch alsa-seq-oss-fix-racy-open-close-of-midi-devices.patch tracing-introduce-pipe_cpumask-to-avoid-race-on-trac.patch platform-mellanox-fix-mlxbf-tmfifo-not-handling-all-.patch +crypto-rsa-pkcs1pad-use-helper-to-set-reqsize.patch