Open
Description
The existing dbus brokers implement some security limits, that we should as well. However, we should just hardcode their values instead of allowing admins/users to modify them. Here is the relevant snippet from the configuration XML for system bus:
<!-- The defaults for these limits are hard-coded in dbus-daemon.
Some clarifications:
Times are in milliseconds (ms); 1000ms = 1 second
133169152 bytes = 127 MiB
33554432 bytes = 32 MiB
150000ms = 2.5 minutes -->
<!-- <limit name="max_incoming_bytes">133169152</limit> -->
<!-- <limit name="max_incoming_unix_fds">64</limit> -->
<!-- <limit name="max_outgoing_bytes">133169152</limit> -->
<!-- <limit name="max_outgoing_unix_fds">64</limit> -->
<!-- <limit name="max_message_size">33554432</limit> -->
<!-- <limit name="max_message_unix_fds">16</limit> -->
<!-- <limit name="service_start_timeout">25000</limit> -->
<!-- <limit name="auth_timeout">5000</limit> -->
<!-- <limit name="pending_fd_timeout">150000</limit> -->
<!-- <limit name="max_completed_connections">2048</limit> -->
<!-- <limit name="max_incomplete_connections">64</limit> -->
<!-- <limit name="max_connections_per_user">256</limit> -->
<!-- <limit name="max_pending_service_starts">512</limit> -->
<!-- <limit name="max_names_per_connection">512</limit> -->
<!-- <limit name="max_match_rules_per_connection">512</limit> -->
<!-- <limit name="max_replies_per_connection">128</limit> -->
We could consider making some/all of the values configurable as well, if a compelling-enough use case arrives. I just haven't heard or seen anyone ever modifying the defaults for these values. Also, if a specific hardcoded value isn't high/low enough, we should first look into changing the value or try to come up with a smarter way to determine a good value automatically, before resorting to throwing it to the admin/user.