You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create a central repository of Origins that can be trusted #11722
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.
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.
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.
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?
Activity
aneeshusa commentedon Jun 11, 2016
Does #10808 (making PipelineIds into unguessable UUIDs) help with this, or would we still need separate pipeline passwords?
Manishearth commentedon Jun 11, 2016
Unguessable is enough. I had the mental model of a separate pipeline password, that's all.
izgzhen commentedon Jun 11, 2016
"pipeline password" is something concrete or just a concept?
Manishearth commentedon Jun 11, 2016
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.
gterzian commentedon Oct 24, 2019
This is now also relevant for messageports, which are identified by a
MessagePortId, similar in construction to aPipelineId, as well as aMessagePortRouterId, 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.
gterzian commentedon Oct 24, 2019
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.Ok so could we generate a UUID in the constellation, store it, and pass it along to
Pipeline::spawnand then send it along in each message on aScriptToConstellationChan?We could make the
script_receiver: Receiver<Result<(PipelineId, FromScriptMsg), IpcError>>,in the constellation into aReceiver<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?