VYPR
Unrated severityNVD Advisory· Published Feb 14, 2026· Updated Apr 15, 2026

CVE-2026-23177

CVE-2026-23177

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.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A race condition in Linux kernel's shmem truncate can cause an infinite loop when truncating large swap entries due to misaligned indices.

Vulnerability

In the Linux kernel's shmem (shared memory) filesystem, a race condition during truncate operations can lead to an infinite loop. The bug occurs in shmem_free_swap() when handling large swap entries. When find_get_entries() returns a large swap entry whose base index is smaller than the requested index due to alignment, shmem_free_swap() fails because of a mismatch check. The subsequent retry logic does not adjust the index to the entry's base, causing the same entry to be returned repeatedly, resulting in an infinite loop [1].

Exploitation

An attacker would need the ability to trigger truncate operations on shared memory regions that contain large swap entries. This likely requires local access to the system and the ability to create and manipulate huge pages with swap backing. The race is triggered without any special privileges beyond those needed to perform truncation on shmem files.

Impact

Successful exploitation leads to a denial of service (DoS) condition—specifically, a soft lockup or kernel hang due to an infinite loop in the truncate path. This can render the system unresponsive or cause it to crash.

Mitigation

The issue was addressed in a commit to the Linux kernel stable tree [1]. System administrators are advised to apply the patch from the referenced commit or update to a kernel version that includes the fix. No workaround is documented.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

3

News mentions

0

No linked articles in our index yet.