ExpandedPrincipal created through de-serialization doesn't call Create() which causes null crash
Categories
(Core :: Security: CAPS, enhancement)
Tracking
()
People
(Reporter: freddy, Assigned: jkt)
References
Details
Attachments
(2 files)
I thought I could always call GetOrigin()
on ExpandedPrincipals, but it turned out I found some null pointer crashes.
Here's why: We sometimes create ExpandedPrincipals through deserialization, which calls the constructor but does not call ExpandedPrincipal::Create()
. This leaves mOriginNoSuffix
unitialized and hence pointing to 0x0.
Steps To Repeat
- This will work current revisions of mozilla-central (e.g., 3dc7d345da52), but will stop working once I implement my workaround.
MOZ_LOG="CSMLog:5" ./mach mochitest --debugger=rr browser/components/extensions/test/browser/browser_ext_sessions_restoreTab.js
Reporter | ||
Comment 1•6 years ago
|
||
Reporter | ||
Comment 2•6 years ago
|
||
Honza, I'm told by ckerschb that you might be interested in this, since it would be caused by netwerk/base/nsSerializationHelper.cpp#46
Comment 3•6 years ago
|
||
I'm not sure why I should be interested in this, I am not involved in principals. Sorry.
Assignee | ||
Comment 4•6 years ago
|
||
This should be resolved in Bug 1508939 which I just put into lando. Bug 1547707 is a follow up that we should verify separately.
Assignee | ||
Updated•6 years ago
|
Comment 5•4 years ago
|
||
The problem described here was fixed when refactoring all of the principal serialization within Bug 1508939. Marking as a duplicate.
Description
•