CVE-2026-93243: mm/secretmem: properly account locked pages

Published Sep 24, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

mm/secretmem: properly account locked pages

secretmem accounts folios by treating memory as if it were mlock()'d and thus limited by the RLIMITMEMLOCK limit.

However the folios are unevictable and remain so until the inode is evicted, eliminating usual mlock() semantics - mapping folios then unmapping them does not clear their unevictable state, since it depends on ASUNEVICTABLE, not PGmlocked.

A user can therefore easily work around the RLIMITMEMLOCK limit - simply map then unmap and VmLck no longer counts the secretmem range. Worse, folios are not accounted in the process's RSS, meaning the OOM killer won't know to kill the process.

Repeatedly mapping/unmapping (or forking) can then result in the consumption of all available system memory with unevictable folios and cause system instability.

A secretmem fd can be passed between processes and over fork so a per-process limit simply does not make sense, so follow the precedent set by iouring, perf, skbuff, iommufd and xdp by tracking the number of locked pages in userstruct->lockedvm.

Since the scope tracked is actually inode lifetime, the RLIMITMEMLOCK applies per-user not per-process, so it doesn't make sense to bypass for users with CAPIPCLOCK, therefore remove this bypass.

There is simply no reason to carry on marking the mapping as mlock()'d since it's misleading and the lifecycle is now correctly handled, so remove this too.

Note that secretmem does not support any form of truncation (including hole punching) and the folios are unreclaimable, so the folios need only be accounted on fault and unaccounted on inode destruction.

secretmemaccountpages() is more or less a duplicate of the code that iouring etc. use, but since this is a bug fix that needs backporting, defer any de-duplication efforts to a follow-up.

testmlocklimit() asserts mlockfutureok() on mmap(), however this has been removed, so remove the test altogether for the fix. A new test will be sent separately for upstream.

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 24, 2026
CVE Published
via MITRE·03:40 PM
Data Sourced
via MITRE·03:40 PM
Description
Data Sourced
via NVD·04:17 PM
Description

Frequently Asked Questions

1

Who can realistically trigger this issue?

A local user or process able to use secretmem can trigger it. The issue can also span processes because a secretmem file descriptor can be passed between processes and inherited across fork.

2

What does an attacker need to do to cause impact?

They need to repeatedly map and unmap secretmem memory, or fork processes holding secretmem mappings. This can bypass the intended RLIMIT_MEMLOCK restriction and accumulate unevictable memory.

3

What is the practical impact on a host?

Available system memory can be consumed by unevictable folios while the affected memory is not accounted in the process RSS. The OOM killer may therefore not select the responsible process, potentially causing system instability.

4

Does a per-process RLIMIT_MEMLOCK limit adequately contain this behavior?

No. Mapping and then unmapping can make the secretmem range no longer count in VmLck, and secretmem file descriptors can be shared or inherited, so a per-process limit does not match the lifetime of the allocated memory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203