Skip to content

Consider adding an engine assertion to Module::wasm_to_array_trampoline #14046

Description

@alexcrichton

This is a follow-up to GHSA-hgjw-h833-99q9 and #14044 which wasn't originally included in the fix for the advisory due to complexity needed. The idea though is that it might be reasonable to have a defensive assertion in Module::wasm_to_array_trampoline to assert that the engine which the VMSharedTypeIndex comes from is indeed the same engine as the Module itself.

@fitzgen one possible idea I just had from the original implementation you had was that we could perhaps store an "Engine ID" inside of a ModuleRegistry to avoid threading &Engine to a whole bunch of new places if that causes problems. That'd be easier than storing the entire engine itself in there.

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