Warning: 'kIOSurfaceIsGlobal' is deprecated: first deprecated in macOS 10.11 - Global surfaces are insecure [-Wdeprecated-declarations]
Categories
(Core :: Widget: Cocoa, defect, P3)
Tracking
()
People
(Reporter: whimboo, Assigned: bradwerth)
References
(Depends on 2 open bugs)
Details
(Whiteboard: [mac:deprecated])
Attachments
(15 files, 2 obsolete files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
When compiling Firefox I can see the following deprecation and insecure compiler output:
15:51.05 /Users/henrik/code/gecko/dom/media/platforms/apple/AppleVTDecoder.cpp:624:34: warning: 'kIOSurfaceIsGlobal' is deprecated: first deprecated in macOS 10.11 - Global surfaces are insecure [-Wdeprecated-declarations]
15:51.05 const void* IOSurfaceKeys[] = {kIOSurfaceIsGlobal};
15:51.05 ^
15:51.05 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h:101:26: note: 'kIOSurfaceIsGlobal' has been explicitly marked deprecated here
15:51.05 extern const CFStringRef kIOSurfaceIsGlobal API_DEPRECATED("Global surfaces are insecure",macos(10.6,10.11), ios(11.0,11.0), watchos(4.0,4.0), tvos(11.0,11.0));
A query on searchfox reveales usages in DOM and GFX:
https://searchfox.org/mozilla-central/search?q=kIOSurfaceIsGlobal&path=
Markus, is that something we should be worried about, or what does insecure actually mean in this context?
Comment 1•4 years ago
|
||
I think "insecure" means that other processes that are running on the system can read and write to our surfaces, so the can see and change the pixels that we put on the screen. So fixing this is an opportunity to strengthen our sandbox.
Furthermore, there is a non-zero chance that macOS might eventually remove support for global IOSurfaces entirely.
It might not be very easy to fix; I think we'll need to send mach_ports for the surfaces, and I'm not sure how straightforward that is with our IPC mechanism.
Updated•4 years ago
|
Updated•4 years ago
|
| Comment hidden (Intermittent Failures Robot) |
Updated•3 years ago
|
| Assignee | ||
Updated•8 months ago
|
Comment 3•6 months ago
|
||
We should try to change the places which send an integer to send a mozilla::UniqueMachSendRight(IOSurfaceCreateMachPort(surface)) instead.
| Assignee | ||
Comment 4•1 month ago
|
||
This fails to compile because it causes SurfaceDescriptor to implcitly
delete its copy constructor, which is required by type declarations like
Maybe<SurfaceDescriptor>. In theory, Maybe should work correctly with
move types, but that's not happening here. Example of compile errors:
error: call to implicitly-deleted copy constructor of 'NonConstT' (aka 'mozilla::layers::SurfaceDescriptor')
note: copy constructor is implicitly deleted because 'SurfaceDescriptor' has a user-declared move constructor
MOZ_IMPLICIT SurfaceDescriptor(SurfaceDescriptor&& aOther);
Updated•8 days ago
|
| Assignee | ||
Comment 5•8 days ago
|
||
| Assignee | ||
Comment 6•8 days ago
|
||
| Assignee | ||
Comment 7•8 days ago
|
||
| Assignee | ||
Comment 8•8 days ago
|
||
| Assignee | ||
Comment 9•8 days ago
|
||
| Assignee | ||
Comment 10•8 days ago
|
||
| Assignee | ||
Comment 11•8 days ago
|
||
| Assignee | ||
Comment 12•8 days ago
|
||
| Assignee | ||
Comment 13•8 days ago
|
||
Updated•7 days ago
|
Updated•2 days ago
|
Updated•2 days ago
|
| Assignee | ||
Comment 14•2 days ago
|
||
This simplifies some compilation challenges but is otherwise a
non-functional change. It keeps some Apple headers out of IOSurfacePort.h.
| Assignee | ||
Comment 15•2 days ago
|
||
| Assignee | ||
Comment 16•2 days ago
|
||
This is most of the Texture and TextureHost classes that use a
SurfaceDescriptor, as well as some of the gfx Bridge actors.
| Assignee | ||
Comment 17•18 hours ago
|
||
The patches are still a bit of a mess. I'm going to split out the patches into individual blocker Bugs to make each piece easier to reason about -- and to review.
Comment 18•18 hours ago
|
||
Comment on attachment 9544092 [details]
WIP: Bug 1695866 Part 4: Split IOSurfacePort.h into a cpp definition.
Revision D282739 was moved to bug 2016533. Setting attachment 9544092 [details] to obsolete.
Comment 19•17 hours ago
|
||
Comment on attachment 9542452 [details]
WIP: Bug 1695866 Part 3: Unify the IPC ParamTraits::Write methods for const ref and rvalue params.
Revision D281835 was moved to bug 2016562. Setting attachment 9542452 [details] to obsolete.
Updated•8 hours ago
|
| Assignee | ||
Comment 20•8 hours ago
|
||
| Assignee | ||
Comment 21•8 hours ago
|
||
| Assignee | ||
Comment 22•8 hours ago
|
||
| Assignee | ||
Comment 23•8 hours ago
|
||
Updated•8 hours ago
|
Updated•8 hours ago
|
Updated•8 hours ago
|
Updated•8 hours ago
|
Updated•8 hours ago
|
Description
•