CVE-2026-142849: xfarray: don't crash when sorting if array element crosses a folio
In the Linux kernel, the following vulnerability has been resolved:
xfarray: don't crash when sorting if array element crosses a folio
LOLLM points out that if an array element crosses a folio boundary, xfilegetfolio returns a NULL folio pointer. If this happens, si->folio is also set to NULL, and calling foliopos/folioaddress will just crash the kernel. Teach this function to handle this condition by falling back to reading the array element into scratchpad memory.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4
Event History
Frequently Asked Questions
What runtime condition is required for the crash to occur?
The failure occurs while sorting an xfarray when an array element crosses a folio boundary. In that condition, xfile_get_folio can return a NULL folio pointer, and subsequent folio_pos or folio_address calls can crash the kernel.
What does the resolved fix change?
The fix handles the missing folio condition by reading the array element into scratchpad memory instead of operating on the NULL folio pointer.