Twisted の Telnet 処理で認証なしにサービス停止の恐れ
概要
Twisted の conch Telnet 処理には、サブネゴシエーションのバッファに長さの上限がなく、認証前の接続から無制限にメモリを消費される問題があります。攻撃を受けるとプロセスが停止し、同じプロセス上で動くすべてのサービスが止まるおそれがあります。26.10.0rc1 で修正されているため、Twisted を同版以降に更新してください。
AI要約
外部の AI が作成した要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
Twisted の conch Telnet 処理には、サブネゴシエーションのバッファに長さの上限がなく、認証前の接続から無制限にメモリを消費される問題があります。攻撃を受けるとプロセスが停止し、同じプロセス上で動くすべてのサービスが止まるおそれがあります。26.10.0rc1 で修正されているため、Twisted を同版以降に更新してください。
影響パッケージ
| 種類 | パッケージ | 影響を受ける版 | 直った版 |
|---|---|---|---|
| twisted | twisted | — | — |
| pip | Twisted |
26.10.0rc1 未満 |
26.10.0rc1 |
| PyPI | twisted |
26.10.0rc1 未満 |
26.10.0rc1 |
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
Summary
An allocation-without-limits vulnerability (CWE-770) in the Twisted conch telnet transport lets any unauthenticated remote peer exhaust server memory over a single connection. When the peer opens a telnet subnegotiation with IAC SB and then streams bytes without ever sending the IAC SE terminator, every byte is appended to a per-connection buffer that has no maximum length. The buffer persists across reads and is released only on the terminator the attacker withholds, so it grows without bound until the process is killed.
Details
The option-negotiation state machine in Telnet.dataReceived enters the subnegotiation state on IAC SB and sets an empty command list. In that state every non-IAC byte is appended to the list with no length check:
# src/twisted/conch/telnet.py (Telnet.dataReceived)
elif self.state == "subnegotiation":
if b == IAC:
self.state = "subnegotiation-escaped"
else:
self.commands.append(b) # unbounded: no len(self.commands) check
self.commands is an instance attribute that persists across dataReceived calls and is deleted only when IAC SE completes the subnegotiation. Negotiation runs at the transport layer before authentication, and the bytes are consumed inside dataReceived before any application callback, so an application cannot impose a bound. Twisted caps other parser buffers, for example NetstringReceiver.MAX_LENGTH, but not this one.
Affected product: Twisted, `twiste…
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory