Oo7 unable to lock memory

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.

Can you please link the original bug report from bugzilla or upstream?

Additional diagnostics – Fedora 45 / oo7 0.7.0 beta

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.

Memory usage:

VmPeak:    496400 kB
VmSize:    496388 kB
VmLck:          0 kB
VmRSS:      13532 kB
VmData:     22672 kB

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:

  1. Is using mlockall(MCL_CURRENT | MCL_FUTURE) intentional, so that the entire daemon process (including future memory allocations) must be locked?
  2. What RLIMIT_MEMLOCK value is actually recommended for oo7?
  3. Is granting CAP_IPC_LOCK the intended solution, or should the systemd service use a different configuration?
  4. 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.

Thanks!

So that developers know there is a problem to fix you need to report in an appropiate bug tracker, this forum is not a bug tracker.

Please raise it in tne Fedora bugtracker first.

I just did.
It’s at 2572309 – oo7 issuing warning messages as it's unable to lock pages in memory

Thank you for the advice.

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.

Very good analysis!

To use mlockall would be silly unless the process is time critical and paging in would cause unacceptable delays.

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

Artur Ruta

El dj., 12 de nov. 2026, 12:53, Barry A Scott <notifications@fedoraproject.discoursemail.com> va escriure:

Paging of some parts of it will leak secrets unless paging is prevented.

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.

Agreed that is not required.

And that is what mlockall (see man mlockall) does. It locks in everything including code and data.

This needs a bug raised about the immediate issue and the saying the use mlockall seems wrong.