Description of problem: 1.) CCACHE_UMASK being 002 causes executables to be created with mode 0775. This at the very least makes some rpms (python modules that use setup.py) contain files with different mode than expected (bug #427027 comment #2) and makes rpmlint complain. 2.) I suspect it might be possible for one mock user to 'poison' the cache with incorrectly generated code. This would be a security issue if mock users were not expected to trust themselves, but given the fact they also share to build root cache this is probably not an issue. However; 1.) definitely outweighs benefits of sharing the cache -- I tend to think that in vast majority of cases the number of mock users is not big enough to significantly benefit from sharing the compiler cache. Version-Release number of selected component (if applicable): mock-0.8.19-1.fc8
Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
I am wondering whether there are plans to do anything about this?
So, a couple of observations: I dont know of anybody using mock in a situation where they dont trust their users. We have explicitly disclaimed any guarantees of security for this scenario, as mock has not been audited for use by untrusted users, and there are currently *trivial* methods that users with access to mock can use to elevate privs ("mock shell" can trivially be used to elevate privs.) That being said, I dont think it is unreasonable to add a patch to set the CCACHE_UMASK to make it less likely for users to be able to overwrite each other's cache files. If you attach a well-coded patch to set this, then I dont see any blocking issue to accepting it.
Created attachment 315303 [details] Do not use shared ccache caches by default The mode 0775 alone can be a security issue for non (root,root) owned files. I think it's very reasonable to expect that the sequence: %build umask 022 gcc -o foo [...] %install umask 022 cp -p foo $RPM_BUILD_ROOT%{_bindir} %files %defattr(-,root,somegroup,-) %{_bindir}/foo ...would result in /usr/bin/foo, owned by (root,somegroup), mode 0755 being in the resulting binary package. But due to the issue at hand, /usr/bin/foo would be unexpectedly writable by the "somegroup" group. I started patching, results attached. It works otherwise except that I made the mistake of using chrootuser (== mockbuild) when I would have wanted the real username of who is running mock. Looks like the real username is not currently available in the object model so some more work would be needed. Also if the cache is not shared by default, its default size could be lowered to something less than 4G.
Michael, do you want to take the above patch?
This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '9'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 9's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 9 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle. Changing version to '12'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This message is a reminder that Fedora 12 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 12. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '12'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 12's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 12 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Clearing the NeedInfo as I have no clue why info is being requested from me.
Pulled in Ville's patch for testing, looking at adding to mock for the 1.1.10 release.
Hmmph. I see what Ville was talking about in that the only username we have available in the chroot is 'mockuser'. Not sure if this is worth the effort of adding real usernames to the chroot password file. Anyone have an opinion here? If I don't hear anything in a few days I'll probably close this as NOTABUG.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Closing per #12. If somebody have better idea or even patch, then feel free to reopen.
This was actually fixed in bug 1168116.