Unsecure/unreliable shared memory
Submitted by wbr..@..il.com
Assigned to Chris Wilson @ickle
Description
Cairo is using shared memory using shmget with permissions 600 in following files: cairo-xlib-surface-shm.c cairo-xcb-shm.c cairo-xcb-connection.c which
- is unsecure because other applications from same user can access that memory using shmat and shmid from /proc/sysvipc/shm
- doesn't work if application is running as different non-root user from Xserver
Cairo should use new functions with Xserver 1.15 and newer:
"In the 1.15 release of the X.org server[1] the MIT-SHM extension gains two additional requests: 'X_ShmAttachFd' and 'X_ShmCreateSegment', to be able to pass shared memory through file descriptors from client to server and from server to client"