Bug 784121 - semanage is sending the wrong kind of audit events
semanage is sending the wrong kind of audit events
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 784595 784619
  Show dependency treegraph
 
Reported: 2012-01-23 16:19 EST by Steve Grubb
Modified: 2015-01-14 08:15 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 784595 784619 (view as bug list)
Environment:
Last Closed: 2015-01-14 08:15:43 EST
Type: ---
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 Steve Grubb 2012-01-23 16:19:34 EST
Description of problem:
Semanage is sending the wrong kind of audit events. When a user is assigned a new role, an AUDIT_ROLE_ASSIGN event should be sent. When a user has a role removed, an AUDIT_ROLE_REMOVE event should be sent. When a user's process changes roles, like during login, its supposed to issue an AUDIT_USER_ROLE_CHANGE event.

Semanage is only sending AUDIT_USER_ROLE_CHANGE - which is the wrong kind of event.

How reproducible:
Always

Steps to Reproduce:
1. semanage user --add -R staff_r test
2. ausearch -m ROLE_ASSIGN --start recent
Comment 1 Steve Grubb 2012-01-23 16:23:33 EST
Actually on further review, AUDIT_USER_ROLE_CHANGE is being sent by newrole, which is good. I guess semanage is simply missing assign/delete of roles to user accounts.
Comment 2 Daniel Walsh 2012-01-24 10:38:52 EST
semanage login -a -s guest_u pwalsh

Wrote this record to the audit log.

time->Tue Jan 24 10:37:44 2012
type=USER_ROLE_CHANGE msg=audit(1327419464.300:60279): pid=0 uid=0 auid=3267 ses=7 subj=staff_u:unconfined_r:semanage_t:s0-s0:c0.c1023 msg='op=add SELinux user mapping acct="pwalsh" old-seuser=? old-role=? old-range=? new-seuser=guest_u new-role=? new-range=? exe=/usr/sbin/semanage hostname=? addr=? terminal=pts/0 res=success'
Comment 3 Steve Grubb 2012-01-24 10:52:26 EST
That is the wrong kind of event. It should be AUDIT_ROLE_ASSIGN because you are adding something to the user's security attributes. Also, on delete I am not seeing the old role in the event:

type=USER_ROLE_CHANGE msg=audit(1327347475.071:2739): user pid=11644 uid=0 auid=4325 ses=1 subj=unconfined_u:unconfined_r:semanage_t:s0 msg='op=delete SELinux user record acct="test" old-seuser=? old-role=? old-range=? new-seuser=? new-role=? new-range=? exe=/usr/sbin/semanage hostname=? addr=? terminal=pts/0 res=success'

Not to mention I deleted a role and its telling me I deleted the user.
Comment 4 Milos Malik 2012-01-27 05:45:43 EST
Correct me if I'm wrong:

ROLE_ASSIGN event should be returned when I run "semanage user --add -R staff_r test".
ROLE_REMOVE event should be returned when I run "semanage user --delete -R staff_r test".

What kind of event should be returned when I run "semanage user --modify -R user_r test" ?
Comment 5 Steve Grubb 2012-01-27 08:58:41 EST
That is correct. For the time being, the modify should produce a ROLE_ASSIGN event. Someday in the future, we can make a ROLE_MODIFY event. But not right now.
Comment 6 Fedora End Of Life 2013-04-03 10:41:48 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 7 Fedora End Of Life 2015-01-09 11:57:52 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

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 19 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.

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