CVE-2026-139055: ARM: imx: Fix suspend/resume crash with Clang CFI
In the Linux kernel, the following vulnerability has been resolved:
ARM: imx: Fix suspend/resume crash with Clang CFI
The suspend code that runs from OCRAM is copied there with fncpy(), which does not copy the kCFI type hash preceding the function. With CONFIGCFI=y the indirect call through imx6suspendinocramfn therefore panics.
Keep the call covered by CFI instead of exempting it:
- Add SYMTYPEDFUNCSTARTALIGNED(), a variant of SYMTYPEDFUNCSTART() that aligns the function entry rather than the type hash preceding it, and use it to declare imx6suspend(): fncpy() requires the entry point of the function it copies to be 8-byte aligned. The macro lives in arch/arm/include/asm/linkage.h since the requirement comes from arm's fncpy().
- Add a cfitype member at the end of struct imx6cpupminfo, which directly precedes the OCRAM copy of the function. It fits in the struct's tail padding, so no sizes or offsets change. Fill it using cfigetfunchash(), putting the hash where the caller's CFI check expects it: four bytes before the function entry.
Also mark ccmbase, suspendocrambase and imx6suspendinocramfn as roafterinit: they are only written during init, and the function pointer in particular should not be writable afterwards.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to the crash?
The affected path is in the ARM i.MX suspend implementation, specifically the imx6 suspend function copied into OCRAM. The described failure requires a kernel built with CONFIG_CFI=y.
When does the failure occur?
It occurs during suspend or resume when the kernel makes an indirect call through imx6_suspend_in_ocram_fn. The call can panic because the OCRAM copy made with fncpy() lacks the expected kCFI type hash.
Does this affect kernels built without Clang CFI?
The reported panic is specifically described for CONFIG_CFI=y. The provided information does not identify an equivalent failure for kernels without that configuration.
How can I recognize that a system is affected?
Look for a kernel panic during suspend or resume on an ARM i.MX system using CONFIG_CFI=y, involving the indirect call through imx6_suspend_in_ocram_fn. The failure is associated with the suspend function copied to OCRAM.