Opened 3 years ago

Closed 3 years ago

#13808 closed defect (fixed)

Tor doesn't pass the appropriate family to getsockopt on src/or/connection_edge.c

Reported by: klondike Owned by:
Priority: Medium Milestone: Tor: 0.2.6.x-final
Component: Core Tor/Tor Version: Tor: 0.2.5.10
Severity: Keywords: tor-client 025-backport
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Tor tries to fetch the original IP address for REDIRECTed packages in destination_from_socket

The problem is that the code uses SOL_IP and SO_ORIGINAL_DST when it should use in the case of IPv6 SOL_IPV6 and IP6T_SO_ORIGINAL_DST. Not doing so results in a ENOENT error being returned instead and the connection dying.

Child Tickets

Attachments (2)

lol.patch (3.8 KB) - added by klondike 3 years ago.
Same patch again but with a not messed up configure.ac, sorry for that
lol4.patch (1.7 KB) - added by klondike 3 years ago.
Allow the calls inside the sandbox

Download all attachments as: .zip

Change History (8)

comment:1 Changed 3 years ago by klondike

Attached patch solves the ENOENT issue but still causes trouble when using REDIRECT with the log showing:
[Tor] Missing mapping for virtual address '[scrubbed]'. Refusing._

I really have no idea how to continue from here.

Changed 3 years ago by klondike

Attachment: lol.patch added

Same patch again but with a not messed up configure.ac, sorry for that

comment:2 Changed 3 years ago by klondike

Status: newneeds_revision

comment:3 Changed 3 years ago by nickm

Keywords: tor-client 025-backport added
Milestone: Tor: 0.2.6.x-final
Status: needs_revisionneeds_review

Guessing that you meant "needs_review" ;)

comment:4 Changed 3 years ago by klondike

Yup, thanks :) Also the fix to the missing mappings problem is on #13811 since they are different issues.

Changed 3 years ago by klondike

Attachment: lol4.patch added

Allow the calls inside the sandbox

comment:5 Changed 3 years ago by klondike

I have also realized that neither the IPv4 getsockopt nor the IPv6 were enabled on the sandbox , I have added a second patch to fix that too.

comment:6 Changed 3 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Looks good to me; merging to master. Thanks!

Note: See TracTickets for help on using tickets.