CVE-2026-23177
Unknown Unknown - Not Provided
Infinite Loop Vulnerability in Linux Kernel shmem Swap Truncate

Publication date: 2026-02-14

Last updated on: 2026-02-14

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: mm, shmem: prevent infinite loop on truncate race When truncating a large swap entry, shmem_free_swap() returns 0 when the entry's index doesn't match the given index due to lookup alignment. The failure fallback path checks if the entry crosses the end border and aborts when it happens, so truncate won't erase an unexpected entry or range. But one scenario was ignored. When `index` points to the middle of a large swap entry, and the large swap entry doesn't go across the end border, find_get_entries() will return that large swap entry as the first item in the batch with `indices[0]` equal to `index`. The entry's base index will be smaller than `indices[0]`, so shmem_free_swap() will fail and return 0 due to the "base < index" check. The code will then call shmem_confirm_swap(), get the order, check if it crosses the END boundary (which it doesn't), and retry with the same index. The next iteration will find the same entry again at the same index with same indices, leading to an infinite loop. Fix this by retrying with a round-down index, and abort if the index is smaller than the truncate range.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-14
Last Modified
2026-02-14
Generated
2026-06-16
AI Q&A
2026-02-14
EPSS Evaluated
2026-06-15
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability exists in the Linux kernel's memory management subsystem related to shared memory swap entries (shmem). Specifically, when truncating a large swap entry, the function shmem_free_swap() can enter an infinite loop under certain conditions. This happens if the truncation index points to the middle of a large swap entry that does not cross the end boundary. The function repeatedly fails to free the swap entry due to a base index check and retries with the same index, causing an infinite loop.

The issue arises because the code does not properly handle the scenario where the index points inside a large swap entry, leading to repeated retries without progress. The fix involves retrying with a rounded-down index and aborting if the index becomes smaller than the truncate range, preventing the infinite loop.

Impact Analysis

This vulnerability can cause the Linux kernel to enter an infinite loop during the truncation of large swap entries in shared memory. This infinite loop can lead to system instability or a hang, potentially causing denial of service by making the system unresponsive or consuming excessive CPU resources.

Compliance Impact

I don't know

Detection Guidance

I don't know

Mitigation Strategies

I don't know

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-23177. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart