Bug 1312261 - semanage generates ROLE_REMOVE events with invalid new-range=s0-s0
semanage generates ROLE_REMOVE events with invalid new-range=s0-s0
Status: NEW
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
23
All Linux
medium Severity medium
: ---
: ---
Assigned To: Petr Lautrbach
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: 1281852
  Show dependency treegraph
 
Reported: 2016-02-26 04:19 EST by Miroslav Vadkerti
Modified: 2017-01-02 09:17 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 14:02:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miroslav Vadkerti 2016-02-26 04:19:58 EST
Description of problem:
Semanage login generates ROLE_REMOVE event with "new-range=s0-s0" which seems invalid (in RHEL7 it generates s0)

# TS=$(date +%T); useradd -Z staff_u superman; semanage login -d superman; ausearch -ts $TS -m ROLE_REMOVE -m ROLE_ASSIGN; userdel -Z -r superman
----
time->Fri Feb 26 10:17:07 2016
type=ROLE_ASSIGN msg=audit(1456478227.986:22791): pid=28888 uid=0 auid=1000 ses=124 subj=staff_u:lspp_test_r:lspp_harness_t:s0-s15:c0.c1023 msg='op=login-sename,role,range acct="superman" old-seuser=? old-role=? old-range=? new-seuser=staff_u new-role=auditadm_r,secadm_r,staff_r,sysadm_r,system_r,lspp_test_r new-range=s0-s15:c0.c1023 exe="/usr/sbin/useradd" hostname=? addr=? terminal=pts/1 res=success' 
----
time->Fri Feb 26 10:17:18 2016
type=ROLE_REMOVE msg=audit(1456478238.532:22798): pid=28898 uid=0 auid=1000 ses=124 subj=staff_u:lspp_test_r:lspp_harness_t:s0-s15:c0.c1023 msg='op=login id=0 old-seuser=staff_u old-role=auditadm_r,secadm_r,staff_r,sysadm_r,system_r,lspp_test_r old-range=s0-s15:c0.c1023 new-seuser=? new-role=? new-range=? exe="/usr/bin/python3.4" hostname=? addr=? terminal=pts/1 res=success' 
----
time->Fri Feb 26 10:17:28 2016
type=ROLE_REMOVE msg=audit(1456478248.393:22800): pid=28898 uid=0 auid=1000 ses=124 subj=staff_u:lspp_test_r:lspp_harness_t:s0-s15:c0.c1023 msg='op=login acct="superman" old-seuser=staff_u old-role=auditadm_r,secadm_r,staff_r,sysadm_r,system_r,lspp_test_r old-range=s0-s15:c0.c1023 new-seuser=user_u new-role=user_r new-range=s0-s0 exe=/usr/sbin/semanage hostname=? addr=? terminal=pts/1 res=success' 

Version-Release number of selected component (if applicable):
policycoreutils-python-utils-2.4-18.fc23

How reproducible:
100%

Steps to Reproduce:
1. Install Fedora in MLS
2. TS=$(date +%T); useradd -Z staff_u superman; semanage login -d superman; ausearch -ts $TS -m ROLE_REMOVE; userdel -r superman

Actual results:
new-range=s0-s0

Expected results:
new-range=s0

Additional info:
In RHEL7 the new-range is s0.
Comment 1 Fedora End Of Life 2016-11-24 10:46:36 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 2 Fedora End Of Life 2016-12-20 14:02:44 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 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.
Comment 3 Jiri Jaburek 2017-01-02 09:17:34 EST
Still occurs on F25,

time->Mon Jan  2 15:00:12 2017
type=ROLE_REMOVE msg=audit(1483365612.289:294): pid=1691 uid=0 auid=0 ses=1 subj=root:sysadm_r:semanage_t:s0 msg='op=login acct="superman" old-seuser=staff_u old-role=auditadm_r,secadm_r,staff_r,sysadm_r,system_r old-range=s0-s15:c0.c1023 new-seuser=user_u new-role=user_r new-range=s0-s0 exe=/usr/sbin/semanage hostname=? addr=? terminal=pts/0 res=success'

Probably related to the fact that __default__ login entry has

__default__          user_u               s0-s0                *

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