Bug 1030457 - Fails trying to clear CAP_COMPROMISE_KERNEL which does not exist anymore
Summary: Fails trying to clear CAP_COMPROMISE_KERNEL which does not exist anymore
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libcap-ng
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Steve Grubb
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1027032 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-14 13:43 UTC by Daniel Berrangé
Modified: 2013-11-19 10:23 UTC (History)
2 users (show)

Fixed In Version: libcap-ng-0.7.3-6.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-16 07:13:53 UTC
Type: Bug


Attachments (Terms of Use)

Description Daniel Berrangé 2013-11-14 13:43:44 UTC
Description of problem:
Fedora 18 (IIRC) added the non-upstream CAP_COMPROMISE_KERNEL capability.

In Fedora 21 (and it looks like F20 too, though I've not 100% checked), CAP_COMPROMISE_KERNEL has been removed again.

The libcap-ng library still tries to use it

For example doing this call

    capng_clear(CAPNG_SELECT_BOTH);
    if (capng_change_id(uid, gid,
                        CAPNG_DROP_SUPP_GRP | CAPNG_CLEAR_BOUNDING)) {
	fprintf(stderr, "Cannot change ID to %d:%d: %s\n",
                uid, gid, strerror(errno));
        return -1;
    }

Results in an EINVAL error. Strace shows it fails on

...snip...
prctl(PR_CAPBSET_DROP, 0x20, 0, 0, 0)   = 0
prctl(PR_CAPBSET_DROP, 0x21, 0, 0, 0)   = 0
prctl(PR_CAPBSET_DROP, 0x22, 0, 0, 0)   = 0
prctl(PR_CAPBSET_DROP, 0x23, 0, 0, 0)   = 0
prctl(PR_CAPBSET_DROP, 0x24, 0, 0, 0)   = 0
prctl(PR_CAPBSET_DROP, 0x25, 0, 0, 0)   = -1 EINVAL (Invalid argument)


0x25 == 37 == CAP_COMPROMISE_KERNEL

This is breaking use of capng by libvirt-sandbox and probably other apps too.

It looks like capng simply needs a plain rebuild to detect the changed CAP_LAST value

Version-Release number of selected component (if applicable):
libcap-ng-devel-0.7.3-5.fc20

Comment 1 Daniel Berrangé 2013-11-14 15:21:03 UTC
Moving to F20, since I've confirmed it is definitely affected.

Comment 2 Steve Grubb 2013-11-14 16:35:52 UTC
libcap-ng-0.7.3-6.fc20 was built to resolve this issue.

Comment 3 Fedora Update System 2013-11-14 16:39:33 UTC
libcap-ng-0.7.3-6.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/libcap-ng-0.7.3-6.fc20

Comment 4 Fedora Update System 2013-11-14 19:18:36 UTC
Package libcap-ng-0.7.3-6.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libcap-ng-0.7.3-6.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-21353/libcap-ng-0.7.3-6.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-11-16 07:13:53 UTC
libcap-ng-0.7.3-6.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Michal Schmidt 2013-11-19 10:23:20 UTC
*** Bug 1027032 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.