Bug 1035427
Summary: | capng_lock sets securebits in a scary manner | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Andy Lutomirski <luto> | ||||
Component: | libcap-ng | Assignee: | Steve Grubb <sgrubb> | ||||
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 22 | CC: | pcfe, sgrubb | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-07-19 10:38:44 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 885288, 1093702, 1095222 | ||||||
Attachments: |
|
Description
Andy Lutomirski
2013-11-27 18:15:31 UTC
Not 100% sure this is the correct fix. Still looking at the kernel. In the meantime, the patch hides the problem. Libcap-ng-0.7.4 was pushed live in F20. Looks okay to me. The whole point of no_new_privs is that it's supposed to safe to do things that could break setuid programs as long as no_new_privs is set. For example, installing a malicious seccomp filter could probably subvert almost any setuid binary, so you can only install seccomp filters if you are root or if you set no_new_privs first. The issue to me is that I think SECURE_NOROOT doesn't get its semantics right as is. I'm thinking if noroot is set and cap_setuid is set, suid as normal but with no capabilities. If no_root is set and cap_setuid is unset, no transition should occur. If no_root is unset, then works as normal. If this was not the intention, then SECURE_NOSUID should have been created at the same time the other SECUREBITS options were created so that each part of credential escalation could be controlled. TBH, the whole Linux capability inheritance system (i.e. what happens on exec) is terminally screwed up. That being said, lacking cap_setuid shouldn't prevent the setuid bit from working -- most users lack cap_setuid. If I were maintaining cap-ng, I'd just ditch the securebits stuff -- I don't think that the kernel implementation was ever thought through very well. libcap-ng-0.7.4-2 was put in rawhide reverting this change because it caused bug 1091761. I also unpushed libcap-ng-0.7.4 from F19. Pending testing on rawhide, I will push a new package reverting PR_SET_NO_NEW_PRIVS in F20. I really think fixing the semantics of NOROOT as described above is the real and ultimate fix. FWIW, libcap-ng-0.7.4-2.fc21 solves bug 1093702 (sandboxed X apps no longer working [F20]) for me. Thanks! Is there anything besides $ sandbox -t sandbox_web_t -X firefox http://www.redhat.com/ $ sandbox -X okular Project_TeddyBears_Siggraph14_paper.pdf you'd like me to test? (While this is a KDE install, I can install evice or any other application on the box for testing if needed) This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22 I am wondering if this bz can be closed? libcap-ng 0.7.5 is in F21/22 now. Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |