{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-payloads/issues/8","labels_url":"https://api.github.com/repos/rapid7/metasploit-payloads/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-payloads/issues/8/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-payloads/issues/8/events","html_url":"https://github.com/rapid7/metasploit-payloads/pull/8","id":94295224,"number":8,"title":"On socket flush, stop reading on error","user":{"login":"bcook-r7","id":10031469,"avatar_url":"https://avatars.githubusercontent.com/u/10031469?v=3","gravatar_id":"","url":"https://api.github.com/users/bcook-r7","html_url":"https://github.com/bcook-r7","followers_url":"https://api.github.com/users/bcook-r7/followers","following_url":"https://api.github.com/users/bcook-r7/following{/other_user}","gists_url":"https://api.github.com/users/bcook-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/bcook-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcook-r7/subscriptions","organizations_url":"https://api.github.com/users/bcook-r7/orgs","repos_url":"https://api.github.com/users/bcook-r7/repos","events_url":"https://api.github.com/users/bcook-r7/events{/privacy}","received_events_url":"https://api.github.com/users/bcook-r7/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapid7/metasploit-payloads/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"OJ","id":28896,"avatar_url":"https://avatars.githubusercontent.com/u/28896?v=3","gravatar_id":"","url":"https://api.github.com/users/OJ","html_url":"https://github.com/OJ","followers_url":"https://api.github.com/users/OJ/followers","following_url":"https://api.github.com/users/OJ/following{/other_user}","gists_url":"https://api.github.com/users/OJ/gists{/gist_id}","starred_url":"https://api.github.com/users/OJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OJ/subscriptions","organizations_url":"https://api.github.com/users/OJ/orgs","repos_url":"https://api.github.com/users/OJ/repos","events_url":"https://api.github.com/users/OJ/events{/privacy}","received_events_url":"https://api.github.com/users/OJ/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-07-10T12:09:47Z","updated_at":"2015-07-12T06:17:54Z","closed_at":"2015-07-12T03:44:29Z","pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-payloads/pulls/8","html_url":"https://github.com/rapid7/metasploit-payloads/pull/8","diff_url":"https://github.com/rapid7/metasploit-payloads/pull/8.diff","patch_url":"https://github.com/rapid7/metasploit-payloads/pull/8.patch"},"body":"We are currently inconsistently handling errors in recv() when flushing data from a TCP socket. In one case, we handle the graceful close, but not the error case. In the other, we handle exactly the opposite.\r\n\r\nBoth of these loops may spin indefinitely depending on the recv return code. In one, if the TCP connection is abruptly closed in stageless meterpreter or on a transport switch, the flush function may loop. In the other, if the remote server does a socket shutdown, but not a close, we will also loop.\r\n\r\n# Verification Steps\r\n\r\nI'm still working on these to get exact ways to reproduce all of the hanging scenarios, but thought it made sense to get the PR up for review anyway, since its pretty clear we're not handling the -1 error cases."},"comment":{"url":"https://api.github.com/repos/rapid7/metasploit-payloads/issues/comments/120691025","html_url":"https://github.com/rapid7/metasploit-payloads/pull/8#issuecomment-120691025","issue_url":"https://api.github.com/repos/rapid7/metasploit-payloads/issues/8","id":120691025,"user":{"login":"bcook-r7","id":10031469,"avatar_url":"https://avatars.githubusercontent.com/u/10031469?v=3","gravatar_id":"","url":"https://api.github.com/users/bcook-r7","html_url":"https://github.com/bcook-r7","followers_url":"https://api.github.com/users/bcook-r7/followers","following_url":"https://api.github.com/users/bcook-r7/following{/other_user}","gists_url":"https://api.github.com/users/bcook-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/bcook-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcook-r7/subscriptions","organizations_url":"https://api.github.com/users/bcook-r7/orgs","repos_url":"https://api.github.com/users/bcook-r7/repos","events_url":"https://api.github.com/users/bcook-r7/events{/privacy}","received_events_url":"https://api.github.com/users/bcook-r7/received_events","type":"User","site_admin":false},"created_at":"2015-07-12T06:17:54Z","updated_at":"2015-07-12T06:17:54Z","body":"metasploit-payloads-1.0.7 is released with this and the other recent fixes"}}