Closed
Bug 1005578
Opened 11 years ago
Closed 11 years ago
nsStandardURL::SetHost called net_ToLowerCase with a bogus pointer, #2
Categories
(Core :: Networking, defect)
Tracking
()
VERIFIED
FIXED
mozilla32
People
(Reporter: jruderman, Assigned: valentin)
References
(Blocks 1 open bug)
Details
(Keywords: crash, sec-critical, testcase, Whiteboard: [adv-main30+])
Crash Data
Attachments
(3 files)
304 bytes,
text/html
|
Details | |
10.92 KB,
text/plain
|
Details | |
773 bytes,
patch
|
bzbarsky
:
review+
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
abillings
:
sec-approval+
|
Details | Diff | Splinter Review |
Same symptoms as bug 991471, different testcase.
Reporter | ||
Comment 1•11 years ago
|
||
Reporter | ||
Updated•11 years ago
|
Crash Signature: [@ net_ToLowerCase(char*, unsigned int) ]
Assignee | ||
Comment 2•11 years ago
|
||
Ok, so the problem here is as follows:
var url = new URL("http://mozilla.org/"); // creates an nsStandardURL object
url.href = "javascript: 5";
// it first checks that ioService->NewURI(href,...) succeeds. It does.
// then it does aRv = mURI->SetSpec(href); This fails, as mURI is nsStandardURL, not a nsJSURI
// so all of the parameters in the nsStandardURL object get cleared
url.hostname = "allizom.org";
// tries to set the hostname, but the url is missing everything, including a scheme. From here we have a bad offset and crash.
Assignee | ||
Comment 3•11 years ago
|
||
According to the spec, we should discard the old url object when calling url.href
http://url.spec.whatwg.org/#concept-uu-set-the-input
Assignee: nobody → valentin.gosu
Status: NEW → ASSIGNED
Attachment #8417035 -
Flags: review?(bzbarsky)
Reporter | ||
Updated•11 years ago
|
Group: core-security
Whiteboard: crash, sec-critical, testcase
![]() |
||
Comment 4•11 years ago
|
||
Comment on attachment 8417035 [details] [diff] [review]
url_crash.patch
Yeah, makes sense.
Attachment #8417035 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Comment on attachment 8417035 [details] [diff] [review]
url_crash.patch
[Security approval request comment]
How easily could an exploit be constructed based on the patch?
The changes made in the patch don't immediately reveal the vulnerability. It would be very difficult to create an exploit based on this patch.
Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?
The comment does say what the problem is, and it might need to be changed.
Which older supported branches are affected by this flaw?
All branches are affected.
Do you have backports for the affected branches? If not, how different, hard to create, and risky will they be?
It should be easy to apply this patch on all branches.
How likely is this patch to cause regressions; how much testing does it need?
Attachment #8417035 -
Flags: sec-approval?
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Valentin Gosu [:valentin] from comment #5)
> How likely is this patch to cause regressions; how much testing does it need?
Unlikely. Not a risky change, and it is the specified behavior in the spec.
Updated•11 years ago
|
status-b2g18:
--- → wontfix
status-b2g-v1.1hd:
--- → wontfix
status-b2g-v1.2:
--- → wontfix
status-b2g-v1.3:
--- → affected
status-b2g-v1.3T:
--- → affected
status-b2g-v1.4:
--- → affected
status-b2g-v2.0:
--- → affected
status-firefox29:
--- → wontfix
status-firefox30:
--- → affected
status-firefox31:
--- → affected
status-firefox32:
--- → affected
status-firefox-esr24:
--- → affected
tracking-firefox32:
--- → +
Comment 7•11 years ago
|
||
Comment on attachment 8417035 [details] [diff] [review]
url_crash.patch
sec-approval+ for trunk.
Please create Aurora, Beta, and ESR24 patches and nominate them once it is in trunk.
Attachment #8417035 -
Flags: sec-approval? → sec-approval+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/2ffa88afe433
Please request Aurora/Beta/ESR24 approval on this ASAP to expedite it being uplifted everywhere else it needs to go.
Keywords: checkin-needed
Assignee | ||
Comment 9•11 years ago
|
||
It seems I misread the output of hg log, and that the error was actually introduced by http://hg.mozilla.org/mozilla-central/rev/f2199d73aef6
ESR24 is not affected.
Assignee | ||
Comment 10•11 years ago
|
||
Comment on attachment 8417035 [details] [diff] [review]
url_crash.patch
[Approval Request Comment]
Issue caused by (bug #): Bug 887364
User impact if declined: Security concerns
Testing completed (on m-c, etc.): on m-c
Risk to taking this patch (and alternatives if risky): low
String or IDL/UUID changes made by this patch: none
Attachment #8417035 -
Flags: approval-mozilla-beta?
Attachment #8417035 -
Flags: approval-mozilla-aurora?
Comment 11•11 years ago
|
||
Comment on attachment 8417035 [details] [diff] [review]
url_crash.patch
Valentin, don't hesitate to be a bit more verbose next time ;)
Attachment #8417035 -
Flags: approval-mozilla-beta?
Attachment #8417035 -
Flags: approval-mozilla-beta+
Attachment #8417035 -
Flags: approval-mozilla-aurora?
Attachment #8417035 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 12•11 years ago
|
||
(In reply to Sylvestre Ledru [:sylvestre] from comment #11)
> Valentin, don't hesitate to be a bit more verbose next time ;)
Thanks! I will :)
Comment 13•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Comment 14•11 years ago
|
||
Comment 15•11 years ago
|
||
Updated•11 years ago
|
Whiteboard: [adv-main30+]
Reporter | ||
Updated•11 years ago
|
Blocks: fuzz-urlutils
Comment 16•11 years ago
|
||
Confirmed crash on 2014-04-21, debug build of Fx30.
Verified fixed 2014-06-03, ASan builds of Fx30, Fx31 and Fx32.
Status: RESOLVED → VERIFIED
Comment 17•11 years ago
|
||
Applied ontop of a relbranch for SeaMonkey 2.26.1 (Gecko 29 based):
https://hg.mozilla.org/releases/mozilla-release/rev/908f619b9122
status-seamonkey2.26:
--- → fixed
Updated•10 years ago
|
Group: core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•