Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it secure? #2

Open
KOLANICH opened this issue Dec 10, 2018 · 1 comment
Open

Is it secure? #2

KOLANICH opened this issue Dec 10, 2018 · 1 comment

Comments

@KOLANICH
Copy link

https://github.com/WebAssembly/design/blob/master/Security.md

Although attackers cannot perform direct code injection attacks, it is possible to hijack the control flow of a module using code reuse attacks against indirect calls.

@vgrichina
Copy link
Contributor

Parser should be safe from buffer overruns as it's reads binary data from Uint8Buffer, which implements boundary checks:
https://github.com/AssemblyScript/assemblyscript/blob/master/std/assembly/internal/typedarray.ts#L50

However note that its would still result in crash (of WA guest), so depending on your app attacker can be doing denial of service attack by sending invalid BSON.

It's not a problem in case of smart contracts for https://github.com/nearprotocol/nearcore, cause they are expected to have short execution time and fail fast on errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@vgrichina @KOLANICH and others