Skip to content

Create a central repository of Origins that can be trusted #11722

Open

Description

@Manishearth

Right now, net blindly trusts requests from a script pipeline which say they are from a certain origin. This is wrong from the process isolation perspective.

Instead, a map of pipeline IDs to allowed origins should be kept in the chrome process, and origins sent from script should be checked against this.

Additionally, we may want a different origin struct, one which:

  • has the ability to support private browsing, with extra flags
  • which uses uuid instead of TLS for opaque origins

Note that for this to be totally secure we need some form of pipeline password only known to the relevant pipeline and chrome process, since right now pipeline ids can be guessed.

cc @izgzhen @asajeffrey

Activity

  1. added
    I-safety
    A-constellation
    on Jun 11, 2016
  2. aneeshusa commented on Jun 11, 2016

    @aneeshusa
    Contributor

    Does #10808 (making PipelineIds into unguessable UUIDs) help with this, or would we still need separate pipeline passwords?

  3. Manishearth commented on Jun 11, 2016

    @Manishearth
    MemberAuthor

    Unguessable is enough. I had the mental model of a separate pipeline password, that's all.

  4. izgzhen commented on Jun 11, 2016

    @izgzhen
    Contributor

    "pipeline password" is something concrete or just a concept?

  5. Manishearth commented on Jun 11, 2016

    @Manishearth
    MemberAuthor

    Right now pipeline ids are incremented integers. So if manish.com's content process wishes to steal facebook.com data, it can just iterate through pipeline ids until it finds the one corresponding to facebook, and send that across.

    There are two ways of fixing this. One way is to make pipeline ids unguessable; a uuid or something.

    The other is to keep pipeline ids as is (for easy indexing, etc), and have an associated pipeline password for each id. Only chrome knows all the passwords, otherwise each content process only knows its password. There is a slight advantage here in that pipeline ids can still be shared and freely, e.g. if a page wishes to refer to its child iframe, just that you check the password when you rely on the pipeline id for security things.

  6. gterzian commented on Oct 24, 2019

    @gterzian
    Member

    This is now also relevant for messageports, which are identified by a MessagePortId, similar in construction to a PipelineId, as well as a MessagePortRouterId, and these ids are used by the constellation to route messages across process.

    So it will be possible for a compromised script process to guess the relevants ids and trick the constellation into forwarding fake messages to ports in other processes.

  7. gterzian commented on Oct 24, 2019

    @gterzian
    Member

    Instead, a map of pipeline IDs to allowed origins should be kept in the chrome process, and origins sent from script should be checked against this.

    Each pipeline, stored in the constellation, currently has a ServoUrl, so in theory that could be used to check any origin sent inside a message coming from a specific pipeline.

    The other is to keep pipeline ids as is (for easy indexing, etc), and have an associated pipeline password for each id. Only chrome knows all the passwords, otherwise each content process only knows its password.

    Ok so could we generate a UUID in the constellation, store it, and pass it along to Pipeline::spawn and then send it along in each message on a ScriptToConstellationChan?

    We could make the script_receiver: Receiver<Result<(PipelineId, FromScriptMsg), IpcError>>, in the constellation into a Receiver<Result<(Uuid, PipelineId, FromScriptMsg), IpcError>>,

    The checking of origins would have to be message specific, since only certain messages comes with an origin. Or perhaps that is unnecessary if we were to check the password/UUID?

    By the way, if a process is comprised, could it not also simply get a hold of the UUID and send it along in otherwise fake messages? In other words, would a password not only tell us we're indeed talking with the expected process, although it might still be compromised?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-constellationI-safety

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions