D22571: Allow blacklisting some wayland interfaces

David Edmundson <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
davidedmundson added a comment.


  > Can we put some enforcement on the desktop file like requiring that it is root owned?
  
  Urgh, please no.
  
  At most maybe we can check the location matches kwin's install_prefix.

INLINE COMMENTS

> wayland_server.cpp:219
> +        }
> +        return QByteArray();
> +    }

Can you make us fail if both return an empty byte array.

> wayland_server.cpp:227
> +    QStringList fetchRequestedInterfaces(KWayland::Server::ClientConnection * client) const {
> +        const auto serviceQuery = QStringLiteral("exist Exec and exist [X-KDE-Wayland-Interfaces] and ('%1' =~ Exec or '%2' =~ Exec)").arg(client->executablePath(), QFileInfo(client->executablePath()).fileName());
> +        const auto servicesFound = KServiceTypeTrader::self()->query(QStringLiteral("Application"), serviceQuery);

This doesn't protect against the attack of just having a binary called /tmp/plasmashell without a container.

We'll match the executablePath.fileName

Then compare that /tmp/plasmashell matched /tmp/plasmashell

We want to compare /proc/PID/root/ + client->executablePath()
against QStandardPaths::findExecutable(servicesFound.exec())

?

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D22571

To: apol, #plasma, #kwin
Cc: graesslin, davidedmundson, kwin, LeGast00n, fmonteiro, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.