Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#3923 closed defect (fixed)

tor dies in assert on reloading config when TrackExitHosts was used

Reported by: laruldan Owned by:
Priority: High Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Tor dies in assert on reloading config or control/SETCONF TrackExitHosts=... when some exit hosts was tracked before.

Sep 04 [err] _tor_strndup(): Bug: util.c:226: _tor_strndup: Assertion n < SIZE_T_CEILING failed; aborting.


#1  0xb7cb8811 in raise () from /lib/tls/i686/cmov/
#2  0xb7cb9fb9 in abort () from /lib/tls/i686/cmov/
#3  0x081071e1 in _tor_strndup (s=0x85a0481 "exit", n=4294967295) at util.c:226
#4  0x080c3d73 in addressmap_clear_excluded_trackexithosts (options=0x84a6898)
    at connection_edge.c:849
#5  0x080b45d0 in options_act (old_options=0x816ccf0) at config.c:1328
#6  0x080b5753 in set_options (new_val=0x84a6898, msg=0xbffffaf8)
    at config.c:674
#7  0x080b5e91 in options_init_from_string (
    cf=0x89ef858 "## Configuration file "..., 
    command=0, command_arg=0x0, msg=0xbffffaf8) at config.c:4279
#8  0x080b6325 in options_init_from_torrc (argc=1, argv=0xbffffd64)
    at config.c:4153
#9  0x080500e7 in process_signal (sig=1) at main.c:1428
#10 0xb7f5ec23 in event_base_loop () from /usr/lib/

Function addressmap_clear_excluded_trackexithosts seems broken in lines 845-850, strrchr(3) does not work like this.
Patch attached.

Child Tickets

Attachments (1)

fix_TrackExitHosts_config_reload.patch (675 bytes) - added by laruldan 9 years ago.
Fix to patch issue

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by laruldan

Fix to patch issue

comment:1 Changed 9 years ago by rransom

Status: newneeds_review

How do you want to be credited in the changelog?

comment:2 Changed 9 years ago by rransom

Milestone: Tor: 0.2.2.x-final

comment:3 Changed 9 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merged into 0.2.2 and later. Thanks!

(I've credited you in the changelog as "laruldan"; if you want a different name, just let us know.)

comment:4 Changed 8 years ago by nickm

Keywords: tor-client added

comment:5 Changed 8 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.