GNOME Bugzilla – Bug 755532
insecure shmget permissions
Last modified: 2021-06-10 11:20:27 UTC
IPC_PRIVATE is a misnomer, and this will create a SHM segment with 0777 permissions:
tex_pixmap->shm_info.shmid = shmget (IPC_PRIVATE,
IPC_CREAT | 0777);
This should probably use 0600 permissions instead. As far as I can see, it's a cosmetic issue because the SHM segment is only temporary and not used for anything important, but it should still be fixed.
Downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1032072
This should be fixed and also shmctl() with IPC_RMID should be called immediately after the shmget() call to destroy the SHM object upon process termination. Otherwise, if I logout and login again from Linux Mint with Cinnamon, another object with these characteristics would be created without the other being destroyed, leaking memory in the process.
You should add:
shmctl(shm_info.shmid, IPC_RMID, NULL);
Created attachment 325829 [details] [review]
Tested patch. Now Linux Mint with Cinnamon doesn't leak memory if I logout and no insecure permissions are present.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).
If you can still reproduce the situation described in this ticket in a recent
and supported software version of cogl, then please follow
and create a ticket at
Thank you for your understanding and your help.