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

Security: Make isolates resilient in the face of malformed messages #1747

Closed
turnidge opened this issue Feb 17, 2012 · 19 comments
Closed

Security: Make isolates resilient in the face of malformed messages #1747

turnidge opened this issue Feb 17, 2012 · 19 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-isolate type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) type-security

Comments

@turnidge
Copy link
Contributor

If an attacker is able to specify the raw stream of a serialized message (e.g. when a receive port is bound to a tcp port) and the message is read in Snapshot::SetupFromMemory, security problems can occur:
Missing check for length
Potentially missing checks for type (kind) of message (should be restricted to kMessage)

Once first security checks are implemented, the functionality should be fuzzed
If a malformed message is detected, the message potentially can be dropped

Reviewer also suggests this...

Snapshots should be redesigned so that code (type code) and data (type message) are treated differently

...but I'm not sure that this is an issue for us.

@iposva-google
Copy link
Contributor

Added Security label.

@sigmundch
Copy link
Member

Added Isolates label.

@iposva-google
Copy link
Contributor

Added this to the M1 milestone.

@turnidge
Copy link
Contributor Author

I am in the process of adding code to make all messages keep an external length, so we don't have to rely on the self-reported length of the messages. After this is done, I will hand this bug off to Siva.


cc @a-siva.
Set owner to @turnidge.
Added Started label.

@turnidge
Copy link
Contributor Author

I have added code that makes the VM pass along a trusted size with all messages.

Siva, I'm assigning this bug to you now. Can you make the message parsing itself resilient in the face of malformed input?


Set owner to @a-siva.

@turnidge
Copy link
Contributor Author

Removed this from the M1 milestone.
Added this to the M2 milestone.

@sigmundch
Copy link
Member

Added Library-Isolates label.

@sigmundch
Copy link
Member

Removed Isolates label.

@a-siva
Copy link
Contributor

a-siva commented Sep 11, 2012

Added Accepted label.

@iposva-google
Copy link
Contributor

Removed this from the M2 milestone.
Added this to the M3 milestone.

@dgrove
Copy link
Contributor

dgrove commented Jan 11, 2013

Added Library-Isolate label.

@dgrove
Copy link
Contributor

dgrove commented Jan 11, 2013

Removed Library-Isolates label.

@iposva-google
Copy link
Contributor

Removed this from the M3 milestone.
Added this to the M4 milestone.

@larsbak
Copy link

larsbak commented May 28, 2013

Removed this from the M4 milestone.
Added this to the M5 milestone.

@a-siva
Copy link
Contributor

a-siva commented Jun 4, 2013

Issue #0 has been merged into this issue.


cc @kasperl.

@iposva-google
Copy link
Contributor

Removed Priority-Medium label.
Added Priority-Unassigned label.

@iposva-google
Copy link
Contributor

Removed this from the M5 milestone.

@iposva-google
Copy link
Contributor

Currently there is no functionality to inject messages to the isolate from the outside (through TCP or raw Dart code). The only way is to deliver messages using the C based API and at that point you were already in C.

Siva, is there anything for us to do here in the short term?

@turnidge turnidge added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-security library-isolate labels Oct 21, 2013
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@mraleph
Copy link
Member

mraleph commented Mar 12, 2018

It does not seem like we are planning anything in this area. @a-siva please reopen if you think we would work on this.

@mraleph mraleph closed this as completed Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-isolate type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) type-security
Projects
None yet
Development

No branches or pull requests

8 participants