Closed
Bug 1026774
Opened 10 years ago
Closed 10 years ago
malloc of undefined size in stun_get_mib_addrs in rare cases
Categories
(Core :: WebRTC: Networking, defect)
Tracking
()
People
(Reporter: bwc, Assigned: bwc)
Details
(Keywords: csectype-uninitialized, sec-moderate, Whiteboard: [adv-main35+][b2g-adv-main2.2+])
Attachments
(1 file)
1.46 KB,
patch
|
mt
:
review+
bajaj
:
approval-mozilla-b2g34+
|
Details | Diff | Splinter Review |
If this call fails, |needed| is left uninitialized, and then passed to malloc (errx only prints to stderr, it does not bail).
http://dxr.mozilla.org/mozilla-central/source/media/mtransport/third_party/nICEr/src/stun/addrs.c#242
Granted, this failure should be rare, but I am not totally sure how rare.
Assignee | ||
Comment 1•10 years ago
|
||
So, if the malloc call doesn't crash, I would expect us to deref null here:
http://dxr.mozilla.org/mozilla-central/source/media/mtransport/third_party/nICEr/src/stun/addrs.c#254
This is probably just a straightforward crash bug.
Comment 2•10 years ago
|
||
So, at absolute most this is a DoS (if they can force you to allocate a ton of memory, and there are far easier ways to do that) or a null deref (which isn't a sec issue).
Assignee | ||
Comment 3•10 years ago
|
||
Well, if we allocate a ton of memory, we'll then start trying to parse it, which could send us into the weeds. If we get past here by sheer luck:
http://dxr.mozilla.org/mozilla-central/source/media/mtransport/third_party/nICEr/src/stun/addrs.c#254
We might end up going off into the weeds using random data.
Updated•10 years ago
|
Keywords: csectype-uninitialized
Updated•10 years ago
|
Keywords: sec-moderate
Assignee | ||
Comment 4•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → docfaraday
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8481586 [details] [diff] [review]
Return errors on some rare failure cases in stun_get_mib_addrs.
Review of attachment 8481586 [details] [diff] [review]:
-----------------------------------------------------------------
https://tbpl.mozilla.org/?tree=Try&rev=275586fa59fc
Attachment #8481586 -
Flags: review?(martin.thomson)
Updated•10 years ago
|
Attachment #8481586 -
Flags: review?(martin.thomson) → review+
Assignee | ||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox35:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Updated•10 years ago
|
status-firefox34:
--- → affected
status-firefox-esr31:
--- → ?
Updated•10 years ago
|
Updated•10 years ago
|
Whiteboard: [adv-main35+]
Comment 10•10 years ago
|
||
Would this be worth backporting to b2g34 for v2.1 still?
status-b2g-v1.4:
--- → wontfix
status-b2g-v2.0:
--- → wontfix
status-b2g-v2.0M:
--- → wontfix
status-b2g-v2.1:
--- → affected
status-b2g-v2.1S:
--- → affected
status-b2g-v2.2:
--- → fixed
Flags: needinfo?(docfaraday)
Assignee | ||
Comment 11•10 years ago
|
||
I suspect the existing patch will apply cleanly there, so why not?
Flags: needinfo?(docfaraday)
Assignee | ||
Comment 12•10 years ago
|
||
Comment on attachment 8481586 [details] [diff] [review]
Return errors on some rare failure cases in stun_get_mib_addrs.
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.
[Approval Request Comment]
Bug caused by (feature/regressing bug #):
Initial webrtc landing
User impact if declined:
Potential use of uninitialized memory causing crashes or other undefined behavior in rare cases.
Testing completed:
The usual CI testing.
Risk to taking this patch (and alternatives if risky):
Basically no risk.
String or UUID changes made by this patch:
None.
Attachment #8481586 -
Flags: approval-mozilla-b2g34?
Updated•10 years ago
|
Attachment #8481586 -
Flags: approval-mozilla-b2g34? → approval-mozilla-b2g34+
Comment 13•10 years ago
|
||
Comment 14•10 years ago
|
||
Updated•9 years ago
|
Whiteboard: [adv-main35+] → [adv-main35+][b2g-adv-main2.2+]
Updated•9 years ago
|
Group: core-security → core-security-release
Updated•8 years ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•