History

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

Linus Torvalds committed 9 years ago

Commit 19c75bc2 parents ee84595 18e615a3 files · +5 −2Browse files

Unified · Split

3 files
  1. crypto/asymmetric_keys/public_key.c +1 −0
  2. crypto/skcipher.c +3 −1
  3. scripts/sign-file.c +1 −1
crypto/asymmetric_keys/public_key.c+1−0
@@ -121,6 +121,7 @@ int public_key_verify_signature(const struct public_key *pkey, · 120 unmodified lines
121121 if (ret)
122122 goto error_free_req;
123123
124+ ret = -ENOMEM;
124125 outlen = crypto_akcipher_maxsize(tfm);
125126 output = kmalloc(outlen, GFP_KERNEL);
126127 if (!output)
crypto/skcipher.c+3−1
@@ -226,7 +226,9 @@ static int skcipher_next_slow(struct skcipher_walk *walk, unsigned int bsize) · 225 unmodified lines
226226 void *v;
227227
228228 if (!phys) {
229− buffer = walk->buffer ?: walk->page;
229+ if (!walk->buffer)
230+ walk->buffer = walk->page;
231+ buffer = walk->buffer;
230232 if (buffer)
231233 goto ok;
232234 }
scripts/sign-file.c+1−1
@@ -267,7 +267,7 @@ int main(int argc, char **argv) · 266 unmodified lines
267267 }
268268 x509_name = argv[2];
269269 module_name = argv[3];
270− if (argc == 5) {
270+ if (argc == 5 && strcmp(argv[3], argv[4]) != 0) {
271271 dest_name = argv[4];
272272 replace_orig = false;
273273 } else {