Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 936442 Details for
Bug 1140527
CVE-2014-3637 dbus: denial of service by creating unkillable D-Bus connections
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
initial upstream patch 4
0008-bus-enforce-pending_fd_timeout.patch (text/plain), 4.69 KB, created by
Murray McAllister
on 2014-09-11 08:40:48 UTC
(
hide
)
Description:
initial upstream patch 4
Filename:
MIME Type:
Creator:
Murray McAllister
Created:
2014-09-11 08:40:48 UTC
Size:
4.69 KB
patch
obsolete
>From 5cdabc4de994d64391d48c09d3b78c57177b63fb Mon Sep 17 00:00:00 2001 >From: Alban Crequy <alban.crequy@collabora.co.uk> >Date: Mon, 21 Jul 2014 17:17:11 +0100 >Subject: [PATCH 08/11] bus: enforce pending_fd_timeout > >The bus uses _dbus_connection_set_pending_fds_function and >_dbus_connection_get_pending_fds_count to be notified when there are pending >file descriptors. A timeout per connection is armed and disarmed when the file >descriptor list is used and emptied. > >Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80559 >Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> >--- > bus/connection.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 71 insertions(+) > >diff --git a/bus/connection.c b/bus/connection.c >index 54fa3ab..519122c 100644 >--- a/bus/connection.c >+++ b/bus/connection.c >@@ -33,6 +33,7 @@ > #include <dbus/dbus-list.h> > #include <dbus/dbus-hash.h> > #include <dbus/dbus-timeout.h> >+#include <dbus/dbus-connection-internal.h> > > /* Trim executed commands to this length; we want to keep logs readable */ > #define MAX_LOG_COMMAND_LEN 50 >@@ -102,6 +103,8 @@ typedef struct > int peak_match_rules; > int peak_bus_names; > #endif >+ int n_pending_unix_fds; >+ DBusTimeout *pending_unix_fds_timeout; > } BusConnectionData; > > static dbus_bool_t bus_pending_reply_expired (BusExpireList *list, >@@ -268,6 +271,15 @@ bus_connection_disconnected (DBusConnection *connection) > > dbus_connection_set_dispatch_status_function (connection, > NULL, NULL, NULL); >+ >+ if (d->pending_unix_fds_timeout) >+ { >+ _dbus_loop_remove_timeout (bus_context_get_loop (d->connections->context), >+ d->pending_unix_fds_timeout); >+ _dbus_timeout_unref (d->pending_unix_fds_timeout); >+ } >+ d->pending_unix_fds_timeout = NULL; >+ _dbus_connection_set_pending_fds_function (connection, NULL, NULL); > > bus_connection_remove_transactions (connection); > >@@ -592,6 +604,42 @@ oom: > return FALSE; > } > >+static void >+check_pending_fds_cb (DBusConnection *connection) >+{ >+ BusConnectionData *d = BUS_CONNECTION_DATA (connection); >+ int n_pending_unix_fds_old = d->n_pending_unix_fds; >+ int n_pending_unix_fds_new; >+ >+ n_pending_unix_fds_new = _dbus_connection_get_pending_fds_count (connection); >+ >+ _dbus_verbose ("Pending fds count changed on connection %p: %d -> %d\n", >+ connection, n_pending_unix_fds_old, n_pending_unix_fds_new); >+ >+ if (n_pending_unix_fds_old == 0 && n_pending_unix_fds_new > 0) >+ { >+ _dbus_timeout_set_interval (d->pending_unix_fds_timeout, >+ bus_context_get_pending_fd_timeout (d->connections->context)); >+ _dbus_timeout_set_enabled (d->pending_unix_fds_timeout, TRUE); >+ } >+ >+ if (n_pending_unix_fds_old > 0 && n_pending_unix_fds_new == 0) >+ { >+ _dbus_timeout_set_enabled (d->pending_unix_fds_timeout, FALSE); >+ } >+ >+ >+ d->n_pending_unix_fds = n_pending_unix_fds_new; >+} >+ >+static dbus_bool_t >+pending_unix_fds_timeout_cb (void *data) >+{ >+ DBusConnection *connection = data; >+ dbus_connection_close (connection); >+ return TRUE; >+} >+ > dbus_bool_t > bus_connections_setup_connection (BusConnections *connections, > DBusConnection *connection) >@@ -687,6 +735,22 @@ bus_connections_setup_connection (BusConnections *connections, > } > } > >+ /* Setup pending fds timeout (see #80559) */ >+ d->pending_unix_fds_timeout = _dbus_timeout_new (100, /* irrelevant */ >+ pending_unix_fds_timeout_cb, >+ connection, NULL); >+ if (d->pending_unix_fds_timeout == NULL) >+ goto out; >+ >+ _dbus_timeout_set_enabled (d->pending_unix_fds_timeout, FALSE); >+ if (!_dbus_loop_add_timeout (bus_context_get_loop (connections->context), >+ d->pending_unix_fds_timeout)) >+ goto out; >+ >+ _dbus_connection_set_pending_fds_function (connection, >+ (DBusPendingFdsChangeFunction) check_pending_fds_cb, >+ connection); >+ > _dbus_list_append_link (&connections->incomplete, d->link_in_connection_list); > connections->n_incomplete += 1; > >@@ -734,6 +798,13 @@ bus_connections_setup_connection (BusConnections *connections, > dbus_connection_set_dispatch_status_function (connection, > NULL, NULL, NULL); > >+ if (d->pending_unix_fds_timeout) >+ _dbus_timeout_unref (d->pending_unix_fds_timeout); >+ >+ d->pending_unix_fds_timeout = NULL; >+ >+ _dbus_connection_set_pending_fds_function (connection, NULL, NULL); >+ > if (d->link_in_connection_list != NULL) > { > _dbus_assert (d->link_in_connection_list->next == NULL); >-- >2.1.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1140527
:
936438
|
936439
|
936441
| 936442