mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
CVE-2025-5449 sftpserver: Avoid memory leak when we run out of handles during sftp_open
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
ae8881dfe5
commit
db7f101d1c
@@ -935,6 +935,7 @@ process_open(sftp_client_message client_msg)
|
||||
sftp_reply_handle(client_msg, handle_s);
|
||||
ssh_string_free(handle_s);
|
||||
} else {
|
||||
free(h);
|
||||
close(fd);
|
||||
SSH_LOG(SSH_LOG_PROTOCOL, "Failed to allocate handle");
|
||||
sftp_reply_status(client_msg, SSH_FX_FAILURE,
|
||||
|
||||
Reference in New Issue
Block a user