Bug 2024102

Summary: /usr/lib/s390-tools/cpictl is installed group-writable
Product: Red Hat Enterprise Linux 9 Reporter: Jan Pazdziora <jpazdziora>
Component: s390utilsAssignee: Dan Horák <dhorak>
Status: CLOSED ERRATA QA Contact: Vilém Maršík <vmarsik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: jpazdziora, jschinta, rvr
Target Milestone: rcKeywords: Triaged
Target Release: 9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: s390utils-2.19.0-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 15:59:55 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:

Description Jan Pazdziora 2021-11-17 10:19:38 UTC
Description of problem:

The /usr/lib/s390-tools/cpictl is installed with permissions 0775 (group writable). That means that should the admin use the root group for something special, they would allow modifying this script to users in that group.

And looking at

# ls -la /usr/bin | grep '^-rwxrwx' | wc -l
0

other packages don't package binaries that way.

Checking the .spec file, it is not explicitly set, so it looks like some glitch in the source / build process.

Version-Release number of selected component (if applicable):

s390utils-core-2.17.0-4.el9.s390x

How reproducible:

Deterministic.

Steps to Reproduce:
1. ls -la /usr/lib/s390-tools/cpictl | grep '^-rwxr-x'

Actual results:

Nothing returned.

Expected results:

-rwxr-xr-x. 1 root root 6356 Aug 10 12:16 /usr/lib/s390-tools/cpictl

Additional info:

Comment 2 Vilém Maršík 2021-12-02 15:58:06 UTC
Looks good on RHEL-9.0.0-20211201.1 :
# ls -la /usr/lib/s390-tools/cpictl
-rwxrwxr-x. 1 root root 6356 Nov  9 03:27 /usr/lib/s390-tools/cpictl
# rpm -qa | grep s390utils
s390utils-core-2.18.0-1.el9.s390x
# dnf upgrade s390utils-core-2.19.0-1.el9.s390x.rpm
(...)
Upgraded:
  s390utils-core-2:2.19.0-1.el9.s390x

Complete!
# ls -la /usr/lib/s390-tools/cpictl
-rwxr-xr-x. 1 root root 6356 Nov 22 07:53 /usr/lib/s390-tools/cpictl

Comment 6 Vilém Maršík 2021-12-17 00:40:42 UTC
Good on RHEL-9.0.0-20211214.2:
# rpm -q s390utils-core
s390utils-core-2.19.0-1.el9.1.s390x
#  ls -la /usr/lib/s390-tools/cpictl
-rwxr-xr-x. 1 root root 6358 Nov 23 08:31 /usr/lib/s390-tools/cpictl

Comment 7 jschinta 2022-03-22 14:42:12 UTC
Hi,

i wanted to ask if there are plans to backport this fix to RHEL 8.6 through RHEL 8.4. I can find the same issue there.

Comment 8 Dan Horák 2022-03-22 16:24:36 UTC
(In reply to jschinta from comment #7)
> Hi,
> 
> i wanted to ask if there are plans to backport this fix to RHEL 8.6 through
> RHEL 8.4. I can find the same issue there.

currently there is no such plan, but the upstream fix will be part of the s390utils rebase in 8.7

Comment 10 errata-xmlrpc 2022-05-17 15:59:55 UTC
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 (new packages: s390utils), 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:4005