Skip to content

Commit 19c75bc

Browse files
committed
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
2 parents ee84595 + 18e615a commit 19c75bc

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

crypto/asymmetric_keys/public_key.c

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ int public_key_verify_signature(const struct public_key *pkey,
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
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ static int skcipher_next_slow(struct skcipher_walk *walk, unsigned int bsize)
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
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ int main(int argc, char **argv)
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 {

0 commit comments

Comments
 (0)