Displaying 4 results from an estimated 4 matches for "get_recent_address".
2018 Feb 16
2
tinc 1.1: freeaddrinfo(NULL) crash on windows
...freed memory is made almost immediately but on macOS the
memory appears to be cleared much of the time. This results in an
attempt to connect to an AF_UNSPEC socket with no address, which
of course fails.
A potential fix, modeled on the "recently seen addresses not in our
cache" part of get_recent_address() is:
https://github.com/gsliepen/tinc/pull/177
Another approach would be to pass the sockaddr_t to get_recent_address()
and fill it in there. I can write a diff for that if you'd like.
I also noticed a problem with the recently seen but uncached code
which was hidden by a cast as well...
2018 Jan 22
3
tinc 1.1: freeaddrinfo(NULL) crash on windows
On Windows, freeaddrinfo(NULL) will result in a segv. In
get_recent_address(), there is the following block of code:
if(cache->aip) {
sockaddr_t *sa = (sockaddr_t *)cache->aip->ai_addr;
cache->aip = cache->aip->ai_next;
if(!cache->aip) {
freeaddrinfo(cache->aip);...
2018 Feb 17
0
tinc 1.1: freeaddrinfo(NULL) crash on windows
...mory appears to be cleared much of the time. This results in an
> attempt to connect to an AF_UNSPEC socket with no address, which
> of course fails.
Reading freed memory is always a bug.
> A potential fix, modeled on the "recently seen addresses not in our
> cache" part of get_recent_address() is:
>
> https://github.com/gsliepen/tinc/pull/177
Thanks again for providing a patch!
> Another approach would be to pass the sockaddr_t to get_recent_address()
> and fill it in there. I can write a diff for that if you'd like.
The fix in the pull request looks fine, I do...
2018 Jan 22
0
tinc 1.1: freeaddrinfo(NULL) crash on windows
On Mon, Jan 22, 2018 at 09:51:33AM -0700, Todd C. Miller wrote:
> On Windows, freeaddrinfo(NULL) will result in a segv. In
> get_recent_address(), there is the following block of code:
>
> if(cache->aip) {
> sockaddr_t *sa = (sockaddr_t *)cache->aip->ai_addr;
> cache->aip = cache->aip->ai_next;
>
> if(!cache->aip) {
>...