After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792675 - Creates .config directory with world readable permissions
Creates .config directory with world readable permissions
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
3.27.x
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-19 10:10 UTC by Sebastien Bacher
Modified: 2018-04-09 09:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
create the config directory as 700 (972 bytes, patch)
2018-04-06 14:09 UTC, Sebastien Bacher
none Details | Review
create the config directory as 700 (972 bytes, patch)
2018-04-06 14:10 UTC, Sebastien Bacher
accepted-commit_now Details | Review

Description Sebastien Bacher 2018-01-19 10:10:13 UTC
The bug was reported on https://bugs.launchpad.net/ubuntu/+source/session-migration/+bug/1735929 as a security sensitive problem

It would be safer to have the user configuration to be "0700" (restricted access to the owner)

https://git.gnome.org/browse/gnome-session/tree/gnome-session/gsm-util.c#n98
Comment 1 Ray Strode [halfline] 2018-01-19 15:56:24 UTC
sure, but the same could be said of the home directory itself... I mean isn't this more a question of default umask ?
Comment 2 Sebastien Bacher 2018-01-22 14:25:37 UTC
Right, I think our security team would like to change the default for user directories as well, the current permissions have been choosed to allow local users to share content. Even if the issue exists with other directories there is no reason to not make the situation a bit better and restrict the access to the config directory right?
Comment 3 Ray Strode [halfline] 2018-01-22 14:35:00 UTC
probably the best approach is to lock everything bug ~/Public down

I'm pretty much okay with pushing a patch to change this (although not thrilled), if you got one, but it seems like it's fixing things in the wrong place.
Comment 4 Sebastien Bacher 2018-04-06 14:09:21 UTC
Created attachment 370585 [details] [review]
create the config directory as 700

Right, that's not a robust solution or the best way to solve that issue but it's an improvement over the current situation. 

Note that the directory was created with 0700 as permission on Ubuntu under Unity and our security team considers the change of permission as a regression.

Thanks for considering the simple change, it shouldn't create any problem and makes things slightly better
Comment 5 Sebastien Bacher 2018-04-06 14:10:08 UTC
Created attachment 370586 [details] [review]
create the config directory as 700

(same without typo)
Comment 6 Ray Strode [halfline] 2018-04-06 15:35:11 UTC
Review of attachment 370586 [details] [review]:

sure, whatevers.
Comment 7 Sebastien Bacher 2018-04-09 09:28:18 UTC
thanks commit 010d9dae