CVE-2026-54886
Beschrijving NL
Loop met Unreachable Exit Condition ('Infinite Loop') kwetsbaarheid in Erlang OTP ssh (ssh_sftpd module) stelt een geverifieerde SFTP-gebruiker in staat om een SFTP-kanaal permanent niet te laten reageren. De functie handle_data/4 in ssh_sftpd bevat een catch-all-clausule die kanaalgegevens van elk type accepteert. Wanneer kanaalgegevens met een niet-nul-type code (SSH_MSG_CHANNEL_EXTENDED_DATA) aankomen met een lege in behandeling zijnde buffer en een payload op of onder de SFTP-pakketgroottelimiet, roept de clausule zichzelf op met identieke argumenten, waardoor een oneindige lus ontstaat. Het SFTP-protocol werkt uitsluitend op normale kanaalgegevens (type 0). Uitgebreide gegevens (niet-nul type) zijn zinloos voor SFTP en worden nooit verzonden door conforme klanten. Het SSH-protocol staat echter elke kanaaldeelnemer toe om uitgebreide gegevens op een open kanaal te verzenden, dus een geverifieerde SFTP-client kan de lus activeren door SSH_MSG_CHANNEL_EXTENDED_DATA te verzenden met elke data_type_code en elke niet-lege payload op of onder de groottelimiet. Het beoogde ssh_sftpd-proces komt in een oneindige staartrecursieve lus terecht. Het verwerkt nooit een ander bericht, de berichtenwachtrij groeit ongebonden en het kan alleen worden gestopt door het proces te stoppen. De op reductie gebaseerde plannerpremptie van BEAM blijft functioneren, dus andere processen op het knooppunt worden niet uitgehongerd, maar elk vastgelopen kanaalproces verbruikt continu zijn volledige CPU-tijd en accumuleert onbegrensd berichtenwachtrijgeheugen. Het openen van veel kanalen versterkt de impact van de CPU en het geheugen. Erlang/OTP SSH-configuraties met behulp van de standaard max_channels-instelling (Infinity) stellen een geverifieerde gebruiker in staat om onbeperkte kanalen per verbinding te openen, waardoor de aanval wordt versterkt zonder dat meerdere TCP-verbindingen of authenticaties nodig zijn. Er zijn geen bestandsinhoud, inloggegevens of schrijftoegang beschikbaar via dit probleem. De impact is beperkt tot denial of service op gerichte SFTP-kanalen, met secundaire CPU-degradatie en geheugengroei. Dit beveiligingslek is geassocieerd met het programmabestand lib/ssh/src/ssh_sftpd.erl en de programmaroutine ssh_sftpd:handle_data/4. Dit probleem heeft invloed op OTP van OTP 17.0 tot OTP 29.0.3, 28.5.0.3 en 27.3.4.14, wat overeenkomt met ssh van 3.0.1 tot 6.0.2, 5.5.2.2 en 5.2.11.9.
Origineel (Engels) tonen
Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in Erlang OTP ssh (ssh_sftpd module) allows an authenticated SFTP user to render an SFTP channel permanently unresponsive.
The handle_data/4 function in ssh_sftpd contains a catch-all clause that accepts channel data of any type. When channel data with a non-zero type code (SSH_MSG_CHANNEL_EXTENDED_DATA) arrives with an empty pending buffer and a payload at or below the SFTP packet size limit, the clause tail-calls itself with identical arguments, creating an infinite loop.
The SFTP protocol operates exclusively on normal channel data (type 0). Extended data (non-zero type) is meaningless for SFTP and is never sent by conforming clients. However, the SSH protocol permits any channel participant to send extended data on an open channel, so an authenticated SFTP client can trigger the loop by sending SSH_MSG_CHANNEL_EXTENDED_DATA with any data_type_code and any non-empty payload at or below the size limit.
The targeted ssh_sftpd process enters an infinite tail-recursive loop. It never processes another message, its message queue grows without bound, and it can only be stopped by killing the process. BEAM's reduction-based scheduler preemption continues to function, so other processes on the node are not starved, but each stuck channel process consumes its full CPU time share continuously and accumulates unbounded message queue memory. Opening many channels amplifies the CPU and memory impact.
Erlang/OTP SSH configurations using the default max_channels setting (infinity) allow an authenticated user to open unlimited channels per connection, amplifying the attack without requiring multiple TCP connections or authentications.
No file contents, credentials, or write access are obtainable through this issue. The impact is limited to denial of service on targeted SFTP channels, with secondary CPU degradation and memory growth.
This vulnerability is associated with program file lib/ssh/src/ssh_sftpd.erl and program routine ssh_sftpd:handle_data/4.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.14, OTP 28.5.0.3, and OTP 29.0.3, corresponding to ssh from 3.0.1 before 5.2.11.9, 5.5.2.2, and 6.0.2. Whether OTP before OTP 17.0, corresponding to ssh before 3.0.1, is affected is unknown.