mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux
Pull crypto library fix from Eric Biggers: "Fix missing zeroization of the ChaCha state" * tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux: lib/crypto: chacha: Zeroize permuted_state before it leaves scope
This commit is contained in:
@@ -87,6 +87,8 @@ void chacha_block_generic(struct chacha_state *state,
|
||||
&out[i * sizeof(u32)]);
|
||||
|
||||
state->x[12]++;
|
||||
|
||||
chacha_zeroize_state(&permuted_state);
|
||||
}
|
||||
EXPORT_SYMBOL(chacha_block_generic);
|
||||
|
||||
@@ -110,5 +112,7 @@ void hchacha_block_generic(const struct chacha_state *state,
|
||||
|
||||
memcpy(&out[0], &permuted_state.x[0], 16);
|
||||
memcpy(&out[4], &permuted_state.x[12], 16);
|
||||
|
||||
chacha_zeroize_state(&permuted_state);
|
||||
}
|
||||
EXPORT_SYMBOL(hchacha_block_generic);
|
||||
|
||||
Reference in New Issue
Block a user