Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
With the recent fix of crash in the find_elf_note function a new limitation in the usage appeared. The fix was based on a reading of the /proc/self/auxv file instead of reading the notes directly from the memory, but when running with a different euid, the file content became inaccessible and the procps library init failed with "/proc/self/auxv: Permission denied". The fix allowed to call the library functions with dlopen, but prevented users from using the library and procps tools with different euid. This update introduces a fallback to the previous approach when the /proc/self/auxv file is inaccessible. That, however, means the mentioned conditions are mutually exclusive and the library functions cannot be called with dlopen and different euid at the same time.
Description of problem:
The change from bug 1163404 seems to introduce an issue where a process that has changed it's effective uid can no longer access /proc/self/auxv, preventing ps from running (even --help).
Version-Release number of selected component (if applicable):
procps-3.2.8-31.el6
How reproducible:
Always fails when process has changed euid.
Steps to Reproduce:
1. install procps-3.2.8-31.el6 or newer
2. run the following perl script as root that changes the euid and tries to call ps:
#!/usr/bin/perl
($),$>) = (1000,1000);
my $psOutput = `/bin/ps --help`;
print "output: $psOutput\n";
Actual results:
# perl /var/tmp/test-ps.pl
/proc/self/auxv: Permission denied
output:
Expected results:
# perl /var/tmp/test-ps.pl
output: ********* simple selection ********* ********* selection by list *********
-A all processes -C by command name
-N negate selection -G by real group ID (supports names)
-a all w/ tty except session leaders -U by real user ID (supports names)
-d all except session leaders -g by session OR by effective group name
-e all processes -p by process ID
...
Additional info:
Hello Todd.
Thanks a lot for the report. This apparently becomes more complicated than we thought. Reverting the change back is also no option. I'm thinking about a fallback based on the previous solution where a failure of the new approach would lead to retry with the old approach. But I'll think about that once again and if a better solution exists, I'll try to redesign that in a different way.
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, 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://rhn.redhat.com/errata/RHBA-2016-0904.html