Closed
Bug 829619
Opened 12 years ago
Closed 8 years ago
Validate "Webapps:RegisterForMessages/UnregisterForMessages" in the parent process
Categories
(Core Graveyard :: DOM: Apps, defect)
Core Graveyard
DOM: Apps
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: airpingu, Unassigned)
References
Details
(quoting Paul from bug 820206, comment #1)
--------------------------------------------------
Webapps:RegisterForMessages
Webapps.js uses this to register for specific messages, but there is no check in the parent as to what messages are being listened for. I am not sure if this is an issue - would there be any benefit to the child to be able add itself as a listener for arbitrary messages (perhaps to intercept sensitive messages?)
(quoting Jonas from bug 820206, comment #45)
--------------------------------------------------
Ah, now I see what's going on here. I *think* that we are fine here as long as all message listening is managed on a per-childprocess basis (or per-application basis).
Comment 1•12 years ago
|
||
koi? since it blocks bug 820202 but we don't usually block on meta bugs.
blocking-b2g: --- → koi?
Comment 4•12 years ago
|
||
No, it's a platform issue. It's not even obvious that we have something to fix here.
Reporter | ||
Comment 5•12 years ago
|
||
+1 with Fabrice. This bug just highlight a potential security issue instead of a critical blocker. I'd suggest it's not really necessary to put it in the V1.2.
I think an easy solution is to let the 'Webapps:RegisterForMessages' message carry manifestURL and do the following check in the parent:
receiveMessage: function receiveMessage(aMessage) {
if (aMessage.name == Webapps:RegisterForMessages &&
!aMessage.target.assertContainApp(aMessage.json.manifestURL)) {
debug("Got message from a child process containing illegal manifest URL.");
return null;
}
}
In this way, if any bad child wants to hack the 'Webapps:RegisterForMessages' message for other good child, the parent will stop that.
However, the bad child can still have chance to register messages for itself. Just like Jonas mentioned at comment #0, if side-effects would just happen on the bad child, then we don't need to worry about that. The current messages a bad child can register for are:
"Webapps:Install:Return:OK"
"Webapps:Uninstall:Return:OK"
"Webapps:Uninstall:Broadcast:Return:OK
"Webapps:OfflineCache"
"Webapps:PackageEvent"
"Webapps:CheckForUpdate:Return:OK"
Do they really sound dangerous?
Flags: needinfo?(gene.lian)
Comment 6•12 years ago
|
||
(In reply to Gene Lian [:gene] from comment #5)
> "Webapps:Install:Return:OK"
> "Webapps:Uninstall:Return:OK"
> "Webapps:Uninstall:Broadcast:Return:OK
> "Webapps:OfflineCache"
> "Webapps:PackageEvent"
> "Webapps:CheckForUpdate:Return:OK"
>
> Do they really sound dangerous?
They can all be used to know which apps the user has installed, so there can be privacy issues. Your mitigation sounds reasonable though even if not perfect.
Comment 7•12 years ago
|
||
(In reply to Gene Lian [:gene] from comment #5)
> +1 with Fabrice. This bug just highlight a potential security issue instead
> of a critical blocker. I'd suggest it's not really necessary to put it in
> the V1.2.
Okay, I'll remove koi?. Please feel free to re-nom for whatever release is appropriate.
blocking-b2g: koi? → ---
Updated•12 years ago
|
Flags: needinfo?(jcheng)
Updated•8 years ago
|
Product: Core → Core Graveyard
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•