Refuse dbus message paths longer than BUS_PATH_SIZE_MAX limit.
authorRiccardo Schirone <rschiron@redhat.com>
Mon, 4 Feb 2019 13:29:09 +0000 (14:29 +0100)
committerLukáš Nykrýn <lnykryn@redhat.com>
Mon, 8 Apr 2019 11:30:18 +0000 (13:30 +0200)
commitac9c51b72213bcea3dc9cea330d4c5fce9c4470e
tree57522e16883029bf40b5e76ea632d2c58be6cee2
parent94b18b8123b5d957ed84e4aa8e268b60f5427821
Refuse dbus message paths longer than BUS_PATH_SIZE_MAX limit.

Even though the dbus specification does not enforce any length limit on the
path of a dbus message, having to analyze too long strings in PID1 may be
time-consuming and it may have security impacts.

In any case, the limit is set so high that real-life applications should not
have a problem with it.

(cherry-picked from commit 61397a60d98e368a5720b37e83f3169e3eb511c4)

Related: #1678641
src/libsystemd/sd-bus/bus-internal.c
src/libsystemd/sd-bus/bus-internal.h