D22571: Allow blacklisting some wayland interfaces

Fabian Vogt <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
fvogt added inline comments.

INLINE COMMENTS

> apol wrote in wayland_server.cpp:223
> No, what you wrote isn't what we are doing. We are going through /prog/pid/root/...
> I don't really see how it would be faked for a remote process reliably.

> No, what you wrote isn't what we are doing. We are going through /prog/pid/root/...

Exactly that is the issue. Let me demonstrate:

` docker run --rm -it opensuse/tumbleweed /usr/bin/cat`
Now `client->executablePath()` is /usr/bin/cat and you compare `/proc/$(pidof cat)/root/usr/bin/cat` against `/proc/$(pidof cat)/exe`.
That's always identical:

  > diff -s /proc/$(pidof cat)/exe /proc/$(pidof cat)/root/usr/bin/cat
  Files /proc/21994/exe and /proc/21994/root/usr/bin/cat are identical
  > diff -s /proc/$(pidof cat)/exe /usr/bin/cat
  Binary files /proc/21994/exe and /usr/bin/cat differ



> I don't really see how it would be faked for a remote process reliably.

Ignoring the issue above that the executable itself does not need to be faked, here are two ways:

- By just not faking it: `LD_PRELOAD=pwn.so /usr/bin/plasmashell`
- By changing the executable file between establishing the wayland connection and requesting interfaces

REPOSITORY
  R108 KWin

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

To: apol, #plasma, #kwin, davidedmundson
Cc: fvogt, zzag, broulik, graesslin, davidedmundson, kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, 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.