search for: free_known_addresses

Displaying 5 results from an estimated 5 matches for "free_known_addresses".

2018 Feb 21
1
tinc 1.1: freeaddrinfo(NULL) crash on windows
Unfortunately, my fix exposed a problem in reset_address_cache() could call free_known_addresses() on a struct addrinfo * that was returned by getaddrinfo(). This results in heap corruption on Windows (and a crash). It seems safest to just make a copy of the addresses returned by getaddrinfo() so it can always use free_known_addresses() instead of trying to determine whether or not we need t...
2018 Feb 16
2
tinc 1.1: freeaddrinfo(NULL) crash on windows
On Mon, 22 Jan 2018 18:08:22 +0100, Guus Sliepen wrote: > Thanks for reporting this bug! Indeed, that code is wrong. It should > free cache->ai instead of cache->aip. Even if it didn't crash on Linux, > it was a memory leak. A fix is now in the git repository. The fix leads to a use after free bug which is visible on macOS. It doesn't seem to be much of a problem on most
2017 Mar 06
2
Suspicious code in net_socket.c
Good afternoon! Module - net_socket.c Function - get_known_addresses --------------------------------------------------- struct addrinfo *nai = xzalloc(sizeof *nai); if(ai) ai->ai_next = nai; ai = nai; -------------------------------------------------- For my opinion, possible causes: 1. Lost trails (ai_next) 2. ai_next not initialized 3. Possible segfault during
2017 Mar 07
0
Suspicious code in net_socket.c
...--------------------------- > For my opinion, possible causes: > 1. Lost trails (ai_next) > 2. ai_next not initialized > 3. Possible segfault during "freeaddrinfo" call in do_outgoing_connections You are right about 1 and 3. I applied your patch, which fixes 1, and I added a free_known_addresses() function to clean up the struct addrinfo chain that we built ourselves. Please check out the latest version of the 1.1 branch in git and check if it works for you. -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org> -------------- next part ------------...
2017 Mar 08
1
Suspicious code in net_socket.c
...---------------------- > For my opinion, possible causes: > 1. Lost trails (ai_next) > 2. ai_next not initialized > 3. Possible segfault during "freeaddrinfo" call in > do_outgoing_connections You are right about 1 and 3. I applied your patch, which fixes 1, and I added a free_known_addresses() function to clean up the struct addrinfo chain that we built ourselves. Please check out the latest version of the 1.1 branch in git and check if it works for you. -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org>