Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #4920

Closed
Open
Created Jan 16, 2012 by George Kadianakis@asn

obfsproxy: pending_socks_cb() proceeds even if getpeername() fails.

network.c:pending_socks_cb():

...
    /* Figure out where we actually connected to, and tell the socks client */
    if (getpeername(bufferevent_getfd(bev), sa, &slen) == 0) {
      socks_state_set_address(socks, sa);
      if (!down->peername)
        down->peername = printable_address(sa, slen);
    }
    socks_send_reply(socks, bufferevent_get_output(up->buffer), 0);
...

If getpeername() fails, we shouldn't proceed with sending a positive SOCKS reply.

socks_send_reply also messes around with socks_state_t.parsereq which is not filled if socks_state_set_address was not called.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking