Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10982

Telnet simple check does not support subnegotiation

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 3.0.3
    • Server (S)
    • ubuntu 15.40

      I was surprised to find an ASA with telnet open, but equally surprised to find it was open only very rarely. In debug I found the following:

        1003:20160710:173633.826 End of telnet_socket_read():-1
        1003:20160710:173633.826 End of telnet_read():-1
        1003:20160710:173633.826 telnet_test_login() login prompt:'
      
      User Access Verification
      
      Username: '
        1003:20160710:173633.826 End of telnet_test_login():FAIL
        1003:20160710:173633.826 Telnet check error: no login prompt
      

      It would appear that the space after the colon may be causing the issue, and I think the check should ignore blanks (especially if Cisco adds them by default). Since I don't see a way to change the prompt on the ASA (maybe there is, but I did not find one in a brief look) I'd suggest this might be called a bug.

      Here's the relevant code:

              while (ZBX_PROTO_ERROR != (rc = telnet_read(socket_fd, buf, &sz, &offset)))
      
              {
                      if (':' == telnet_lastchar(buf, offset))
                              break;
              }
      

      Making this odd every few hundred checks it succeeds. I think the TCP packets are fragmented or something, so that this code (erroneously) sees the colon (or a colon) at the end of the buffer not end of transmission but I did not dig deeper to see how telnet_read is coded.

      I do not know if this affects older versions, frankly this was an oddball ASA as telnet is uncommon on those.

        1. TelnetClientLogin.txt
          12 kB
        2. PollingDump.txt
          13 kB
        3. logExtract.txt
          15 kB

            Unassigned Unassigned
            Linwood Linwood Ferguson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: