Closed Bug 1541161 Opened 6 years ago Closed 6 years ago

Crash in [@ mozilla::net::HttpBaseChannel::SetLoadInfo] due to Services.io.newChannelFromURI

Categories

(Core :: DOM: Security, defect, P1)

67 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox-esr60 --- unaffected
firefox66 --- unaffected
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: Oriol, Assigned: ckerschb)

References

(Regression)

Details

(Keywords: crash, regression, Whiteboard: [domsecurity-active])

Crash Data

Attachments

(1 file)

Open browser console and run

var uri = Services.io.newURI("http://example.com", null, null);
var channel = Services.io.newChannelFromURI(uri, null, null, null, null, null);

Result: crash. The assert added in bug 1533159 fails.
https://crash-stats.mozilla.org/report/index/f3db6df4-b9c0-489f-b462-5d4ba0190402
https://crash-stats.mozilla.org/report/index/ade3924e-e839-406e-88b6-867360190402

Just throw an error or something, crashing seems over the top.

No longer blocks: 1533159
Regressed by: 1533159
Keywords: regression

That's a fair point. I wonder if instead of MOZ_RELEASE_ASSERT we should use a

MOZ_DIAGNOSTIC_ASSERT(aLoadInfo);
if (!aLoadInfo) {
  return NS_ERROR_INVALID_ARG;
}

Also, in nsIOService::NewChannelFromURIWithProxyFlagsInternal we should probably do the same.

(In reply to Oriol Brufau [:Oriol] from comment #0)

Open browser console and run

var uri = Services.io.newURI("http://example.com", null, null);
var channel = Services.io.newChannelFromURI(uri, null, null, null, null, null);

While your point stands, I must point out that calling any Firefox internal code isn't guaranteed to not crash the browser :)

Yeah, that's probably a good idea after all - I'll incorporate that change.

Assignee: nobody → ckerschb
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [domsecurity-active]
Attachment #9055423 - Attachment description: Bug 1541161: Use MOZ_DIAGNOSTIC_ASSERT and return error in case aLoadinfo is null within setLoadinfo(). r=valentin → Bug 1541161: Use MOZ_DIAGNOSTIC_ASSERT and return error in loadinfo is null within NewChannelFromURIWithProxyFlagsInternal. r=valentin
Pushed by mozilla@christophkerschbaumer.com: https://hg.mozilla.org/integration/autoland/rev/6dfafa75ea1a Use MOZ_DIAGNOSTIC_ASSERT and return error in loadinfo is null within NewChannelFromURIWithProxyFlagsInternal. r=valentin
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Regressions: 1542037

Very low volume on beta and may have caused a different crash in 68, doesn't look like a good candidate for uplifting, marking as wontix for 67.

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: