mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
pki: Fix possible information leak via uninitialized stack buffer
Fixes T190
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 178b53f924)
This commit is contained in:
@@ -440,9 +440,9 @@ static int pki_private_key_encrypt(ssh_buffer privkey_buffer,
|
|||||||
{
|
{
|
||||||
struct ssh_cipher_struct *ciphers = ssh_get_ciphertab();
|
struct ssh_cipher_struct *ciphers = ssh_get_ciphertab();
|
||||||
struct ssh_cipher_struct cipher;
|
struct ssh_cipher_struct cipher;
|
||||||
uint8_t key_material[128];
|
uint8_t key_material[128] = {0};
|
||||||
size_t key_material_len;
|
size_t key_material_len;
|
||||||
char passphrase_buffer[128];
|
char passphrase_buffer[128] = {0};
|
||||||
int rc;
|
int rc;
|
||||||
int i;
|
int i;
|
||||||
int cmp;
|
int cmp;
|
||||||
|
|||||||
Reference in New Issue
Block a user