[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #8068 [Torsocks]: Missing symbol namespacing
#8068: Missing symbol namespacing
----------------------+-----------------------------------------------------
Reporter: dgoulet | Owner: ioerror
Type: defect | Status: new
Priority: normal | Milestone:
Component: Torsocks | Version:
Keywords: | Parent:
Points: | Actualpoints:
----------------------+-----------------------------------------------------
By doing this command we can see a bunch of symbols that torsocks should
*not* try to overload:
{{{
$ nm .libs/libtorsocks.so | grep " T "
}}}
Here is the list that I think should be hidden:
{{{
0000000000007190 T count_netmask_bits
0000000000009fa0 T find_socks_request
0000000000009320 T get_next_dead_address
00000000000095d0 T get_pool_entry
0000000000007050 T get_uint16
0000000000007060 T get_uint32
0000000000006a70 T getipnodebyname
0000000000009ff0 T handle_request
00000000000090e0 T init_pool
0000000000009300 T is_dead_address
0000000000007470 T is_local
0000000000009f30 T kill_socks_request
0000000000009e70 T new_socks_request
0000000000009950 T our_getaddrinfo
00000000000096a0 T our_gethostbyaddr
0000000000009860 T our_gethostbyname
0000000000009a40 T our_getipnodebyname
00000000000075d0 T pick_server
0000000000007d90 T read_config
0000000000007090 T resolve_ip
0000000000009350 T search_pool_for_name
0000000000007130 T set_log_options
0000000000007070 T set_uint16
0000000000007080 T set_uint32
00000000000071c0 T show_msg
00000000000093c0 T store_pool_entry
0000000000007700 T strsplit
}}}
These symbols should at least have a torsocks_* prefix or else they might
clash with existing symbols linked to the binary called with torsocks
altering its behavior which is real *BAD*.
The quickest way of fixing that would be to add the GCC hidden attribute
to each function call or else try to make them static in the code base.
I've notice that with the "read_config" symbol that was overloaded in my
software with the current git head
(519d3be56348c3d965c286a7c04adce3dd556411).
Thanks!
David
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8068>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs