[Bug 1194809] New: Possible password leak by windows stealing focus
https://bugzilla.suse.com/show_bug.cgi?id=1194809 Bug ID: 1194809 Summary: Possible password leak by windows stealing focus Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: All OS: openSUSE Tumbleweed Status: NEW Severity: Major Priority: P5 - None Component: GNOME Assignee: gnome-bugs@suse.de Reporter: martin.wilck@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Yesterday I lost (luckily only part of) an important password as follows: I was running pidgin as IRC client. pidgin was configured to autoconnect to some channels on irc.suse.de. I activated the SUSE VPN via the GNOME VPN panel. I continued working in the terminal. I ran a command in the terminal that required typing a password (as usual in terminal applications, typing passwords provides no visual feedback like "***"). I pressed "enter" and nothing happened. At this point I realized that the 2nd half of the password had ended up in the pidgin window. What happened? If an IRC server is unreachable, pidgin polls in the background in a certain interval (a few minutes I think). When the server becomes reachable, it connects to it, which causes the typical startup dialog & messages ("You are connected to irc1.suse.de ....") to be displayed. At this moment, the pidgin window pops up and grabs the keyboard focus. As the window is relatively small and my screen is large, and I was looking at the keyboard while typing (because I usually do when typing passwords), I didn't notice this immediately, and typed part of the password to the pidgin window. This is particularly nasty, because after establishing the VPN connection, the window pops up after a non-deterministic time interval which is between a few seconds and ~5 minutes. You can't "wait" for this to happen, and if you don't, you're likely to forget that the connection process is going on in the background. Also, making matters worse, when the pidgin window pops up because of a message in some chat, the focus isn't necessarily in the chat (tab in the pidgin window) that caused the pop-up, but in some currently selected chat. In the case at hand, I'd typed my password at to libera.chat's "NickServ" bot (which didn't recongnize it as command, but might have logged what I typed). For the time being, I've disabled the "auto-join" feature for all pidgin channels on irc.suse.de. But I'm unsure if that actually helps, because I believe that pidgin would try to connect to IRC accounts nonetheless, and if it does, the typical login / connect dialogs might cause the window to pop up even if no chats are configured to connect automatically. See also https://askubuntu.com/questions/1084032/how-to-prevent-new-windows-from-stea... There someone suggests using
gsettings set org.gnome.desktop.wm.preferences focus-new-windows 'strict'
I've tried that setting on TW (GNOME 41.3) and saw no change in behavior. A simple test is typing something like this in the terminal:
$ gedit & $ abcdefg.... # continue typing
At some point, gedit will pop up and the text will end up in the gedit window. Note that this happens with gedit but not e.g. with emacs or libreoffice writer. So it depends on the application. Also, some applications (e.g. the ssh and gpg askpass tools) use a different API that does this much better - the entire screen gets locked and changes color, so that typing something at the wrong window is practically impossible. This behavior would be inapparopriate for an application like gedit, though. The behavior of gedit and pidgin under GNOME is highly dangerous. I've reason to believe that other Window Managers (or X in general) behave similarly. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1194809 https://bugzilla.suse.com/show_bug.cgi?id=1194809#c1 Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fcrozat@suse.com --- Comment #1 from Frederic Crozat <fcrozat@suse.com> --- Focus stealing prevention was implemented first on X by GNOME people IIRC, so upstream is aware of it ;) Beware of the test done in terminal, because there is some specific behaviour when terminal is used : (from metacity / mutter 2.13.13, yes this is OLD ;) - Don't "steal" focus from terminal windows for new window mappings as the difference in usage between terminals and other apps seems to suggest this difference in treatment. See bug #326159 for details, feedback welcome (Elijah) [#326159] -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1194809 https://bugzilla.suse.com/show_bug.cgi?id=1194809#c3 --- Comment #3 from Martin Wilck <martin.wilck@suse.com> --- (In reply to Frederic Crozat from comment #1)
Focus stealing prevention was implemented first on X by GNOME people IIRC, so upstream is aware of it ;)
My original intention with this bug was to request that we set "org.gnome.desktop.wm.preferences focus-new-windows 'strict'" by default. Then I discovered that this setting didn't prevent the issue, so requesting it makes no sense. I don't know what else to do about it.
Beware of the test done in terminal, because there is some specific behaviour when terminal is used : (from metacity / mutter 2.13.13, yes this is OLD ;)
- Don't "steal" focus from terminal windows
This doesn't seem to apply to current gnome-shell environment. I wrote this bz because I *did* experience the focus being stolen from a terminal window. (In reply to Andreas Stieger from comment #2)
Thanks. Interesting that this is so old but the issue still occurs. There doesn't seem to be a conclusive answer or solution on the ticket, and the window management technology around it has changed a lot since then. Is the solution to stop using pidgin? Or to use Wayland? Unfortunately I have strong reasons not to migrate to Wayland just yet... -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1194809 https://bugzilla.suse.com/show_bug.cgi?id=1194809#c4 Martin Wilck <martin.wilck@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |security-team@suse.de Flags| |needinfo?(security-team@sus | |e.de) --- Comment #4 from Martin Wilck <martin.wilck@suse.com> --- Adding security-team, in case they're interested. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1194809 https://bugzilla.suse.com/show_bug.cgi?id=1194809#c5 --- Comment #5 from Martin Wilck <martin.wilck@suse.com> --- Note about pidgin: pidgin also pops up new "windows" (actually, tabs) if e.g. someone sends me a message. In this case the behaviour is *different* from comment 0. I only get a "window xyz is ready" message, and I have to click the pidgin window actively to switch focus to it. This is fine. If pidgin behaved this way for new connections, too, the most urgent issue would be solved. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1194809 https://bugzilla.suse.com/show_bug.cgi?id=1194809#c6 --- Comment #6 from Martin Wilck <martin.wilck@suse.com> --- (In reply to Martin Wilck from comment #3)
My original intention with this bug was to request that we set "org.gnome.desktop.wm.preferences focus-new-windows 'strict'" by default.
Then I discovered that this setting didn't prevent the issue, so requesting it makes no sense. I don't know what else to do about it.
Well I guess that's what we'd need to do - figure out why this setting has no effect. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1194809 Marcus Meissner <meissner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Possible password leak by |VUL-1: Possible password |windows stealing focus |leak by windows stealing | |focus -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1194809 Maintenance Robot <maint-coord+maintenance_robot@suse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P4 - Low -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1194809 https://bugzilla.suse.com/show_bug.cgi?id=1194809#c9 Johannes Segitz <jsegitz@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |UPSTREAM Flags|needinfo?(security-team@sus | |e.de) | --- Comment #9 from Johannes Segitz <jsegitz@suse.com> --- I'll close this here since it's unlikely we'll fix this downstream. I've commented in the upstream but and subscribed there -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1194809 https://bugzilla.suse.com/show_bug.cgi?id=1194809#c10 --- Comment #10 from Martin Wilck <martin.wilck@suse.com> --- Upstream has moved this to a mutter issue: https://gitlab.gnome.org/GNOME/mutter/-/issues/2106 Perhaps you should comment there. But the upstream interest is obviously very low. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com