-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
3.0.3
-
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.