Closed
Bug 1377959
Opened 6 years ago
Closed 6 years ago
jvm_android.cc passes va_list to varags methods
Categories
(Core :: WebRTC, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla56
People
(Reporter: froydnj, Assigned: froydnj)
References
Details
(Keywords: csectype-other, sec-high, Whiteboard: [adv-main55-][post-critsmash-triage])
Attachments
(1 file)
1.46 KB,
patch
|
jesup
:
review+
abillings
:
approval-mozilla-beta+
abillings
:
sec-approval+
|
Details | Diff | Splinter Review |
jvm_android.cc contains: jobject JavaClass::CallStaticObjectMethod(jmethodID methodID, ...) { va_list args; va_start(args, methodID); jobject res = jni_->CallStaticObjectMethod(j_class_, methodID, args); CHECK_EXCEPTION(jni_) << "Error during CallStaticObjectMethod"; return res; } jint JavaClass::CallStaticIntMethod(jmethodID methodID, ...) { va_list args; va_start(args, methodID); jint res = jni_->CallStaticIntMethod(j_class_, methodID, args); CHECK_EXCEPTION(jni_) << "Error during CallStaticIntMethod"; return res; } Unfortunately, those CallStatic{Object,Int}Method calls don't take a va_list; they take varargs. GCC doesn't catch the error, but clang does, and issues a warning. Filing this as a security bug for safety; it's not immediately obvious to me if you could actually exploit this, but varargs mismatches and JNI can't be a good combination...
![]() |
Assignee | |
Comment 1•6 years ago
|
||
Fortunately, the fix is pretty simple.
Attachment #8883092 -
Flags: review?(rjesup)
Comment 2•6 years ago
|
||
Looks like this came from upstream -- can you file a security bug against them for this, too?
Group: core-security → media-core-security
Flags: needinfo?(rjesup)
Updated•6 years ago
|
Attachment #8883092 -
Flags: review?(rjesup) → review+
Updated•6 years ago
|
Flags: needinfo?(rjesup)
Updated•6 years ago
|
Comment 4•6 years ago
|
||
For those without access to the upstream bug: fix has landed upstream. The bug is closed on their end.
Comment 5•6 years ago
|
||
froyd: let's get s-a and land, since it's landed upstream, and uplift. No indication from their end as to the severity, so going with sec-high.
Flags: needinfo?(nfroyd)
Keywords: csectype-other,
sec-high
![]() |
Assignee | |
Comment 6•6 years ago
|
||
Comment on attachment 8883092 [details] [diff] [review] fix compiler warning about varargs functions [Security approval request comment] How easily could an exploit be constructed based on the patch? Not sure. Carefully crafted WebRTC exploits for Android only seem not particularly easy, though. Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem? No. Which older supported branches are affected by this flaw? Beta, Release. ESR52 is not affected. If not all supported branches, which bug introduced the flaw? Bug 1250356, landed in Firefox 53. Do you have backports for the affected branches? If not, how different, hard to create, and risky will they be? This patch should apply cleanly. Backports are trivial to make in any event. How likely is this patch to cause regressions; how much testing does it need? If we haven't noticed problems before this patch, we are unlikely to notice problems after.
Flags: needinfo?(nfroyd)
Attachment #8883092 -
Flags: sec-approval?
Comment 7•6 years ago
|
||
I need Ritu and Release Management to say whether they feel that we can take this with one beta left since I'd want it on Beta as well as Trunk. Given that it is a two line change, I think we can probably take it.
Flags: needinfo?(rkothari)
Updated•6 years ago
|
Rank: 15
Priority: -- → P1
This is a pretty small patch, we can take in b13. Julien FYI
Flags: needinfo?(rkothari) → needinfo?(jcristau)
Comment 9•6 years ago
|
||
sec-approval+ for trunk. Please nominate a beta patch as well ASAP.
status-firefox54:
--- → wontfix
status-firefox55:
--- → affected
status-firefox56:
--- → affected
status-firefox-esr52:
--- → unaffected
tracking-firefox55:
--- → +
tracking-firefox56:
--- → +
Updated•6 years ago
|
Attachment #8883092 -
Flags: sec-approval? → sec-approval+
Updated•6 years ago
|
Keywords: checkin-needed
![]() |
Assignee | |
Comment 10•6 years ago
|
||
Comment on attachment 8883092 [details] [diff] [review] fix compiler warning about varargs functions Approval Request Comment [Feature/Bug causing the regression]: bug 1250356 [User impact if declined]: More security vulnerabilities are a bad thing. [Is this code covered by automated tests?]: Unsure, but given that things would probably go haywire if this code was ever hit, I suspect not. [Has the fix been verified in Nightly?]: No. [Needs manual test from QE? If yes, steps to reproduce]: No. [List of other uplifts needed for the feature/fix]: None. [Is the change risky?]: No. [Why is the change risky/not risky?]: Pretty obvious fix once the compiler warned about it. Upstream has also seen fit to fix the problem in the exact same way. [String changes made/needed]: None.
Attachment #8883092 -
Flags: approval-mozilla-beta?
Updated•6 years ago
|
Attachment #8883092 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 11•6 years ago
|
||
This was pushed to inbound. https://hg.mozilla.org/integration/mozilla-inbound/rev/1d844f6fdaf3
Keywords: checkin-needed
Comment 12•6 years ago
|
||
uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/eec75edfd85a
Updated•6 years ago
|
Flags: needinfo?(jcristau)
Comment 13•6 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1d844f6fdaf3
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•6 years ago
|
Whiteboard: [adv-main55-]
Updated•6 years ago
|
Group: media-core-security → core-security-release
Updated•6 years ago
|
Flags: qe-verify-
Whiteboard: [adv-main55-] → [adv-main55-][post-critsmash-triage]
Updated•5 years ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•