From 38b49516a5f61fe16955b6936b191f97d7f93cea Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 18 Nov 2014 19:07:02 +0000 Subject: [PATCH 01/13] Log to syslog when pending_fd_timeout is exceeded This is either a denial-of-service attempt, a pathological performance problem or a dbus-daemon bug. Sysadmins should be told about any of these. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=86442 --- bus/connection.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bus/connection.c b/bus/connection.c index 67793ba..2dda21c 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -671,6 +671,18 @@ static dbus_bool_t pending_unix_fds_timeout_cb (void *data) { DBusConnection *connection = data; + BusConnectionData *d = BUS_CONNECTION_DATA (connection); + int limit; + + _dbus_assert (d != NULL); + limit = bus_context_get_pending_fd_timeout (d->connections->context); + bus_context_log (d->connections->context, DBUS_SYSTEM_LOG_WARNING, + "Connection \"%s\" (%s) has had Unix fds pending for too long, " + "closing it (pending_fd_timeout=%d)", + d->name != NULL ? d->name : "(null)", + bus_connection_get_loginfo (connection), + limit); + dbus_connection_close (connection); return TRUE; } -- 2.8.1