Opened 6 weeks ago

Closed 5 weeks ago

Last modified 5 weeks ago

#33918 closed defect (fixed)

Stop truncating IPv6 addresses in channel logs

Reported by: teor Owned by: teor
Priority: Medium Milestone: Tor: 0.4.4.x-final
Component: Core Tor/Tor Version: Tor: 0.2.4.4-alpha
Severity: Normal Keywords: ipv6, prop311, prop312, 043-backport
Cc: Actual Points: 0.1
Parent ID: #33050 Points: 0.1
Reviewer: ahf Sponsor: Sponsor55-must

Description

channel_tls_get_remote_desc_method() formats IP addresses and ports, but its buffer is only 32 characters. IPv6 addresses can be up to 41 characters long, and the port is an extra 6 characters.

Child Tickets

Change History (5)

comment:1 Changed 6 weeks ago by teor

Status: assignedneeds_review

See my PR:

This fix isn't urgent at all.

comment:2 Changed 6 weeks ago by nickm

LGTM. We could backport this if you think it's worthwhile. Also do you think it's worth defining a new TOR_ADDRPORT_BUF_LEN?

Please feel free to merge and/or put in merge_ready when you're satisfied with it.

comment:3 in reply to:  2 ; Changed 6 weeks ago by teor

Keywords: 043-backport added
Status: needs_reviewmerge_ready

Replying to nickm:

LGTM. We could backport this if you think it's worthwhile.

I think it could go back to 0.4.3 now.

I don't see much reason to backport further. Truncations should be rare in practice, and the function isn't actually used much.

Also do you think it's worth defining a new TOR_ADDRPORT_BUF_LEN?

In new code, yes. Let's do that in master in a separate ticket.

Please feel free to merge and/or put in merge_ready when you're satisfied with it.

I'll cherry-pick to 0.4.3 then merge.

comment:4 Changed 5 weeks ago by nickm

Resolution: fixed
Status: merge_readyclosed

I'll cherry-pick to 0.4.3 then merge.

I just did this. (Cherry picked to 0.4.3 and then merged forward.)

comment:5 in reply to:  3 Changed 5 weeks ago by teor

Replying to teor:

Replying to nickm:

Also do you think it's worth defining a new TOR_ADDRPORT_BUF_LEN?

In new code, yes. Let's do that in master in a separate ticket.

I opened #33956 for this follow-up refactor.

Note: See TracTickets for help on using tickets.