aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-15 14:41:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-15 14:41:37 -0500
commit19c75bcbe0113cbbf05e4d89e0502a23358bfca9 (patch)
tree544d6b73341ebc66802ae38732d8009d67008aab
parentee84595a91c60d33cbf1d5b941b04a3ee6cf7ce0 (diff)
parent18e615ad87bce9125ef3990377a4a946ec0f21f3 (diff)
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This fixes the following issues: - a crash regression in the new skcipher walker - incorrect return value in public_key_verify_signature - fix for in-place signing in the sign-file utility" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: skcipher - fix crash in virtual walk sign-file: Fix inplace signing when src and dst names are both specified crypto: asymmetric_keys - set error code on failure
-rw-r--r--crypto/asymmetric_keys/public_key.c1
-rw-r--r--crypto/skcipher.c4
-rw-r--r--scripts/sign-file.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index fd76b5fc3b3a..d3a989e718f5 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -121,6 +121,7 @@ int public_key_verify_signature(const struct public_key *pkey,
121 if (ret) 121 if (ret)
122 goto error_free_req; 122 goto error_free_req;
123 123
124 ret = -ENOMEM;
124 outlen = crypto_akcipher_maxsize(tfm); 125 outlen = crypto_akcipher_maxsize(tfm);
125 output = kmalloc(outlen, GFP_KERNEL); 126 output = kmalloc(outlen, GFP_KERNEL);
126 if (!output) 127 if (!output)
diff --git a/crypto/skcipher.c b/crypto/skcipher.c
index aca07c643d41..0e1e6c35188e 100644
--- a/crypto/skcipher.c
+++ b/crypto/skcipher.c
@@ -226,7 +226,9 @@ static int skcipher_next_slow(struct skcipher_walk *walk, unsigned int bsize)
226 void *v; 226 void *v;
227 227
228 if (!phys) { 228 if (!phys) {
229 buffer = walk->buffer ?: walk->page; 229 if (!walk->buffer)
230 walk->buffer = walk->page;
231 buffer = walk->buffer;
230 if (buffer) 232 if (buffer)
231 goto ok; 233 goto ok;
232 } 234 }
diff --git a/scripts/sign-file.c b/scripts/sign-file.c
index 53af6dc3e6c1..19ec468b1168 100644
--- a/scripts/sign-file.c
+++ b/scripts/sign-file.c
@@ -267,7 +267,7 @@ int main(int argc, char **argv)
267 } 267 }
268 x509_name = argv[2]; 268 x509_name = argv[2];
269 module_name = argv[3]; 269 module_name = argv[3];
270 if (argc == 5) { 270 if (argc == 5 && strcmp(argv[3], argv[4]) != 0) {
271 dest_name = argv[4]; 271 dest_name = argv[4];
272 replace_orig = false; 272 replace_orig = false;
273 } else { 273 } else {