Re: syslogd optarg

2015-08-27 Thread Theo de Raadt
> On Thu, Aug 27, 2015 at 10:13:25AM -0600, Theo de Raadt wrote: > > Why not strdup? > > And now with strdup() as suggested by Theo. ok, because such style is not really a leak. > Index: usr.sbin/syslogd/syslogd.c > === > RCS file:

Re: syslogd optarg

2015-08-27 Thread Alexander Bluhm
On Thu, Aug 27, 2015 at 10:13:25AM -0600, Theo de Raadt wrote: > Why not strdup? And now with strdup() as suggested by Theo. ok? bluhm Index: usr.sbin/syslogd/syslogd.c === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/syslogd/sy

Re: syslogd optarg

2015-08-27 Thread Alexander Bluhm
On Thu, Aug 27, 2015 at 09:44:33AM -0600, Todd C. Miller wrote: > On Thu, 27 Aug 2015 15:47:18 +0200, Alexander Bluhm wrote: > > > When syslogd is reloading a modified config, it does a reexec on > > itself. For this it uses the original arguments of main(). The > > function loghost_parse() modi

Re: syslogd optarg

2015-08-27 Thread Todd C. Miller
On Thu, 27 Aug 2015 17:57:45 +0200, Alexander Bluhm wrote: > On Thu, Aug 27, 2015 at 09:44:33AM -0600, Todd C. Miller wrote: > > On Thu, 27 Aug 2015 15:47:18 +0200, Alexander Bluhm wrote: > > > > > When syslogd is reloading a modified config, it does a reexec on > > > itself. For this it uses th

Re: syslogd optarg

2015-08-27 Thread Todd C. Miller
On Thu, 27 Aug 2015 15:47:18 +0200, Alexander Bluhm wrote: > When syslogd is reloading a modified config, it does a reexec on > itself. For this it uses the original arguments of main(). The > function loghost_parse() modifies the optarg memory it is operating > on. To prevent that the exec arg

syslogd optarg

2015-08-27 Thread Alexander Bluhm
Hi, When syslogd is reloading a modified config, it does a reexec on itself. For this it uses the original arguments of main(). The function loghost_parse() modifies the optarg memory it is operating on. To prevent that the exec arguments have been tampered, pass a copy of optarg to loghost_par