hi, I’m unsure that this is the correct place to ask about this. But I would appreciate if this was answered by someone who knows for sure.
I use Linux with GNOME desktop environment.
I’m not sure whether this is in the scope of a desktop environment, or in the scope of each distribution. But I was wondering, is there a built-in clipboard, and does it have history? When you copy a bit of text, how long does it stay anywhere within the system? When is it fully cleared off of your system? Will copying another bit of text fully clear it from your system (including RAM)?
I’m asking this because I made a choice to not use any extensions for my browser, but I still use Bitwarden, which doesn’t seem to have autofill available in it’s apps (just in the browser extension), so I have to manually copy and paste my passwords, which I’m ok with, but I feel doubtful about the privacy/security of this.
I can try to answer this since I know a bit about how the clipboard in Gnome works.
GNOME does have a built-in clipboard manager, but it’s quite basic. Here’s what you need to know:
There’s no persistent clipboard history by default - GNOME only keeps the most recent copy operation
When you copy something new, it completely overwrites the previous clipboard content in memory
The clipboard data lives in RAM and is managed by the GNOME Shell process
There’s no automatic disk storage of clipboard contents (unless you’re using a third-party clipboard manager like this one)
When you copy a password and then copy something else, the password is fully cleared from the clipboard memory. However, the data might still exist somewhere in RAM until that memory gets overwritten by other processes. There is no way of knowing when this happens but it’s the same on every OS afaik.
I do have to say though that this might be overkill for most use-cases as an attacker with access to your system could just save your current clipboard every second or so anyways.
Afaik Bitwarden, KeePass etc. are working on solution to enable auto-fill from the desktop app on Wayland or waiting for Wayland to add support for it or something.
hmm
I wonder whether this is a vulnerability that I should worry or forget about.
what if some malware or something, could access it from the RAM then. I mean, I do restart my computer everyday, but eh.
is there any common advice in privacy/security communities, to avoid copying and pasting passwords manually?
from another side, I don’t know if browser extension autofill is more secure or not (doesn’t it also persist somewhere in RAM for some time?). And I rly don’t feel like giving up extensionless-ness.
what exactly is overkill? (sorry I guess I lost the train of thought here)
I wouldn’t worry too much about your passwords potentially being recovered from RAM. If someone has access to the RAM they most likely also have direct access to the clipboard, the things on your screen, what you type etc so they probably don’t need to rummage through the RAM in the hope of finding your password.
Unless of course your threat model is high I would forget about this and if it is high it might make more sense to use something like QubeOS. So my advice would be to forget about it if you’re the “average” user.
I am “an average user” I guess, but I do enjoy getting the most of my security and privacy (as long as it doesn’t really worsen usability), so I was just wondering if privacy/security nerds advice each other to only autofill passwords, or copying and pasting manually is fine.
thanks a lot for your answers
AFAIK in wayland only the active window gets to read from the clipboard, kind of like how it works in android. But, I’m pretty sure that even if you sandbox your apps, they could still steal focus and read from the clipboard that way, though that wouldn’t be very subtle. If you’re concerned (and you sandbox your apps ofc), maybe consider using something like keepassxc’s autotype functionality. Personally I like pass with wtype.
booting with init_on_free=1 on the kernel command line would ensure all memory released by userspace programs would be zeroed immediately.
you can also use the GrapheneOS hardened_malloc which zeroes free()'ed memory while a program is still running.
also not entirely related, if you have a Ryzen system you can likely enable Transparent System Memory Encryption (TSME) in the EFI..
eh, I need the cross-device autosync of Bitwarden, so…
I know you can just copy the file to your phone, I tried doing that and tbh I got very tired of doing that each time
is that some sort of terminal apps for autotyping passwords?
is this not gonna break anything?
I’m a tech newbie, so just making sure
Both the Bitwarden browser addon and the Bitwarden desktop app (at least on Linux) have the ability to clear the clipboard after a somewhat configurable amount of time. Check the settings of each.
that’s probably true, but I use PWA instead of the desktop app (for increased security, I guess), and I prefer to avoid installing any browser extensions, so…