Skip to content

Charge syscall gas inside wasm instrumentation #1153

Closed
@Stebalien

Description

@Stebalien

Currently, we charge a flat "syscall" gas on every syscall here:

charge_syscall_gas!(data.kernel);

However, we should be charging this gas before making the syscall to avoid letting an attacker perform an operation where it can't quite cover the gas.

Right now, it's not really an issue because we can only run into this situation once per message. However, with gas limits on internal sends (#966), it may be possible to trigger this multiple times.

Of course, it's not a huge issue because an attacker could only do this once per send, but it's still something we should look into.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions