Closed
Bug 1206362
Opened 10 years ago
Closed 10 years ago
Assertion failure: aParam >= 0, at c:/Users/mozilla/debug-builds/mozilla-central/dom/media/webaudio/AudioBufferSourceNode.cpp:122
Categories
(Core :: Web Audio, defect)
Tracking
()
RESOLVED
FIXED
mozilla44
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | unaffected |
| firefox43 | + | fixed |
| firefox44 | --- | fixed |
People
(Reporter: cbook, Assigned: karlt)
References
()
Details
(4 keywords, Whiteboard: [b2g-adv-main2.5-])
Attachments
(3 files)
|
183.87 KB,
text/plain
|
Details | |
|
1.60 KB,
patch
|
padenot
:
review+
|
Details | Diff | Splinter Review |
|
1.57 KB,
patch
|
padenot
:
review+
lizzard
:
approval-mozilla-aurora+
abillings
:
sec-approval+
|
Details | Diff | Splinter Review |
Found via bughunter and reproduced on windows 7 debug build.
Steps to reproduce:
Load: https://ru.wargaming.net/globalmap/#province/baymak
after a few seconds:
Assertion failure: aParam >= 0, at c:/Users/mozilla/debug-builds/mozilla-central/dom/media/webaudio/AudioBufferSourceNode.cpp:122
#01: `mozilla::AudioNodeStream::SetInt32Parameter'::`2'::Message::Run (c:\users\mozilla\debug-builds
\mozilla-central\dom\media\webaudio\audionodestream.cpp:195)
#02: mozilla::MediaStreamGraphImpl::OneIteration (c:\users\mozilla\debug-builds\mozilla-central\dom\
media\mediastreamgraph.cpp:1209)
#03: mozilla::AudioCallbackDriver::DataCallback (c:\users\mozilla\debug-builds\mozilla-central\dom\m
edia\graphdriver.cpp:846)
#04: mozilla::AudioCallbackDriver::DataCallback_s (c:\users\mozilla\debug-builds\mozilla-central\dom
\media\graphdriver.cpp:691)
#05: noop_resampler::fill (c:\users\mozilla\debug-builds\mozilla-central\media\libcubeb\src\cubeb_re
sampler.cpp:89)
#06: cubeb_resampler_fill (c:\users\mozilla\debug-builds\mozilla-central\media\libcubeb\src\cubeb_re
sampler.cpp:245)
#07: `anonymous namespace'::refill (c:\users\mozilla\debug-builds\mozilla-central\media\libcubeb\src
\cubeb_wasapi.cpp:457)
#08: `anonymous namespace'::wasapi_stream_render_loop (c:\users\mozilla\debug-builds\mozilla-central
\media\libcubeb\src\cubeb_wasapi.cpp:586)
#09: _get_flsindex[MSVCR120 +0x2c01d]
#10: _get_flsindex[MSVCR120 +0x2c001]
#11: BaseThreadInitThunk[kernel32 +0x4ee1c]
#12: RtlInitializeExceptionChain[ntdll +0x637eb]
#13: RtlInitializeExceptionChain[ntdll +0x637be]
| Reporter | ||
Comment 1•10 years ago
|
||
| Reporter | ||
Comment 2•10 years ago
|
||
karl, i guess this might be something for you
Flags: needinfo?(karlt)
| Assignee | ||
Comment 3•10 years ago
|
||
Thanks, Carsten.
There is an overflow when converting double to int32_t at https://hg.mozilla.org/mozilla-central/annotate/9ed17db42e3e46f1c712e4dffd62d54e915e0fac/dom/media/webaudio/AudioBufferSourceNode.cpp#l707
Before https://hg.mozilla.org/mozilla-central/rev/358256d1f999 that could only pass through as a negative upper bound for mBufferPosition in mBuffer.
Now the negative int32_t is converted to an uint32_t, which is too large.
[Tracking Requested - why for this release]:
sec-high
Assignee: nobody → karlt
Group: core-security
Status: NEW → ASSIGNED
status-firefox42:
--- → unaffected
status-firefox43:
--- → affected
tracking-firefox43:
--- → ?
Flags: needinfo?(karlt)
Version: unspecified → 43 Branch
| Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8663492 -
Flags: review?(padenot)
| Assignee | ||
Comment 5•10 years ago
|
||
Bounds checking against buffer length before conversion.
Attachment #8663493 -
Flags: review?(padenot)
Updated•10 years ago
|
Attachment #8663493 -
Flags: review?(padenot) → review+
Updated•10 years ago
|
Attachment #8663492 -
Flags: review?(padenot) → review+
| Assignee | ||
Comment 6•10 years ago
|
||
Comment on attachment 8663493 [details] [diff] [review]
be careful about double -> int conversion
[Security approval request comment]
>How easily could an exploit be constructed based on the patch?
Once the problem is determined, it would be reasonably easy to construct and exploit to read memory.
>Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?
The test will not be checked in.
The code change has nothing that says exactly what was wrong, but analysis of the few lines changes can determine the problem.
> Which older supported branches are affected by this flaw?
43 is the only branch where the flaw is a security risk
>If not all supported branches, which bug introduced the flaw?
A change for bug 1201855 turned the flaw into a security risk. (comment 3)
>Do you have backports for the affected branches? If not, how different, hard to create, and risky will they be?
Trivial
>How likely is this patch to cause regressions; how much testing does it need?
There are a few existing tests and the change is not complicated.
Attachment #8663493 -
Flags: sec-approval?
| Assignee | ||
Updated•10 years ago
|
Hardware: Unspecified → All
Comment 7•10 years ago
|
||
Comment on attachment 8663493 [details] [diff] [review]
be careful about double -> int conversion
sec-approval+ because I assume this will need to go into trunk (44) as well as Aurora (43).
Please nominate it for Aurora as well.
Attachment #8663493 -
Flags: sec-approval? → sec-approval+
| Reporter | ||
Comment 8•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox44:
--- → fixed
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Updated•10 years ago
|
Group: core-security → core-security-release
| Assignee | ||
Comment 9•10 years ago
|
||
Comment on attachment 8663493 [details] [diff] [review]
be careful about double -> int conversion
Approval Request Comment
[Feature/regressing bug #]:
A change for bug 1201855 turned an existing flaw into a security risk.
[User impact if declined]: sec-high
[Describe test coverage new/current, TreeHerder]:
not checking in demonstration of bug
[Risks and why]: low
There are a few existing tests and the change is not complicated.
[String/UUID change made/needed]: none.
Attachment #8663493 -
Flags: approval-mozilla-aurora?
Comment 10•10 years ago
|
||
Comment on attachment 8663493 [details] [diff] [review]
be careful about double -> int conversion
Sec-high, has test coverage, taking it for aurora.
Attachment #8663493 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•10 years ago
|
| Reporter | ||
Comment 11•10 years ago
|
||
| Reporter | ||
Comment 12•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bec2bc1a7919 (thats the tests)
Flags: in-testsuite? → in-testsuite+
| Assignee | ||
Updated•10 years ago
|
Group: core-security-release
Updated•10 years ago
|
Whiteboard: [b2g-adv-main2.5-]
You need to log in
before you can comment on or make changes to this bug.
Description
•