CVE-2026-139055

ARM: imx: Fix suspend/resume crash with Clang CFI

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
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
CONFIG_CFI=y the indirect call through imx6_suspend_in_ocram_fn
therefore panics.

Keep the call covered by CFI instead of exempting it:

- Add SYM_TYPED_FUNC_START_ALIGNED(), a variant of
SYM_TYPED_FUNC_START() that aligns the function entry rather than
the type hash preceding it, and use it to declare imx6_suspend():
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 cfi_type member at the end of struct imx6_cpu_pm_info, 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
cfi_get_func_hash(), putting the hash where the caller's CFI check
expects it: four bytes before the function entry.

Also mark ccm_base, suspend_ocram_base and imx6_suspend_in_ocram_fn
as __ro_after_init: they are only written during __init, and the
function pointer in particular should not be writable afterwards.

Analysis

AI-generated

Technical impact

A defect in the ARM i.MX suspend routine causes a crash when the suspend code is copied into on‑chip RAM by fncpy. The copy misses the CFI type hash that the compiler expects before the function entry. With CONFIG_CFI enabled the indirect call through the function pointer stored in OCRAM fails the CFI check and triggers a kernel panic, shutting down the system. The flaw is a failure to propagate integrity metadata needed for control‑flow integrity.

Affected Systems

The issue resides in the ARM i.MX family driver in the Linux kernel. All kernels that enable CONFIG_CFI and use the imx6 suspend path are vulnerable. The patch introduces an aligned function start marker and stores the CFI hash directly in the struct tail, ensuring the hash precedes the function in OCRAM. Versions prior to the patch commit are affected; no exact version list is provided.

Risk and Exploitability

Because the vulnerability leads directly to a system crash, its impact is high. An attacker with the ability to induce a suspend/resume transition—such as by manipulating power or USB events—could exploit the flaw to cause denial of service. EPSS is not available, and the vulnerability is already fixed in the kernel source, but it remains a kernel‑space issue that requires a local or privileged trigger.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest kernel update that includes the commit adding the aligned function start marker and cfi_type field.
  • If an immediate kernel update is not feasible, reconfigure the kernel to disable CONFIG_CFI or use a compiler that does not expose the CFI bug.
  • Until a patch is applied, avoid triggering ARM i.MX suspend/resume cycles by disabling or limiting suspend functionality.

Generated by OpenCVE AI on November 30, 2026 at 19:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-119
CWE-787
Type Values Removed Values Added
Description 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 CONFIG_CFI=y the indirect call through imx6_suspend_in_ocram_fn therefore panics. Keep the call covered by CFI instead of exempting it: - Add SYM_TYPED_FUNC_START_ALIGNED(), a variant of SYM_TYPED_FUNC_START() that aligns the function entry rather than the type hash preceding it, and use it to declare imx6_suspend(): 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 cfi_type member at the end of struct imx6_cpu_pm_info, 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 cfi_get_func_hash(), putting the hash where the caller's CFI check expects it: four bytes before the function entry. Also mark ccm_base, suspend_ocram_base and imx6_suspend_in_ocram_fn as __ro_after_init: they are only written during __init, and the function pointer in particular should not be writable afterwards.
Title ARM: imx: Fix suspend/resume crash with Clang CFI
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-787

    Out-of-bounds Write

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:27 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM