contiki-os / contiki

The official git repository for Contiki, the open source OS for the Internet of Things
http://www.contiki-os.org/
Other
3.71k stars 2.58k forks source link

Incorrectly handling negotiated options of telnet servers #2686

Open jerrytesting opened 3 years ago

jerrytesting commented 3 years ago

Hello,

In the implementation of telnet servers until version 3.0 and even the latest commit 32b5b17, telnet servers incorrectly handle negotiated options.

According to the general constraints of RFC854, during negotiating some disabled command options or unnegotiated commands, telnet servers must give WILL/WONT or DO/DONT response for DO and WILL commands, respectively.

However, telnet servers may not give any responses in this case. This bug appears as telnet servers put all responses in a fixed-length buffer in the implementation. Telnet servers only put messages into buffer but don't have a check whether successfully or not. Hence, when the buffer is full, it can lead to responses lost. This bug could lead to clients waiting forever and other effects.

Could you have a check? Thanks a lot.

OS-WS commented 3 years ago

Hi, Is there any plan to fix this issue?

urlyy commented 3 weeks ago

Excuse me, how can I reproduce this bug?