Ad

CVE-2026-93243

NONE EPSS 0.25%
Обновлено 30 октября 2026
Linux
Параметр Значение
Поставщик Linux
Публичный эксплойт Нет

В ядре Linux была устранена следующая уязвимость: mm/secretmem: правильно блокировать закрытые страницы secretmem accounts folios, обрабатывая память так, как если бы она была mlock()'d и, таким образом, ограничена лимитом RLIMIT_MEMLOCK. Однако фолианты являются неожидаемыми и остаются таковыми до тех пор, пока не будет удален inode, устраняя обычную mlock() семантику - отображение фолиантов, а затем их разобрание не очищает их неожидаемое состояние, поскольку это зависит от AS_UNEVICTABLE, а не PG_mlocked. Таким образом, пользователь может легко обойти ограничение RLIMIT_MEMLOCK - просто отобразить карту, а VmLck больше не считает диапазон секретем.

Хуже того, фолианты не учитываются в RSS процесса, а это означает, что убийца OOM не будет знать, чтобы убить процесс. Многократное отображение/разблокирование (или разветвление) может затем привести к потреблению всей доступной системной памяти с неожидаемыми фолиантами и вызвать нестабильность системы. Secretmem fd может передаваться между процессами и форком, поэтому ограничение на каждый процесс просто не имеет смысла, поэтому следуйте прецеденту, установленному io_uring, perf, skbuff, iommufd и xdp, отслеживая количество заблокированных страниц в user_struct->locked_vm.

Поскольку отслеживаемый объем фактически является временем жизни inode, RLIMIT_MEMLOCK применяется для каждого пользователя, а не для каждого процесса, поэтому нет смысла обходить пользователей с CAP_IPC_LOCK, поэтому удаляйте этот обход. Просто нет причин продолжать маркировать отображение как mlock()'d, поскольку это вводит в заблуждение, и жизненный цикл теперь корректно обработан, поэтому удалите это тоже. 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.

Новый тест будет отправлен отдельно для upstream.

Показать оригинальное описание (EN)

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.