I warned a while ago on Rawhide about this but never received an answer:
Oct 21 16:50:32 djikstra oo7-daemon[3081]: 2026-10-21T14:50:32.835104Z WARN oo7_daemon::capability: No process capabilities; relying on RLIMIT_MEMLOCK to lock memory
Oct 21 16:50:32 djikstra oo7-daemon[3081]: 2026-10-21T14:50:32.835121Z WARN oo7_daemon::capability: Failed to lock memory pages (secrets may be swapped to disk): Cannot allocate memory (os
Since we are migrating to this new secrets vault for Fedora 45, it would be nice to ensure these warnings are either inconsequential or dealt with.
I can confirm the same memory-locking warning on a Fedora 45 COSMIC installation running oo7 0.7.0 beta.
Environment:
Fedora 45 COSMIC
oo7 0.7.0 beta (e91b98a)
systemd 262.1
oo7 running as a systemd user service
The daemon reports:
No process capabilities; relying on RLIMIT_MEMLOCK to lock memory
Failed to lock memory pages (secrets may be swapped to disk): Cannot allocate memory (os error 12)
I checked the effective limits and memory usage of the running daemon.
Process limits:
Max locked memory 8388608 8388608 bytes
systemd reports:
LimitMEMLOCK=8388608
LimitMEMLOCKSoft=8388608
Process capabilities:
CAP_IPC_LOCK is present in the bounding set, but absent from both the effective and permitted capability sets.
As expected, no memory is currently locked (VmLck: 0 kB).
The system uses zram for swap:
NAME TYPE SIZE USED PRIO
/dev/zram0 partition 8G 0B 100
No swap space was in use when these measurements were taken.
Questions:
Is using mlockall(MCL_CURRENT | MCL_FUTURE) intentional, so that the entire daemon process (including future memory allocations) must be locked?
What RLIMIT_MEMLOCK value is actually recommended for oo7?
Is granting CAP_IPC_LOCK the intended solution, or should the systemd service use a different configuration?
Would it be preferable to lock only the memory regions containing sensitive data rather than the entire process address space?
I have not changed the service configuration or increased the memory-locking limit. I would prefer to follow the recommended security configuration rather than grant additional privileges or impose an unlimited memory-locking limit without understanding the requirements.
The issue is that if the oo7 program is swapped out, someone may later be able to extract your secret information from the swap file or swap partitions.
If you set up swap to use /dev/zram0, then the secret is not available in that way. If you need a swap partition, you can set up an encrypted swap partition and you are then protected that way, also when other programs handling confidential information are swapped out.
I fully agree.
And Fedora does use /dev/zram0 so in that sense this is not at all a severe issue right now.
Maybe it would be enough to give this info in the warning messages instead of just saying that locking is unsucessful. Let’s see what the answer is in bugzilla.
There are APIs that a program like oo7 can use to prevent the secrets being swapped. Every OS has these APIs these days, linux, Windows, macOS, etc.
So this attack should not be possible for a well written secrets app.
That’s the point precisely. oo7 seems to use them but the request is rejected due to the way the service and opsys policies are defined. Hence the warning
Paging of the executable code doesn’t reveal any secrets, so why lock that into memory? Executable code doesn’t go to swap anyway as it can be reloaded from the program file.