mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-28 07:13:54 +09:00
CVE-2026-0965 config: Do not attempt to read non-regular and too large configuration files
Changes also the reading of known_hosts to use the new helper function Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -526,9 +526,9 @@ static int ssh_retrieve_dhgroup(char *moduli_file,
|
||||
}
|
||||
|
||||
if (moduli_file != NULL)
|
||||
moduli = fopen(moduli_file, "r");
|
||||
moduli = ssh_strict_fopen(moduli_file, SSH_MAX_CONFIG_FILE_SIZE);
|
||||
else
|
||||
moduli = fopen(MODULI_FILE, "r");
|
||||
moduli = ssh_strict_fopen(MODULI_FILE, SSH_MAX_CONFIG_FILE_SIZE);
|
||||
|
||||
if (moduli == NULL) {
|
||||
char err_msg[SSH_ERRNO_MSG_MAX] = {0};
|
||||
|
||||
Reference in New Issue
Block a user