Linux · Linux Kernel · CVE-2022-48797
**Name of the Vulnerable Software and Affected Versions**
Linux kernel (affected versions not specified)
**Description**
The issue is related to the Linux kernel's memory management, specifically with the NUMA balancing feature. Enabling NUMA balancing can cause corruption when used with certain test loads, such as Oded Gabbay's Gaudi accelerator test load, under specific conditions (e.g., without process affinity and using GUP to pin pages for DMA access). The problem arises from a nonsensical condition in the `change pte range()` function that uses `page mapcount(page)` to decide if a COW page should be NUMA-protected, which is irrelevant due to other references like GUP. The fix involves using `page count()` instead. This change implies that NUMA balancing may alter page protections, leading to spurious COW events.
**Recommendations**
To resolve the issue, apply the fix that changes the condition in `change pte range()` to use `page count()` instead of `page mapcount(page)`. As a temporary workaround, consider disabling NUMA balancing or using process affinity to bind to a specific numa-node until the patch is applied.