Since Linux 6.9, LUKS suspend stopped wiping disk-encryption keys from memory

mathstodon.xyz
131 points IngoBlechschmidabout 1 hour ago 32 comments
AI-Powered Research Assistant
Analyze the comments and suggest other relevant articles to read.

Comments

johnathan101|11 minutes ago
This is one of those regressions that's easy to miss because everything still "works." Security bugs often don't announce themselves.
bitbasher|38 minutes ago
I don't see any other way? When you sleep (suspend to RAM), everything is stored in RAM and is encrypted but the master key is present in kernel memory (if I recall correctly).

However, if you hibernate (suspend to disk) the entire contents of RAM (including the master key) is written/encrypted to disk and the RAM is cleared.

When you wake the machine up you have to re-enter the passphrase to decrypt the master key to re-load disk contents back to memory.

IngoBlechschmid|32 minutes ago
Yes, if you simply suspend your laptop on most stock Linux distributions, then everything including the master key is still kept in memory. But Debian pioneered the (optional) cryptsetup-suspend addon. This issues a luksSuspend command which is supposed to wipe the key from memory, and on resume asks you to resupply your passphrase.

Up to kernel 6.8, this worked as described; starting with kernel 6.9, it silently didn't.

naturalmovement|26 minutes ago
FYI: VeraCrypt is not the defacto encryption software for Windows.
IngoBlechschmid|25 minutes ago
Oh, which one is it?

(You don't mean BitLocker, right?)

naturalmovement|22 minutes ago
It absolutely is and they have most the enterprise market.
IngoBlechschmid|5 minutes ago
Okay, yes, sure. It definitely is the most-used encryption software for Windows.

But I would never trust it a second, being property and known for issues. You likely know that, but for the benefit of others:

38C3 - Windows BitLocker: Screwed without a Screwdriver https://media.ccc.de/v/38c3-windows-bitlocker-screwed-withou... https://www.youtube.com/watch?v=5eNtT2p12cM

nacs|9 minutes ago
Reminder that by using Bitlocker, you're using a closed source encryption for which Microsoft will happily hand out your recovery key on request.

https://www.forbes.com/sites/thomasbrewster/2026/01/22/micro...

andrewpiroli|1 minute ago
Only if you store your key with Microsoft, which is not required or the default if you're using a local account which I assume most privacy sensitive people are.
philipallstar|3 minutes ago
Does that mean it's not the de facto standard on Windows?
john_strinlai|3 minutes ago
for enterprises, where this doesn't really matter, bitlocker is great.
CodesInChaos|35 minutes ago
I don't have to re-enter my boot password after Sleep, so obviously the encryption key is still in memory.
wrs|31 minutes ago
Obviously your distro isn’t using cryptsetup-luksSuspend.
deng|10 minutes ago
> Except that, for more than two years, the encryption key remained resident in memory across suspend, leaving it there for the taking by anyone who seized the still-powered laptop.

I don't get it. Obviously, the laptop is locked when it resumes, how is that key "for the taking by anyone"? I'm not saying it is impossible to read out RAM from a locked laptop, but surely not by "anyone".

naturalmovement|33 minutes ago
Definitely not a symptom of Linux being a hodgepodge of code thrown together from a thousand different sources and no one person could tell you how it all fits.
cevn|19 minutes ago
Bugs happen in all code. The difference is, anyone can fix stuff in open source. Closed source bugs are out of control and must be worked around. Usually by switching to OSS
steve918|23 minutes ago
I wonder if you think other OSes are any different?

TempleOS is the only thing that comes to mind that doesn't fit your description and it's not practically useful.

Any sufficiently large codebase is a mix of ideas and concepts implemented by different people with different priorities over a large timespan and if you can fit the entire thing in your head it's not very interesting or complex.

IngoBlechschmid|1 minute ago
Qubes OS, the Linux distribution aspiring to offer a reasonably secure operating system, pioneering a "every app runs in a virtual machine" approach in the Linux laptop/desktop space, tracks this at the following issue:

https://github.com/QubesOS/qubes-issues/issues/2890

naturalmovement|19 minutes ago
The *BSDs, Mac, and Windows all keep critical code in the same tree as the OS.

Something like disk encryption would be immediately visible.

So you don't have this mess of 80 different distros with 60 different versions of systemd, 20 that don't use it, a million kernel versions and it's all thrown together in a Costco-sized trash bag and we call the output "Linux".

yaris|8 minutes ago
In my experience any software system (not just operating system) after crossing a certain limit on complexity and age looks exactly as hodgepodge of code pieces thrown together, sometimes from different sources even if developed by one org. All major OSs have long crossed those limits, I believe.
stackghost|23 minutes ago
Of course it's (indirectly) a symptom of that.

What's the alternative? Proprietary closed-source operating systems owned by corps who can be compelled to insert covert backdoors?

If BSD was as popular as Linux it would have the exact same problems.