New issue
Advanced search Search tips

Issue 630105 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

MediaDeviceInfo.deviceId not a normal ID, showing as "communications"

Reported by m...@proctorio.com, Jul 21 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.75 Safari/537.36

Steps to reproduce the problem:
1. running MediaDevices.enumerateDevices() gets us MediaDevicesInfo
2. two devices come back. "Microphone Array (Realtek Audio)" and "Communications"
3. When we look at the deviceId property for "Communications", the deviceId = "communications" and for "Microphone Array (Realtek Audio)" is deviceId = "fb5429a0950dcc122e0b0e2948c736f81a459dbca5679b46f5c565009b0131f3"

What is the expected behavior?
Based on this page deviceId for "Communications" is invalid.

https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo

Returns a DOMString that is an identifier for the represented device that is persisted across sessions. It is un-guessable by other applications and unique to the origin of the calling application. It is reset when the user clears cookies (for Private Browsing, a different identifier is used that is not persisted across sessions).

What went wrong?
Obviously the device should have one of these unique guids and not "communications" . This is not unique and is guessable. This is potentially a security issue as well as a bug.

Did this work before? N/A 

Chrome version: 52.0.2743.82  Channel: stable
OS Version: Windows NT 10.0
Flash Version: Shockwave Flash 22.0 r0
 

Comment 1 by e...@chromium.org, Jul 21 2016

Components: -Blink Blink>Media
Components: -Blink>Media Blink>MediaStream

Comment 3 by mcasas@chromium.org, Aug 10 2016

Cc: guidou@chromium.org hta@chromium.org
Labels: -OS-Windows OS-Mac

Comment 4 by mcasas@chromium.org, Aug 29 2016

Cc: mcasas@chromium.org
Labels: Needs-Feedback
mike@, the "communications" name is provided by the OS during
enumeration. Can you check using e.g. [1] the listed name? 

E.g. I see in my laptop:

./cam_formats_avf_64b 
2016-08-29 08:01:11.653 cam_formats_avf_64b[30265:4478694]  I see 2 devices.
2016-08-29 08:01:11.654 cam_formats_avf_64b[30265:4478694] -------------------- Built-in Microphone --------------- AppleHDAEngineInput:1B,0,1,0:1 --- bltn
2016-08-29 08:01:11.654 cam_formats_avf_64b[30265:4478694] Capture format: <AVCaptureDeviceFormat: 0x7fe7c2c02740> 'soun'/'lpcm' SR=96000,FF=4,BPP=8,FPP=1,BPF=8,CH=2,BPC=24 
2016-08-29 08:01:11.654 cam_formats_avf_64b[30265:4478694] Capture format: <AVCaptureDeviceFormat: 0x7fe7c2c029a0> 'soun'/'lpcm' SR=88200,FF=4,BPP=8,FPP=1,BPF=8,CH=2,BPC=24 
[...]
2016-08-29 08:01:11.655 cam_formats_avf_64b[30265:4478694] Capture format: <AVCaptureDeviceFormat: 0x7fe7c2c031c0> 'soun'/'lpcm' SR=44100,FF=9,BPP=8,FPP=1,BPF=8,CH=2,BPC=32 
2016-08-29 08:01:11.655 cam_formats_avf_64b[30265:4478694] -------------------- FaceTime HD Camera --------------- DJH5266R8QBG1HPBV --- pci 
2016-08-29 08:01:11.656 cam_formats_avf_64b[30265:4478694] Capture format: <AVCaptureDeviceFormat: 0x7fe7c2e0cb80> 'vide'/'yuvs' enc dims = 1280x720, pres dims = 1280x720 { 1.00-30.00 fps } 
[...]
2016-08-29 08:01:11.656 cam_formats_avf_64b[30265:4478694] Capture format: <AVCaptureDeviceFormat: 0x7fe7c2e13190> 'vide'/'420v' enc dims = 320x240, pres dims = 320x240 { 1.00-30.00 fps } 


where the enumerated name is shown in between the dashes.

This name is also propagated to e.g. chrome://media-internals/, 
"Video Capture" tab and, "Device Name" column.


[1] https://github.com/miguelao/cam_formats

Comment 5 by m...@proctorio.com, Aug 29 2016

I will try and get this. I know it is listed as that but I think the issue is still that "hash" id you guys generate. It should not be the word "communications" right?

Comment 6 by m...@proctorio.com, Aug 29 2016

this is definitely windows only, so you can remove the mac tag

Comment 7 by mcasas@chromium.org, Aug 29 2016

Labels: -OS-Mac OS-Windows
Oh, I thought it was Mac bc of the User Agent ("Macintosh; 
Intel Mac OS X 10_11_3"), corrected.

Reading #4 --> perhaps guidou@ can comment, since he added
"salt" (an maybe "pepper" ;P ) to the device ids.

Comment 8 by guidou@chromium.org, Aug 29 2016

Status: WontFix (was: Unconfirmed)
We use two special audio device IDs in Chromium.
"default" is a device ID that designates the default audio output device. It works on all platforms.
Windows also has the concept of a "default communications device". We use the special ID "communications" to designate this device.
We do not use obfuscated IDs for these special IDs because their purpose is to provide clients with a well-known way to select the default or default communications devices.

This is neither a bug nor a security issue.
The purpose of device IDs being unique per origin is to prevent fingerprinting across origins.
Since all clients have a "default" and a "communications" device, fingerprinting is not possible.

The other IDs, which designate actual devices are the result of the real device are produced with a hash of the actual device ID (which would allow fingerprinting), the origin and a salt.

Comment 9 by m...@proctorio.com, Aug 29 2016

guidou@ thanks for the clarification. we see default all the time as the only device on chrome os. was this recently added to chrome, we were not seeing this for windows machines until recently. before then, not all windows machines had "communications" listed
The chromium audio stack in ChromeOS currently allows output to the default device only. 
There has been some progress to support nondefault devices on ChromeOS. Recently, the ability to enumerate nondefault audio devices was added (https://codereview.chromium.org/2079843003), but output is still only to the default device.

The communications device ID was added several versions ago to the Windows version of Chromium.

Sign in to add a comment