mailing list of musl libc
 help / color / mirror / code / Atom feed
* Further bugs in syslog()
@ 2013-03-23  3:45 Rich Felker
  2013-03-23  3:53 ` Rich Felker
  2013-03-23  4:05 ` Proposed syslog patch [Re: [musl] Further bugs in syslog()] Rich Felker
  0 siblings, 2 replies; 5+ messages in thread
From: Rich Felker @ 2013-03-23  3:45 UTC (permalink / raw)
  To: musl

Hi all,

William Haddon's report about syslog prompted me to review the file,
and there seem to be several additional bugs:

1. log_ident stores the actual pointer passed by the caller rather
   than a copy of the string. This probably works in practice for most
   callers but it's definitely not correct.

2. As a specific case of the previously reported bug, overflows will
   happen if log_ident is too long. This is unlikely to happen
   intentionally, but could happen if log_ident points to storage on
   the stack whose lifetime ended and which was subsequently reused.

3. Opening the log fd with LOG_NDELAY only obtains the socket, but
   does not connect it. The socket is a datagram socket, so connect is
   not needed to use it, but if sendto is used instead of connect,
   the idiom of using openlog with LOG_NDELAY before chroot will not
   work.

I'm going to review the proposed patches and probably put together a
big syslog fix...

Rich


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-23 21:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-23  3:45 Further bugs in syslog() Rich Felker
2013-03-23  3:53 ` Rich Felker
2013-03-23  4:05 ` Proposed syslog patch [Re: [musl] Further bugs in syslog()] Rich Felker
2013-03-23 16:17   ` Szabolcs Nagy
2013-03-23 21:27     ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).