Bug 2499049 (CVE-2026-15370) - CVE-2026-15370 libssh: libssh: stack buffer overflow in SFTP server longname construction
Summary: CVE-2026-15370 libssh: libssh: stack buffer overflow in SFTP server longname ...
Keywords:
Status: NEW
Alias: CVE-2026-15370
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On: 2503651
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-10 15:30 UTC by OSIDB Bzimport
Modified: 2026-07-21 14:45 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-07-10 15:30:26 UTC
A flaw was found in libssh server-side SFTP directory listing. In process_readdir() in src/sftpserver.c, the server allocates a fixed stack buffer as char long_name[MAX_LONG_NAME_LEN] and passes attacker-controlled directory entry names into readdir_long_name(). In the pre-patch implementation, readdir_long_name() appends metadata and the filename into z_long_name with repeated unbounded strcat() calls. Because z_long_name points at the caller-owned fixed stack buffer, sufficiently long filenames in an attacker-controlled directory can overflow that stack buffer during SSH_FXP_READDIR processing, leading to crashes and possible code execution on the server.


Note You need to log in before you can comment on or make changes to this bug.