CVE-2026-143102: arm64: kexec_file: Do not use CMA for images with a non-zero text_offset
In the Linux kernel, the following vulnerability has been resolved:
arm64: kexecfile: Do not use CMA for images with a non-zero textoffset
imageload() adds textoffset to kernelsegment->mem and subtracts it from kernelsegment->memsz. For CMA backed segments this breaks the load path: the payload is copied to pageaddress(cma), which is the CMA base, while image->start is set to the adjusted address, so kexec jumps into the middle of the kernel. kimagemapsegment() has the same mismatch when a segment has been moved.
The adjusted memsz also breaks the release path: the CMA pages are freed using segment->memsz >> PAGESHIFT, which is fewer than were allocated, leaking the tail of the allocation.
Both problems are specific to CMA segments, which are accessed through pageaddress(cma) and ignore segment->mem. The normal load path uses segment->mem, so the textoffset adjustment stays consistent there. Keep honoring textoffset, but load such images from regular memory by setting image->nocma: they lose the CMA contiguous allocation, but keep working.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
For images with a non-zero text_offset, set image->no_cma so they are loaded from regular memory instead of CMA.
Linux kernel arm64 kexec_file image->no_cma = true