Site can turn cam & hw light back on without permission after cam light goes out, if it keeps recording audio
Categories
(Core :: WebRTC: Audio/Video, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox-esr60 | --- | wontfix |
firefox-esr78 | --- | wontfix |
firefox55 | --- | wontfix |
firefox56 | --- | wontfix |
firefox57 | --- | wontfix |
firefox58 | --- | wontfix |
firefox59 | --- | wontfix |
firefox60 | --- | wontfix |
firefox61 | --- | wontfix |
firefox62 | --- | wontfix |
firefox63 | --- | wontfix |
firefox64 | --- | wontfix |
firefox65 | --- | wontfix |
firefox66 | --- | wontfix |
firefox87 | --- | wontfix |
firefox88 | --- | wontfix |
firefox89 | --- | verified |
People
(Reporter: jib, Assigned: pehrsons)
References
(Regression)
Details
(Keywords: privacy, regression, sec-low, Whiteboard: [post-critsmash-triage][adv-main89+])
Attachments
(4 files, 2 obsolete files)
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Updated•7 years ago
|
Assignee | ||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Reporter | ||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
![]() |
||
Updated•7 years ago
|
Comment 6•7 years ago
|
||
Assignee | ||
Comment 7•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 8•6 years ago
|
||
Andreas did your recent changes remove the MediaStreamListener like you announced in comment #4? Is this still a problem?
Assignee | ||
Comment 9•6 years ago
|
||
I have removed listeners, yes (bug 1423241). This is still a problem, yes.
Perhaps removing stream listeners has unblocked fixing this in permissions code, but I think it could have been done before too.
Permissions handling, that's where this issue really lies.
Reporter | ||
Comment 10•4 years ago
•
|
||
Cause
It turns out we only fire "recording-device-stopped"
to front-end when removing an entire SourceListener here. For historical reasons, it may represent a camera + microphone pair, but only when requested as a pair in getUserMedia
.
Front-end listens to "recording-device-stopped"
to terminate temporary permissions to device + kind based on track liveliness (an empty message.rawID
means stop all, otherwise a specific device only). This is the disconnect.
Effect
Unprompted re-access to a camera or mic post-stop from a pair obtained in a joint gUM call, as long as the other half of the pair is kept live.
STRs: In https://jan-ivar.github.io/dummy/gum_stop.html click Start Both!
+ Stop cams!
+ Start cams!
= no re-prompt. Or, click Start Both!
+ Stop mics!
+ Start mics!
= no re-prompt.
Fix
Remove the pair special case from SourceListener. It's arbitrary in the modern stack, which allows pairs of unrelated hardware anyway (e.g. BRIO cam + AirPod mic). . Well-tested. Simple fix.
Why fix it?
On first blush, the buggy behavior may seem desirable. Especially since some web conference sites asymmetrically stop camera on facemute to work around crbug 642785, but never stop the mic on micmute (so they can implement the "Are you speaking? you should unmute" feature).
But it's highly unpredictable in practice: Several sites (Meet, WebEx) obtain camera and microphone separately, so it didn't happen there. Even if we got Meet to use a joint prompt, users might change their cams or mics independently anyway using the site's ⚙️ settings page, and then it wouldn't happen.
But even if we made this reliable, it wouldn't work if the site stops both tracks, which some sites (MeetEcho?) appear to do on mute/unmute. We'd end up causing re-prompts in some sites but not others for seemingly comparably functionality.
Use case
But this does highlight a use-case: lurkers in medium-to-large meetings who spend most of their time facemuted and micmuted, only to unmute when called on to ask some question.
A superior fix to address this use case directly would seem to be to significantly increase the grace period considered in bug 1693677 to minutes not seconds, for as long as the page is not navigated (then trim it down to seconds on navigation). I've filed this as bug 1697284.
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 11•4 years ago
|
||
S3 because this is not blocking any functionality per se. It's a bit too permissive.
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 12•4 years ago
|
||
Note, if we go with a 60 minute grace period in bug 1697284, then it should cover up the effects of this bug most of the time.
I resolved a case where this behavior interfered with a test with https://phabricator.services.mozilla.com/D107769.
I think this would still be good to fix, to simplify our model, but it gives us a bit more breathing room perhaps.
Assignee | ||
Comment 13•4 years ago
|
||
Assignee | ||
Comment 14•4 years ago
|
||
This patch makes MediaManager notify of recording-device-events as soon as any
gUM-track has ended, as opposed to when all tracks in a gUM-request have ended.
This effectively makes temporary permissions per-track rather than per-request.
Assignee | ||
Comment 15•4 years ago
|
||
Assignee | ||
Comment 16•4 years ago
|
||
Normally when all tracks capturing a certain device for a window have stopped we
notify of "recording-device-stopped" for that window and device.
On navigation of a window, for instance, this notification is fired for all
active devices for that window before firing "recording-window-ended".
Prior to this patch we have also fired a "recording-device-stopped" without
device info as a catch-all just prior to "recording-window-ended". However,
there is no chance in the content process of missing a device and thus needing
the catch-all.
This patch removes device-less "recording-device-stopped" to simplify both code
and protocol.
Comment 17•4 years ago
|
||
Comment on attachment 9212852 [details]
Bug 1395819 - Remove recording-device-stopped notifications without device info. r?karlt!,r?johannh!,r?#webidl!
Revision D110430 was moved to bug 1699338. Setting attachment 9212852 [details] to obsolete.
Reporter | ||
Comment 18•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
![]() |
||
Comment 19•4 years ago
|
||
This had landed:
Add b-c test cases for removing temporary permissions per-kind by stopping tracks. r=johannh,jib
https://hg.mozilla.org/mozilla-central/rev/990441f04a86
Make SourceListeners per-device and rename them DeviceListener to reflect this. r=jib
https://hg.mozilla.org/mozilla-central/rev/46083fddeb0d
Remove unused method MediaEngineSource::Shutdown. r=jib
https://hg.mozilla.org/mozilla-central/rev/813c7ce3607b
But got backed out for causing cpp failures in MediaManager.cpp:
https://hg.mozilla.org/mozilla-central/rev/366a7dcd19f4
Failure log: https://treeherder.mozilla.org/logviewer?job_id=335570691&repo=autoland
dom/media/MediaManager.cpp:3966:17: error: use of undeclared identifier 'MediaDeviceKindValues'; did you mean 'dom::MediaDeviceKindValues'?
dom/media/MediaManager.cpp:4020:32: error: use of undeclared identifier 'MediaDeviceKindValues'; did you mean 'dom::MediaDeviceKindValues'?
and more failures
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
![]() |
||
Comment 20•4 years ago
|
||
Add b-c test cases for removing temporary permissions per-kind by stopping tracks. r=johannh,jib
https://hg.mozilla.org/integration/autoland/rev/6e0fb393c96731102fdeec5cd5e60c9ae764509d
Make SourceListeners per-device and rename them DeviceListener to reflect this. r=jib
https://hg.mozilla.org/integration/autoland/rev/f5ef4c4b1c56147eb8f1e4aabdc411005872c704
Remove unused method MediaEngineSource::Shutdown. r=jib
https://hg.mozilla.org/integration/autoland/rev/3abc76c921f7fbc2909f9d05bb916754b80169d6
https://hg.mozilla.org/mozilla-central/rev/6e0fb393c967
https://hg.mozilla.org/mozilla-central/rev/f5ef4c4b1c56
https://hg.mozilla.org/mozilla-central/rev/3abc76c921f7
Updated•4 years ago
|
Comment 21•4 years ago
|
||
We managed to reproduce this issue on an affected Nightly build 2021-04-01 using the steps from comment 0, with a minor difference in step 3:
- Open https://jsfiddle.net/jib1/mtLs2phL/2/
- When prompted, share camera and mic, but leave "Remember this decision" unchecked.
- Hardware camera light turns on (Self-view does not appear, the window remains blank).
- Wait 3 seconds,camera hardware light goes out (not the case for the self-view as it does not appear in step 3).
- After 6 more seconds, camera and light start without permission.
We also verified this on the latest Nightly, but it occurs exactly as in the steps above. Can you please take a look at this, what should be the expected result?
Updated•4 years ago
|
Comment 22•4 years ago
|
||
Hi Giorgia,
Please allow me to steal the NI? and verification of this bug as it is closely related to one of the features QA is testing. I had a talk with Jan-Ivar about this issue as it gets a bit more complicated to test due to Bug 1697284. Thanks for testing it out so far tho, and sorry for this inconvenience!
Setting up NI? for myself to handle this when I can.
Comment 23•4 years ago
•
|
||
Verified-fixed on latest Firefox Nightly 89.0a1 on MacOS 10.15 and Windows 10 x 64.
Verified by disabling the grace period ( privacy.webrtc.deviceGracePeriodTimeoutMs set to 0)
The permission panel will request access after following the STR provided in Comment 10.
Updated•4 years ago
|
Comment 24•4 years ago
|
||
Updated•4 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Description
•