Skip to content

Use unguessable UUID pipeline ids to prevent spoofing #10542

Open

Description

@Manishearth

See also: http://logs.glob.uno/?c=mozilla%23servo#c404439

A compromised iframe process can pretend to be any iframe/pipeline when talking to the constellation, since the constellation channels are shared. This could be used to escalate access out of the sandboxed iframe.

This can either be fixed by separating out the constellation channels (would require selecting over a ton of channels and probably is inefficient), or by making the pipeline id unguessable (currently a u64 counter). A 128-bit uuid should be enough.

Activity

  1. Manishearth commented on Apr 12, 2016

    @Manishearth
    MemberAuthor

    This should also prevent spoofing when talking to the resource thread, so that cookies can't be stolen. (The resource thread in turn should not rely on messages sent to it to know the origin, it should instead rely on a mapping of secure pipeline ids and origins that is stored somewhere in the chrome process.)

    Edit: This can't happen, the resource task won't attach origins to the wrong request.

  2. Manishearth commented on Apr 12, 2016

    @Manishearth
    MemberAuthor

    <ajeffrey> ManishCloud: we may wish to separate the notion of pipeline_id from pipeline_authenticating_super_secret

  3. Manishearth commented on Apr 18, 2016

    @Manishearth
    MemberAuthor

    Edit: This can't happen, the resource task won't attach origins to the wrong request.

    Actually, yes it can happen, because anyone can send a GetCookiesForUrl message and get whatever cookie they want. Forgot about that message.

  4. asajeffrey commented on Apr 18, 2016

    @asajeffrey
    Contributor

    Ah, oops. So if an attacker can work out how to send a GetCookiesForUrl message, then they can get access to arbitrary cookies. Not good.

  5. Manishearth commented on Apr 18, 2016

    @Manishearth
    MemberAuthor

    Also, currently script handles CORS, so a compromised script thread can bypass CORS and read/make arbitrary http requests on behalf of the user with cookies. Given that they can anyway get the cookies through GetCookiesForUrl, this is just an additional attack vector for the same vulnerability.

    When we switch to fetch CORS should be handled by the resource task, so that vector should get fixed.

  6. pwnorbitals commented on Nov 22, 2020

    @pwnorbitals

    I agree this is an important issue. How would one help this issue make progress ?

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions