Files
libssh/src
Mingyuan Li 0d9b2c68cc sftpserver: Fix memory leak of h->name in process_opendir error path
When sftp_handle_alloc() fails in process_opendir(), the error path
frees the handle struct h but does not free h->name which was
allocated by strdup(). This causes a memory leak every time the
server runs out of available SFTP handles while processing an
opendir request.

Also add a missing NULL check for the strdup() call itself to
handle out-of-memory conditions gracefully.

This is the same class of bug that was fixed in process_open() by
commit db7f101d (CVE-2025-5449), but was missed in process_opendir().

Signed-off-by: Mingyuan Li <2560359315@qq.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2026-02-24 10:33:35 +01:00
..
2026-02-10 10:35:23 +01:00
2025-08-12 12:12:47 +02:00
2025-12-12 18:03:19 +01:00
2026-01-15 12:48:06 +01:00
2026-01-15 12:48:06 +01:00
2026-02-10 10:35:23 +01:00
2026-01-05 12:24:00 +01:00
2026-01-05 12:24:00 +01:00
2026-01-05 12:24:13 +01:00
2026-01-15 12:48:06 +01:00
2026-01-15 12:48:06 +01:00
2023-12-18 17:35:04 +01:00
2022-10-07 09:13:19 +02:00
2025-12-12 18:18:02 +01:00
2026-01-15 12:48:06 +01:00
2022-11-23 15:29:29 +01:00
2026-01-15 12:48:06 +01:00
2026-02-05 15:43:11 +01:00
2026-02-10 10:35:23 +01:00
2026-01-05 12:24:13 +01:00
2026-01-05 12:24:13 +01:00
2026-01-05 12:24:13 +01:00
2026-01-06 22:56:44 +05:30
2026-01-15 12:48:06 +01:00
2026-01-15 12:48:06 +01:00
2026-01-05 12:24:13 +01:00
2025-12-12 18:03:19 +01:00
2026-02-05 17:19:01 +01:00
2025-12-12 18:03:19 +01:00
2025-12-12 18:03:19 +01:00
2026-01-15 12:48:06 +01:00