ports/79114: stunnel calls execvp with broken arguments

Florian Hars hars at bik-gmbh.de
Tue Mar 22 08:00:24 UTC 2005


>Number:         79114
>Category:       ports
>Synopsis:       stunnel calls execvp with broken arguments
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 22 08:00:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Charlie &
>Release:        FreeBSD 5.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD grisu.bik-gmbh.de 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Nov 5 04:19:18 UTC 2004 root at harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386

>Description:
       If execargs is not given in stunnel.conf, stunnel calls execvp with a NULL
       pointer as its second argument, which makes execvp fail with EFAIL.
>How-To-Repeat:
	I wrapped popa3d with stunnel, which worked on 4.x (modulo the spurious broken
        connection errors I filed a while ago) without execargs in stunnel.conf.
	I copied my configuration, and now every connection attempt leads to

         stunnel[13279]: /usr/local/libexec/popa3d: Bad address (14)

>Fix:

	execargs should be mandatory (and checked on startup),
        or something like the following should be done in client.c:
        if (NULL == c->opt->execargs) {
          char *args[] =  {c->opt->execname, NULL};
          execvp(c->opt->execname, args);
        } else {
	  execvp(c->opt->execname, c->opt->execargs);
	}
	

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list