Skip to content

Backport CVE-2026-24116 to release-27.0.0? (x64 fcopysign 128-bit load sink) #13232

@vulgraph

Description

@vulgraph

Hi — checking on release-27.0.0.

Upstream 728fa071 ("[40.0] Backport Cranelift: x64: fix incorrect load-sinking in copysign operator", CVE-2026-24116) appears not to have made it onto this branch.

Pre-fix fcopysign lowering still present in cranelift/codegen/src/isa/x64/lower.isle (sha a5b3330e):

(rule (lower (has_type $F32 (fcopysign a @ (value_type $F32) b)))
      (let ((sign_bit Xmm (imm $F32 0x80000000)))
        (x64_orps
          (x64_andnps sign_bit a)
          (x64_andps sign_bit b))))

The fix simply forces a and b into XMM registers before the bitwise ops so the f64.load can't sink-and-widen. Two small bindings plus regression tests.

Should I open a backport PR aligned to the upstream commit? Want to confirm the branch is still in scope first.

vulgraph

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions