GNOME Bugzilla – Bug 769217
Vinagre crashes when RDP server refuses connection
Last modified: 2016-07-27 12:22:12 UTC
Created attachment 332209 [details] [review] Proposed patch against git master The issue is caused by changes introduced by 60dea27. When the RDP server refuses TCP connections on the specified port, freerdp_connect() causes freerdp_get_last_error() to return 0x2000c. Due to the way the do-while loop is constructed in open_freerdp(), this effectively causes freerdp_connect() to be called in an infinite loop, which quickly results in a SIGSEGV as FreeRDP does not seem to handle eventfd creation failures nicely (these are caused by exceeding the per-process limit of open file descriptors). As the error string for error 0x2000c is "protocol security negotiation or connection failure", to at least allow refused connections to be handled gracefully, some limit should be enforced on the number of loop iterations inside open_freerdp(). I attached a patch against git master showing one possible way of solving the issue (I see no point in endlessly asking the user for credentials).
Review of attachment 332209 [details] [review]: Seems reasonable to me. Do you have commit access? If not, I will push it for you.
Thanks for a quick review. I do not have commit access, so please push the patch for me.
Review of attachment 332209 [details] [review]: Pushed to master as commit d7b4f88943e8615d252d27e1efc58cb64a9e1821. Many thanks for the report and patch!