search for: freeaddrinfo

Displaying 20 results from an estimated 221 matches for "freeaddrinfo".

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) {...
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; > >...
2011 Aug 05
4
[Bug 8355] New: Use pointer after freeaddrinfo()
https://bugzilla.samba.org/show_bug.cgi?id=8355 Summary: Use pointer after freeaddrinfo() Product: rsync Version: 3.0.8 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P5 Component: core AssignedTo: wayned at samba.org ReportedBy: andrey at zonov.org QAConta...
2018 Feb 21
1
tinc 1.1: freeaddrinfo(NULL) crash on windows
...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 to use freeaddrinfo(). https://github.com/gsliepen/tinc/pull/178 - todd
2003 May 18
1
OpenSSH -current segfaults on HP-UX+gcc
Hi All. As of last night, sshd now segfaults on HP-UX (11.00, gcc 3.2.2) on startup. I've single-stepped through the code in freeaddrinfo and it's called with a valid *addrinfo, follows ai_next once then for some reason attempts to deref the second pointer which is NULL. Suspecting a compiler/optimization bug I recompiled fake-getaddrinfo.c without optimization but that made no difference. If I change the for loop to "fo...
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
2018 Feb 17
0
tinc 1.1: freeaddrinfo(NULL) crash on windows
On Fri, Feb 16, 2018 at 02:26:36PM -0700, Todd C. Miller 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
2017 Mar 06
2
Suspicious code in net_socket.c
...-------------------------------------- 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 "freeaddrinfo" call in do_outgoing_connections May be I don't understand logic? If no misunderstandings, please, test fix before commiting. Sorry, but I don't have enough time for complete testing, but fixed module works well on Linux and Windows (1.14pre crashed under Windows after 1-600 sec. ) -...
2001 Jun 07
0
Patch for systems with no setreuid()
...+#undef HAVE_SETRESUID + /* Define if you have the setrlimit function. */ #undef HAVE_SETRLIMIT --- configure.orig Thu Jun 7 14:12:53 2001 +++ configure Thu Jun 7 14:13:40 2001 @@ -3184,7 +3184,7 @@ fi -for ac_func in arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent getusershell glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgi...
2000 Dec 29
0
another possible mem leak, AIX-specific
On AIX, the config.h generated by 'configure' sets up the following directives: #define HAVE_FREEADDRINFO 1 #define HAVE_GETADDRINFO 1 #define BROKEN_GETADDRINFO 1 This allows the compiler to use the 'getaddrinfo()' routine in fake-getaddrinfo.c, but it uses the 'freeaddrinfo()' provided by AIX. I don't think 'freeaddrinfo()' is releasing the linked list properly, because...
2004 May 28
1
IP not logged in log file
...stead of the actual connecting IP address. Is this a config issue? I don't know if this is related but when building: socket.c: In function `try_bind_local': socket.c:139: warning: implicit declaration of function `getaddrinfo' socket.c:148: warning: implicit declaration of function `freeaddrinfo' clientname.c: In function `client_addr': clientname.c:71: warning: implicit declaration of function `getnameinfo' clientname.c: In function `client_name': clientname.c:126: warning: implicit declaration of function `getaddrinfo' clientname.c:144: warning: implicit declaration o...
2012 Feb 12
0
PATCH: multiple BindAddress
...more addresses, trying next address: %s",options.bind_addresses[i+1]); + continue; + } + } + + if (bind(sock, res->ai_addr, res->ai_addrlen) < 0) { + error("bind: %s: %s", options.bind_addresses[i], strerror(errno)); + if ( i == last_idx){ + close(sock); + freeaddrinfo(res); + return -1; + } else { + error("We have more addresses, trying next address: %s",options.bind_addresses[i+1]); + continue; + } + } else { + addrfound = 1; + break; + } + freeaddrinfo(res); } - if (bind(sock, res->ai_addr, res->ai_addrlen) < 0) { -...
2000 Apr 21
0
OpenSSH 1.2.3 on AIX 4.3.3
...h netdb.h netgroup.h paths.h poll.h pty.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/select.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h stddef.h util.h utmp.h utmpx.h) # Checks for library functions. -AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getnameinfo innetgr md5_crypt mkdtemp openpty rresvport_af setenv seteuid setlogin setproctitle setreuid snprintf strlcat strlcpy updwtmpx vsnprintf _getpty) +AC_CHECK_FUNCS(arc4random bindresvport_af freeaddrinfo gai_strerror getaddrinfo getnameinfo innetgr md5_crypt mkdte...
2001 May 22
1
[PATCH]: configure.in: Missing check for setvbuf
...evision 1.286 diff -u -p -r1.286 configure.in --- configure.in 2001/05/17 03:32:51 1.286 +++ configure.in 2001/05/22 11:59:54 @@ -460,7 +460,7 @@ AC_ARG_WITH(tcp-wrappers, ) dnl Checks for library functions. -AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent getusershell glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgi...
2002 Apr 23
1
problem with X11 forwarding and use_localhost on Linux (solution)
...92,7 +2392,8 @@ if (num_socks == NUM_SOCKS) break; #else - break; + if (!x11_use_localhost || num_socks == NUM_SOCKS) + break; #endif } freeaddrinfo(aitop); Stig
2002 May 02
0
problem with X11 forwarding and use_localhost on Linux (solution) (fwd)
...0) { debug("bind port %d: %.100s", port, strerror(errno)); close(sock); @@ -2374,7 +2381,12 @@ if (num_socks == NUM_SOCKS) break; #else - break; + if (x11_use_localhost) { + if (num_socks == NUM_SOCKS) + break; + } else { + break; + } #endif } freeaddrinfo(aitop); In article <Pine.HPX.4.44.0204301333550.2022-100000 at jenny> (at Tue, 30 Apr 2002 13:35:52 -0700 (PDT)), Kevin Steves <kevin at atomicgears.com> says: > itojun, > > do you have any recommendations on this? > > http://bugzilla.mindrot.org/show_bug.cgi?id=164 &...
2011 Sep 08
1
Dynamic port remote listener - a BUG?
...c->host_port = port_to_connect; c->listening_port = listen_port; success = 1; } if (success == 0) error("channel_setup_fwd_listener: cannot listen to port: %d", listen_port); freeaddrinfo(aitop); return success; } As you see allocated_listen_port gets assigned to some free port, but then... nothing more happens with allocated_listen_port, because c->listening_port is set to listen_port, which in this case equals 0. (note that listen_port IS NOT set to allocated_listen_po...
2006 Jun 01
1
Random crashes after sighup
...} } @@ -427,13 +430,14 @@ } /* Close connections to hosts that have a changed or deleted host config file */ - for(node = connection_tree->head; node; node = node->next) { c = node->data; - + if(c->outgoing) { - free(c->outgoing->name); - freeaddrinfo(c->outgoing->ai); + if (c->outgoing->name) + free(c->outgoing->name); + if (c->outgoing->ai) + freeaddrinfo(c->outgoing->ai); free(c->outgoing); c->outgoing = NULL; }
2017 Mar 08
1
Suspicious code in net_socket.c
For my opinion, special function not needed, because at first time, oai set to NULL, freeaddrinfo tried to free each ai, until occurance of ai_next == NULL. But it works. Linux, Windows, coordinator with white IP, other nodes behind NAT's (1 or two NAT's, only direct connections allowed). There are some problems with MinGW make, at least - mingw-64 from Fedora 25. 1. No definition fo...
2003 Mar 31
2
basename() in libgen
IRIX 6.5 has the basename() function in libgen. SYNOPSIS cc [flag ...] file ... -lgen [library ...] #include <libgen.h> char *basename (char *path); -- ayamura