mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
CVE-2025-5318: sftpserver: Fix possible buffer overrun
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
6fd9cc8ce3
commit
5f4ffda887
@@ -702,7 +702,7 @@ void *sftp_handle(sftp_session sftp, ssh_string handle)
|
|||||||
|
|
||||||
memcpy(&val, ssh_string_data(handle), sizeof(uint32_t));
|
memcpy(&val, ssh_string_data(handle), sizeof(uint32_t));
|
||||||
|
|
||||||
if (val > SFTP_HANDLES) {
|
if (val >= SFTP_HANDLES) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user