1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-08-27 21:50:15 +03:00

bus: refuse messages pretending to originate from local interface

This commit is contained in:
Lennart Poettering
2013-12-21 03:52:39 +01:00
parent bd746b8b0c
commit 3547329642

View File

@ -5133,6 +5133,14 @@ int bus_message_parse_fields(sd_bus_message *m) {
break;
}
/* Refuse non-local messages that claim they are local */
if (streq_ptr(m->path, "/org/freedesktop/DBus/Local"))
return -EBADMSG;
if (streq_ptr(m->interface, "org.freedesktop.DBus.Local"))
return -EBADMSG;
if (streq_ptr(m->sender, "org.freedesktop.DBus.Local"))
return -EBADMSG;
m->root_container.end = BUS_MESSAGE_BODY_SIZE(m);
if (BUS_MESSAGE_IS_GVARIANT(m)) {