Description
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 RLIMIT_MEMLOCK 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
AS_UNEVICTABLE, not PG_mlocked.

A user can therefore easily work around the RLIMIT_MEMLOCK 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 io_uring, perf, skbuff, iommufd and xdp by tracking the number of
locked pages in user_struct->locked_vm.

Since the scope tracked is actually inode lifetime, the RLIMIT_MEMLOCK
applies per-user not per-process, so it doesn't make sense to bypass for
users with CAP_IPC_LOCK, 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.

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

test_mlock_limit() asserts mlock_future_ok() on mmap(), however this has
been removed, so remove the test altogether for the fix. A new test will
be sent separately for upstream.
Published: 2026-09-24
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service via memory exhaustion
Action: Apply patch
AI Analysis

Impact

Secretmem pages are treated as if they were mlocked by the kernel, but the folios remain unevictable and their unevictable state is not cleared on unmapping. Mapping and then unmapping a secretmem region does not enforce the RLIMIT_MEMLOCK limit, and the folios are not accounted for in the process RSS. A user can repeatedly map and unmap secretmem, causing all available system memory to be consumed with unevictable folios while the OOM killer remains unaware, potentially leading to system instability.

Affected Systems

All Linux kernel installations that include the secretmem feature are affected, regardless of distribution. The vulnerability exists in any kernel version where secretmem tracks folios as mlocked without removing the unevictable flag on unmapping. No specific vendor or version was noted, so any platform deploying a Linux kernel with secretmem support could be impacted.

Risk and Exploitability

No CVSS score is supplied, EPSS is unavailable, and the issue is not listed in the CISA KEV catalog. The attack surface is local; a user capable of creating or accessing a secretmem file descriptor can leverage the flaw by performing repeated map/unmap cycles. Because the memory cannot be reclaimed and remains unseen by the OOM killer, the exploitation can lead to denial of service at the system level. The likelihood of exploitation is moderate: it requires the attacker to locate a secretmem region, but once discovered the impact is severe.

Generated by OpenCVE AI on September 25, 2026 at 11:07 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel patch that removes the incorrect mlock accounting for secretmem and tracks locked pages correctly.
  • Reboot the system to load the updated kernel so that secretmem handling is fixed.
  • Where possible limit users from creating or using secretmem file descriptors by disabling the feature or restricting CAP_IPC_LOCK through system policy.

Generated by OpenCVE AI on September 25, 2026 at 11:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 15 Oct 2026 13:30:00 +0000


Fri, 25 Sep 2026 11:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-400

Thu, 24 Sep 2026 15:45:00 +0000

Type Values Removed Values Added
Description 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 RLIMIT_MEMLOCK 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 AS_UNEVICTABLE, not PG_mlocked. A user can therefore easily work around the RLIMIT_MEMLOCK 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 io_uring, perf, skbuff, iommufd and xdp by tracking the number of locked pages in user_struct->locked_vm. Since the scope tracked is actually inode lifetime, the RLIMIT_MEMLOCK applies per-user not per-process, so it doesn't make sense to bypass for users with CAP_IPC_LOCK, 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. __secretmem_account_pages() is more or less a duplicate of the code that io_uring etc. use, but since this is a bug fix that needs backporting, defer any de-duplication efforts to a follow-up. test_mlock_limit() asserts mlock_future_ok() on mmap(), however this has been removed, so remove the test altogether for the fix. A new test will be sent separately for upstream.
Title mm/secretmem: properly account locked pages
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-15T10:11:42.725Z

Reserved: 2026-09-17T16:02:15.095Z

Link: CVE-2026-93243

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-24T16:17:20.230

Modified: 2026-10-15T11:18:07.267

Link: CVE-2026-93243

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-25T11:15:05Z

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption