Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 8600015

Browse files
committed
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 178b53f)
1 parent 8f20ece commit 8600015

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pki_container_openssh.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,9 @@ static int pki_private_key_encrypt(ssh_buffer privkey_buffer,
440440
{
441441
struct ssh_cipher_struct *ciphers = ssh_get_ciphertab();
442442
struct ssh_cipher_struct cipher;
443-
uint8_t key_material[128];
443+
uint8_t key_material[128] = {0};
444444
size_t key_material_len;
445-
char passphrase_buffer[128];
445+
char passphrase_buffer[128] = {0};
446446
int rc;
447447
int i;
448448
int cmp;

0 commit comments

Comments
 (0)