Linux kernel
cpe:2.3:a:linux:linux_kernel:*:*:*:*:*:*:*, +4 more
A vulnerability in the Linux kernel's memory management component, specifically within the shmem (shared memory) handling, can lead to an infinite loop during the truncation of large swap entries. This issue occurs when the swap entry's index alignment causes a mismatch, prompting the shmem_free_swap() function to return 0. The fallback mechanism, designed to prevent truncation of unexpected entries, fails to account for scenarios where the index falls in the middle of a large swap entry that does not extend across the end border. As a result, the system can enter a repetitive cycle of attempting to free the same swap entry without success, effectively causing a hang in the process.
The vulnerability creates an infinite loop, causing the system to hang while attempting to process swap entries, which can lead to performance degradation or unresponsiveness in applications that rely on the affected memory management features.
To reproduce this vulnerability, create a large swap entry that does not cross the end border. Then, initiate a truncation process that targets the middle of the swap entry. The shmem_free_swap() function will fail due to the index mismatch, triggering the fallback path that checks for end border crossings. Since the entry does not cross the border, the function will retry with the same index, leading to an infinite loop as the same entry is repeatedly processed without resolution.
The vulnerability has been addressed in the Linux kernel. Users should upgrade to the latest version where this issue has been fixed.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.