From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Possible bug in openlog()
Date: Mon, 5 Jan 2015 10:46:31 -0500 [thread overview]
Message-ID: <20150105154631.GI4574@brightrain.aerifal.cx> (raw)
In-Reply-To: <20150105153914.304dd6c8f15598925bc4b0aa@dimakrasner.com>
On Mon, Jan 05, 2015 at 03:39:14PM +0200, Dima Krasner wrote:
> Hi,
>
> I think I found a bug in openlog() - it's racy. If syslogd is
> started after openlog() is called, there's a small chance that the
> socket will remain open, while connect() failed. Then, syslog() does
> not call openlog() again, because it only checks whether the socket
> file descriptor is valid.
>
> Therefore, all syslog() messages are dropped silently and nothing
> gets logged. I attached a fix.
>
> Can you merge it or provide feedback, please?
Did you observe this in practice? All accesses to log_fd seem to be
made with the syslog lock held. If you think there's missing
synchronization somewhere please elaborate.
Rich
next prev parent reply other threads:[~2015-01-05 15:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 13:39 Dima Krasner
2015-01-05 15:46 ` Rich Felker [this message]
2015-01-06 17:40 ` Rich Felker
2015-01-07 21:04 Dima Krasner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150105154631.GI4574@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).