In the ongoing process of moving to a new work laptop, I have been working to protect secrets from hypothetical malware on the device. I am using Pop!_OS 22.04 at the moment, examining the default environment: Gnome and gnome-keyring[-daemon].
Using Secrets
I had assumed, given the general focus on security in Linux, that it would be broadly similar to macOS. To illustrate the user experience there, starting iTerm2 requires the login password to open the password manager for the first time. The login password is also required to view the passwords through Keychain Access, regardless of whether iTerm2 is running.
I found exactly one Linux terminal with a password manager, Tilix, so of course I installed it. Within Tilix, no password is required to use the password manager. Using Seahorse (the apparent equivalent to Keychain Access), the passwords Tilix has stored appear in the “login” keyring, unlocked by default, and no password is needed to reveal them.
In short, the keyring in Gnome is glorified plain text. Access to the session bus is unconditional access to all secrets in all unlocked keyrings.
Who’s There?
Another major difference is that macOS seems to associate keyring entries with owners, such that each individual program gets its own settings in the OS about whether it can access particular secrets. I can “always allow” aws-vault
to access secrets in the aws-vault
keyring, but I presume if awsthief
tried to access them instead, I would get a new prompt.
Furthermore, if I uncheck “remember this password” on the Mac, it stays unchecked the next time the keyring is unlocked. In Gnome, for the past 8 years, it re-checks itself every time, waiting for a moment of inattention to make the security of the alternative keyring (awsvault
, of course) entirely moot. It may be locked, but you can have D-Bus fetch the key from under the doormat.
Locking Up
I’m not certain yet whether the Gnome keyring can auto-lock collections, either. My previous post on macOS’ security
command includes how to lock the keyring after a timeout, or when the system is locked. These capabilities are missing from Seahorse, but I haven’t fully analyzed the D-Bus interface. (Still, I shouldn’t need to do so.)
Copying Microsoft Good Enough?
A cursory Web search suggests that the way Gnome handles the keyring is exactly like Windows. Not only is Gnome chasing taillights, but it has chased the easiest ones to catch.
Overall, the quality of Gnome (GNU …) keyring lives up to the heuristic for bad cryptography.
No comments:
Post a Comment