Summary: | Unsecure/unreliable shared memory | ||
---|---|---|---|
Product: | cairo | Reporter: | wbrana |
Component: | general | Assignee: | Chris Wilson <chris> |
Status: | RESOLVED MOVED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | major | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | xcb_shm_attach_fd example |
Description
wbrana
2015-05-18 17:12:39 UTC
I was curious how this FD handling was implemented inside of libX11 (how do the FD get from this lib to libxcb?) and looked at the latest git for libXshm. Answer: These requests aren't available through libX11, only through libxcb. (No activity since 2011) http://cgit.freedesktop.org/xorg/lib/libXext/log/src/XShm.c Also, since the Pixmap is shared via X, any other application can access the shared memory if permitted by XSELINUX (which is almost always run in permissive mode). So the real question is how to handle non-root X (and not just 1.15+). For 1.15+ client should create temporary file with mkstemp which is mmap-ped and xserver will mmap same file descriptor. http://lists.x.org/archives/xorg-devel/2013-October/038497.html I didn't test it, but it could work also with non-root X. Created attachment 115992 [details]
xcb_shm_attach_fd example
xcb_shm_attach_fd seems to work with non-root X
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/210. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.