[ZBX-9344] Zabbix server/proxy poller may hang on Telnet check when password is not required Created: 2015 Feb 26  Updated: 2017 May 30  Resolved: 2015 Mar 05

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 2.0.14, 2.2.8, 2.4.4
Fix Version/s: 2.0.15rc1, 2.2.9rc1, 2.4.5rc1, 2.5.0

Type: Incident report Priority: Critical
Reporter: dimir Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: telnet
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In the source code, file src/libs/zbxcomms/telnet.c:

int     telnet_login(ZBX_SOCKET socket_fd, const char *username, const char *password, AGENT_RESULT *result)
{
        const char      *__function_name = "telnet_login";
[...]
        while (ZBX_TCP_ERROR != (rc == telnet_read(socket_fd, buf, &sz, &offset)))
        {
                if (':' == telnet_lastchar(buf, offset))
                        break;
        }

Instead of comparison operator

ZBX_TCP_ERROR != (rc == telnet_read

there should be an assignment operator

ZBX_TCP_ERROR != (rc = telnet_read.

This may cause endless loop if telnet server would not request password.



 Comments   
Comment by Aleksandrs Saveljevs [ 2015 Mar 03 ]

It should also be checked whether this issue is the cause for ZBXNEXT-2626.

Comment by Aleksandrs Saveljevs [ 2015 Mar 04 ]

Issue ZBXNEXT-2626 is not affected by this issue. In that issue, there is neither a login prompt, nor a password prompt.

Comment by Aleksandrs Saveljevs [ 2015 Mar 04 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9344 .

Comment by Aleksandrs Saveljevs [ 2015 Mar 05 ]

Fixed in pre-2.0.15 r52539, pre-2.2.9 r52540, pre-2.4.5 r52541, and pre-2.5.0 (trunk) r52542.

Generated at Fri Apr 19 06:33:39 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.