Bug 2062648
| Summary: | libcap: Incorrect use of prctl in various functions | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Florian Weimer <fweimer> |
| Component: | libcap | Assignee: | Anderson Sasaki <ansasaki> |
| Status: | CLOSED ERRATA | QA Contact: | Martin Zelený <mzeleny> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.6 | CC: | mzeleny, rsroka |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libcap-2.48-3.el8 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-08 10:48:38 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: | |||
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (libcap bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:7722 |
cap_proc.c contains this: 268 int cap_get_bound(cap_value_t cap) 269 { 270 int result; 271 272 result = prctl(PR_CAPBSET_READ, pr_arg(cap), pr_arg(0)); 273 if (result < 0) { 274 errno = -result; 275 return -1; 276 } 277 return result; 278 } However, prctl is the glibc wrapper here, and it returns -1 on failure and sets errno. As a result, all errors are reported as EPERM (which is 1). I found this while looking at bug 2061727, but it s actually unrelated to it. It just confuses debugging because EPERM does not show up in strace.