Closed Bug 1338504 Opened 7 years ago Closed 7 years ago

Crash in mozilla::widget::AudioSession::StopInternal when unplugging USB headset

Categories

(Core :: Widget: Win32, defect, P1)

54 Branch
All
Windows
defect

Tracking

()

RESOLVED INVALID
Tracking Status
firefox54 --- affected

People

(Reporter: JuliaC, Unassigned)

References

()

Details

(4 keywords, Whiteboard: tpi:+)

Crash Data

This bug was filed from the Socorro interface and is 
report bp-2371b4a4-d090-41a8-a379-e399b2170210.
=============================================================
[Prerequisites]:
- Have an available USB headset connected to your station

[Steps to reproduce]:
1. Launch Firefox
2. Go to https://apprtc.appspot.com/, create a room, provide the camera and microphone permissions and join it
3. Join the same room from another station
4. Unplug the USB headset
5. Connect back the USB headset
6. Refresh the page in order to reestablish the call

[Regression range]:
- I will investigate this as soon as possible

[Additional notes]:
- The issue is reproducible on Windows 7 x64 and Mac OS X 10.11.6
Depends on: 910813
Priority: -- → P1
Whiteboard: tpi:+
Stephen, could you please take a look at with on OSX? Maybe we can knock both platforms out with the same work.
Flags: needinfo?(spohl.mozilla.bugs)
(In reply to Iulia Cristescu, QA [:IuliaC] from comment #0)
> This bug was filed from the Socorro interface and is 
> report bp-2371b4a4-d090-41a8-a379-e399b2170210.
> 
> [...]
>
> [Additional notes]:
> - The issue is reproducible on Windows 7 x64 and Mac OS X 10.11.6

Could I get a link to a crash report for OSX? The one referenced here is in Windows widget code. I haven't been able to find any reports in Socorro for OSX yet. Thanks!
Flags: needinfo?(spohl.mozilla.bugs) → needinfo?(iulia.cristescu)
Flags: needinfo?(iulia.cristescu)
See Also: → 1339259
OS: All → Windows
Group: core-security
Keywords: sec-critical
Component: WebRTC → Widget: Win32
I see a fair number of Thunderbird crashes here, so it can't just be WebRTC related.

The scary EXCEPTION_ACCESS_VIOLATION_EXEC crashes seem to be on old builds: I only see them on Firefox 47 and earlier. On those we seem to have a valid mAudioControlSession in mozilla::widget::AudioSession::Start(), but it gets a failure calling mAudioSessionControl->SetIconPath(). In the failure handling block it calls StopInternal(), but the stack shows an intervening call to RegisterForMediaCallback in audioses.dll before the mozilla::widget::AudioSession::StopInternal(), where mAudioControlSession is apparently now bogus.

I see no crashes in 48 or 49

Starting in Firefox 50 it's an infrequent EXCEPTION_ACCESS_VIOLATION_READ. The stacks are maybe corrupt because I don't think the OS's HeapFree() is going to be calling back into our audio session control.

There was a fix for this signature in bug 1268233 (see also bug 910813) that landed in 48 and probably was why the earlier scary signatures went away. Something changed in 50 that brought back a related crash. sec-critical might have been appropriate for the older _EXEC crash but seems a bit alarmist for the current incarnation.
Group: core-security → layout-core-security
Keywords: sec-criticalsec-high
Right - I did some searches, going back 3 months, and the scary ones are gone.  good sleuthing on the fix source... which however points out it might be a sec-crit for ESR45.  Perhaps we should uplift bug 1268233/etc.

There are no clear UAF addresses, but there are some random ones, and a lot of ffffff's.  Agree on sec-high for the 50+ crashes.
Depends on: 1343972
Flags: needinfo?(jmathies)
Julia, I'm not reproducing this in nightly, can you confirm again? Also, is there simpler STR we can come up with here?
Flags: needinfo?(jmathies) → needinfo?(iulia.cristescu)
(In reply to Jim Mathies [:jimm] from comment #5)
> Julia, I'm not reproducing this in nightly, can you confirm again? Also, is
> there simpler STR we can come up with here?

Hello, Jim! 
I didn't manage to reproduce the crash anymore on 54.0a2 (2017-04-07) and 55.0a1 (2017-04-07), using the steps from comment 0.
Flags: needinfo?(iulia.cristescu)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Group: layout-core-security → core-security-release
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.