Tk Library Source Code

View Ticket
Login
Ticket UUID: 3066872
Title: comm server blocks indefinitely
Type: Bug Version: None
Submitter: apnadkarni Created on: 2010-09-15 13:49:45
Subsystem: comm Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2010-09-16 02:52:02
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2010-09-15 19:52:02
Description:
Bug reported by skipper600 on the wiki (http://wiki.tcl.tk/2507)

"the listening interpreter stalls once it receives a tcp connection (not issued by another comm connection). Simply telnet such a comm::comm server, and it is locked until you either violate the protocol or terminate the connection."

I verified his finding with comm 4.6.1, Tcl 8.6 on Windows. This would comprise a simple DoS attack on any application using the package.

/Ashok
User Comments: andreas_kupries added on 2010-09-16 02:52:02:

allow_comments - 1

Fixed. The procedure "commIncoming" used a blocking "gets" to read the line of versions offered by the connecting side. Replaced with non-blocking gets, and event-handling, splitting "commIncoming" into two parts.

I believe that this affected all versions of comm since the first version made.

comm version 4.6.2.