After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786146 - Don't ask whether Keyboard settings can capture shortcuts
Don't ask whether Keyboard settings can capture shortcuts
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.25.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 786574 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-08-11 09:56 UTC by Bastien Nocera
Modified: 2017-08-22 10:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
inhibitShortcuts: Whitelist OS components (2.50 KB, patch)
2017-08-22 09:00 UTC, Florian Müllner
committed Details | Review

Description Bastien Nocera 2017-08-11 09:56:23 UTC
In bug 783342, which was merged for 3.25.90, we would ask the user whether the Keyboard Settings panel was allowed to capture the keyboard shortcuts exclusively.

Given that the Settings panel is part of the system, not a third-party application like a VM front-end, or a game, there's no point in adding a layers of trust just for it, and that the keyboard shortcuts panel is completely useless without the feature, I think that gnome-shell should whitelist this application.
Comment 1 Florian Müllner 2017-08-11 10:29:14 UTC
(In reply to Bastien Nocera from comment #0)
> I think that gnome-shell should whitelist this application.

The tricky bit here is to whitelist applications without giving malicious actors a free pass by calling set_app_id() with an appropriate ID.
Comment 2 Allan Day 2017-08-11 11:43:39 UTC
I think that users implicitly trust the OS, so asking for permission could be quite confusing - a lot of people won't understand why the question is even being asked. Not asking for permission would be better in this case.
Comment 3 Florian Müllner 2017-08-11 13:34:39 UTC
(In reply to Allan Day from comment #2)
> I think that users implicitly trust the OS, so asking for permission could
> be quite confusing - a lot of people won't understand why the question is
> even being asked. Not asking for permission would be better in this case.

The problem is that "OS" is very vague in this context. Essentially any non-sandboxed process that has access to the display server can pretend to be gnome-control-center if we add a whitelist based on gnome-shell's app matching. That's really not acceptable, given how a saner security model is one of the selling points for wayland. So before we can talk about a whitelist, we need a way to identify system applications which isn't spoofable by random scripts users download from the net ...
Comment 4 Bastien Nocera 2017-08-11 13:46:43 UTC
This keeps coming up again and again: stuff running outside the sandbox is the system, we just happen to have an awful architecture which can't make the difference between system and really system. Who cares if a non-sandboxed app can spoof stuff. It's not sandboxed. Why would it bother capturing your keystrokes when it can grab your unlocked keyring and send all the passwords to a server in Belarus?

The path, as far as I'm concerned, is the same as for location services:
- expect unsandboxed applications to be trustworthy (which is really the implied case right now)
- slowly but forcefully move apps to the sandbox

The unsandboxed app can already run an "eval()" over D-Bus to remove that dialogue, so who are we trying to kid?
Comment 5 Bastien Nocera 2017-08-21 18:51:13 UTC
*** Bug 786574 has been marked as a duplicate of this bug. ***
Comment 6 Florian Müllner 2017-08-21 20:31:08 UTC
(In reply to Bastien Nocera from comment #4)
> The path, as far as I'm concerned, is the same as for location services:
> - expect unsandboxed applications to be trustworthy (which is really the
> implied case right now)
> - slowly but forcefully move apps to the sandbox

Should we then just give all non-sandboxed apps a free pass? That is, approve all requests from those apps without showing the dialog?
Comment 7 Jonas Ådahl 2017-08-22 00:09:46 UTC
I think it could make sense with a white list for non-sandboxed apps. Not for security, but for user experience. If we'd silently allow keyboard inhibitation to anyone, we could easily end up with hidden application bugs hindering alt-tab and other short cuts because they unexpectedly inhibited them when they shouldn't have (as in how many gtk clients did until recently).
Comment 8 Florian Müllner 2017-08-22 09:00:52 UTC
Created attachment 358114 [details] [review]
inhibitShortcuts: Whitelist OS components

Users already have to trust their OS, so asking whether an OS component
should be allowed to perform an OS operation is odd at best, if not
confusing. Account for this by allowing system components that require a
keyboard grab to work - namely Setting's keyboard shortcuts panel - to
do so without triggering the permissions dialog.
Comment 9 Bastien Nocera 2017-08-22 09:05:12 UTC
Review of attachment 358114 [details] [review]:

+1 from me
Comment 10 Rui Matos 2017-08-22 10:07:40 UTC
Review of attachment 358114 [details] [review]:

untested, but makes sense
Comment 11 Florian Müllner 2017-08-22 10:24:55 UTC
Attachment 358114 [details] pushed as e8a2c06 - inhibitShortcuts: Whitelist OS components