Closed
Bug 1371863
Opened 8 years ago
Closed 8 years ago
Questionable looking calls to UnwrapReflectorToISupports()
Categories
(Core :: XPConnect, enhancement, P1)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla56
People
(Reporter: mccr8, Assigned: bzbarsky)
References
Details
(Keywords: sec-audit, Whiteboard: [adv-main55-][adv-esr52.3-][post-critsmash-triage])
UnwrapReflectorToISupports calls CheckedUnwrap, but does not root the output. It then extracts a native from the output. Some of the callers, such as UnwrapArgImpl, call QI on the result without rooting it. I don't know if that is possibly dangerous.
Reporter | ||
Updated•8 years ago
|
See Also: → CVE-2017-7801
Assignee | ||
Comment 1•8 years ago
|
||
Yes, that's dangerous. I'll fix at least some of these over in bug 1371259.
Depends on: CVE-2017-7801
Assignee | ||
Comment 2•8 years ago
|
||
So what really bothers me about this is that this function, and nsXPConnect::GetNativeOfWrapper, are more or less footguns in their current form. And I'm not sure how to best make them not be footguns. :(
Reporter | ||
Comment 3•8 years ago
|
||
You could make it return already_AddRefed<nsISupports>. (Or the more modern nsCOMPtr<nsISupports>) That's how most of the callers use it.
Assignee | ||
Comment 4•8 years ago
|
||
Hmm. I was going to say I though it would be a perf problem, but it might not be one. I'll look through the callers carefully to make sure...
Comment 5•8 years ago
|
||
I'm giving this to you, Boris, but I know you're working on this mostly in another bug. If this one isn't covered there, please let me know. Thanks.
Assignee: nobody → bzbarsky
Priority: -- → P1
Assignee | ||
Comment 7•8 years ago
|
||
The other bug completely fixes this one; it implements the suggestion from comment 3.
Assignee | ||
Comment 8•8 years ago
|
||
Fixed by bug 1371259.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Group: dom-core-security → core-security-release
Updated•8 years ago
|
status-firefox54:
--- → wontfix
status-firefox55:
--- → fixed
status-firefox56:
--- → fixed
status-firefox-esr52:
--- → fixed
Target Milestone: --- → mozilla56
Updated•8 years ago
|
tracking-firefox-esr52:
--- → 55+
Whiteboard: [adv-main55-][adv-esr52.3-]
Updated•8 years ago
|
Flags: qe-verify-
Whiteboard: [adv-main55-][adv-esr52.3-] → [adv-main55-][adv-esr52.3-][post-critsmash-triage]
Updated•7 years ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•