Skip to content

deps: V8: cherry-pick 1158ae719749#64432

Open
Renegade334 wants to merge 1 commit into
nodejs:mainfrom
Renegade334:v8-wasm-longjmp-cet
Open

deps: V8: cherry-pick 1158ae719749#64432
Renegade334 wants to merge 1 commit into
nodejs:mainfrom
Renegade334:v8-wasm-longjmp-cet

Conversation

@Renegade334

Copy link
Copy Markdown
Member

Lands cleanly, and is zero-impact for standard (non-CET) builds.

@VlkrS: are you in a position to test a V8_ENABLE_CET_IBT build?

Fixes: #64424

Original commit message:

    [wasm] Fix jump table slot overflow on x64 with CET enabled

    JumpTableAssembler::EmitJumpSlot for x64 was advancing the PC before
    checking if the target was reachable via a 32-bit displacement when CET
    was enabled. This caused a slot overflow when the far-jump fallback was
    triggered, as the second attempt to emit the slot would start at an
    incorrect offset.

    This CL ensures that the displacement check is performed before any
    instructions are emitted, making the function side-effect-free on
    failure. It also introduces kJumpTableSlotEntryMarkerSize to clarify
    the displacement calculation, following the pattern used on ARM64.

    Reported-by: Fabien Romano <fabienromano@gmail.com>

    TAG=agy
    R=jkummerow@chromium.org

    Fixed: 532112743
    Change-Id: Iaf6f15b51a66a45711e8556972ac0d353e6117c7
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8063803
    Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#108556}

Refs: v8/v8@1158ae7
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. labels Jul 11, 2026
@VlkrS

VlkrS commented Jul 11, 2026

Copy link
Copy Markdown

Lands cleanly, and is zero-impact for standard (non-CET) builds.

@VlkrS: are you in a position to test a V8_ENABLE_CET_IBT build?

Fixes: #64424

Yes, albeit only on OpenBSD. With the diff applied manually, node 24.x builds and works (I can test node 26.x as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WASM far-jump crashes on x64 with CET enabled

4 participants