CVE-2023-3603Processing sftp server read may cause null dereference
A missing allocation check in sftp server processing read requests may cause a NULL dereference on low-memory conditions. The malicious client can request up to 4GB SFTP reads, causing allocation of up to 4GB buffers, which was not being checked for failure. This will likely crash the authenticated user's sftp server connection (if implemented as forking as recommended). For thread-based servers, this might also cause DoS for legitimate users. Given this code is not in any released versions, no security releases have been issued.
What to do
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | libssh | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | libssh | Fix pending | ||
| Ubuntu 14.04 | libssh | Fix pending | ||
| Red Hat Enterprise Linux 9 | libssh | Not affected | ||
| Red Hat Enterprise Linux 9 | libssh-config | Not affected | ||
| Red Hat Enterprise Linux 9 | libssh-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | libssh | Not affected | ||
| Red Hat Enterprise Linux 8 | libssh-config | Not affected | ||
| Red Hat Enterprise Linux 8 | libssh-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | libssh | Not affected |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- libssh
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Fedora Extra Packages for Enterprise Linux 7
- Fedora
Workaround: The SFTP server implementation is based on callbacks so you can rewrite the sftp_channel_default_data_callback() to provide additional checks. [1] https://gitlab.com/libssh/libssh-mirror/-/blob/master/examples/sample_sftpserver.c#L330
References
- https://access.redhat.com/security/cve/CVE-2023-3603
- https://bugzilla.redhat.com/show_bug.cgi?id=2221791
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.