Closed Bug 1306300 Opened 8 years ago Closed 8 years ago

Crash in nsILoadContext::GetOriginAttributes

Categories

(Core :: DOM: Navigation, defect)

51 Branch
x86
Windows 10
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox49 --- wontfix
firefox-esr45 --- affected
firefox50 --- fixed
firefox51 --- fixed
firefox52 --- fixed

People

(Reporter: mayhemer, Assigned: smaug)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file, 1 obsolete file)

This bug was filed from the Socorro interface and is 
report bp-fdf5e255-a415-4186-8cdd-aa4042160929.
=============================================================

STR, not reliable:
- running Nightly (old heavy profile) as a default browser to open web links
- click an https (not sure about http may reproduce too) link in an external app (for me happens with Thunderbird, clicking a (trustworthy) emailed link)
=> instant crash

STR2, even less reliable:
- DXR page
- click an identifier
- right e.g. the "find callers" link
=> instant crash

nsILoadContext::GetOriginAttributes(mozilla::DocShellOriginAttributes&)
nsScriptSecurityManager::GetLoadContextCodebasePrincipal(nsIURI*, nsILoadContext*, nsIPrincipal**)
NS_InvokeByIndex

Not sure about addon influence, I didn't try safe more (and would like to avoid it unless really necessary.)
Assignee: nobody → bugs
Attached patch guess fix (obsolete) — Splinter Review
This will hopefully fix the crash, and then propagate the exception to JS side so that we can find who is passing the null context.
Attachment #8796226 - Flags: review?(amarchesini)
Attached patch better lookingSplinter Review
Attachment #8796226 - Attachment is obsolete: true
Attachment #8796226 - Flags: review?(amarchesini)
Attachment #8796227 - Flags: review?(amarchesini)
Attachment #8796227 - Flags: review?(amarchesini) → review+
Thanks Olli!
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/14d41b959f3a
null check nsILoadContext in GetLoadContextCodebasePrincipal, r=baku
Not sure if the frequency is high enough to warrant ESR45 consideration (though AFAICT, the issue goes back at least that far), but I'm thinking we could probably stand to at least take this on Aurora/Beta.
https://hg.mozilla.org/mozilla-central/rev/14d41b959f3a
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Hi Olli, given the one-line fix, should we uplift to Aurora51/Beta50? I see one instance of this signature on 50.0b1 and 50.0b5.
Flags: needinfo?(bugs)
Comment on attachment 8796227 [details] [diff] [review]
better looking

Approval Request Comment
[Feature/regressing bug #]: I think bug 1011024
[User impact if declined]: Crashes if some addon or browser chrome js passes null loadcontext
[Describe test coverage new/current, TreeHerder]: NA
[Risks and why]: Just a null check
[String/UUID change made/needed]: NA
Flags: needinfo?(bugs)
Attachment #8796227 - Flags: approval-mozilla-beta?
Attachment #8796227 - Flags: approval-mozilla-aurora?
Comment on attachment 8796227 [details] [diff] [review]
better looking

Crash fix, Aurora51+, Beta50+
Attachment #8796227 - Flags: approval-mozilla-beta?
Attachment #8796227 - Flags: approval-mozilla-beta+
Attachment #8796227 - Flags: approval-mozilla-aurora?
Attachment #8796227 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: