Bug 537633 - SELinux is preventing /usr/sbin/upsmon "getattr" access.
Summary: SELinux is preventing /usr/sbin/upsmon "getattr" access.
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:49ff9bc4991...
: 537483 537632 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2009-11-15 09:48 UTC by Andre Robatino
Modified: 2009-11-24 15:36 UTC (History)
4 users (show)

Fixed In Version: 3.6.32-46.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-11-24 07:49:32 UTC
Type: ---

Attachments (Terms of Use)
SELinux is preventing /sbin/genericups "unlink" access on /var/run/nut/genericups-ups. (2.40 KB, text/plain)
2009-11-16 20:29 UTC, Andre Robatino
no flags Details

Description Andre Robatino 2009-11-15 09:48:02 UTC

SELinux is preventing /usr/sbin/upsmon "getattr" access.

Detailed Description:

[upsmon has a permissive type (upsmon_t). This access was not denied.]

SELinux denied access requested by upsmon. It is not expected that this access
is required by upsmon and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug

Additional Information:

Source Context                system_u:system_r:upsmon_t:s0
Target Context                system_u:system_r:upsmon_t:s0
Target Objects                None [ udp_socket ]
Source                        upsmon
Source Path                   /usr/sbin/upsmon
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nut-client-2.4.1-8.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-41.fc12
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) #1 SMP
                              Sat Nov 7 21:11:14 EST 2009 x86_64 x86_64
Alert Count                   3
First Seen                    Fri 13 Nov 2009 07:49:36 AM EST
Last Seen                     Sun 15 Nov 2009 04:45:04 AM EST
Local ID                      ceea5e8e-3969-4a73-946f-73f61f57da94
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1258278304.349:257): avc:  denied  { getattr } for  pid=11953 comm="upsmon" laddr= lport=40596 faddr= fport=3493 scontext=system_u:system_r:upsmon_t:s0 tcontext=system_u:system_r:upsmon_t:s0 tclass=udp_socket

node=(removed) type=SYSCALL msg=audit(1258278304.349:257): arch=c000003e syscall=51 success=yes exit=0 a0=3 a1=7fff5c9f1f78 a2=7fff5c9f2184 a3=0 items=0 ppid=11952 pid=11953 auid=4294967295 uid=57 gid=474 euid=57 suid=57 fsuid=57 egid=474 sgid=474 fsgid=474 tty=(none) ses=4294967295 comm="upsmon" exe="/usr/sbin/upsmon" subj=system_u:system_r:upsmon_t:s0 key=(null)

Hash String generated from  selinux-policy-3.6.32-41.fc12,catchall,upsmon,upsmon_t,upsmon_t,udp_socket,getattr
audit2allow suggests:

#============= upsmon_t ==============
allow upsmon_t self:udp_socket getattr;

Comment 1 Andre Robatino 2009-11-15 09:51:32 UTC
See also bug #537483 and bug #537632.  All 3 alerts happen immediately after starting the ups service.  I am using an APC BackUPS serial port UPS with a serial port to USB adapter to connect to my PC which does not have a serial port.

Comment 2 Daniel Walsh 2009-11-16 15:46:11 UTC
THey are basically the same bug.  Reporting one would be sufficient.  

You can add these rules for now using

# grep avc /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Fixed in selinux-policy-3.6.32-46.fc12.noarch

Comment 3 Daniel Walsh 2009-11-16 15:46:49 UTC
*** Bug 537483 has been marked as a duplicate of this bug. ***

Comment 4 Daniel Walsh 2009-11-16 15:47:15 UTC
*** Bug 537632 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2009-11-16 19:38:38 UTC
selinux-policy-3.6.32-46.fc12 has been submitted as an update for Fedora 12.

Comment 6 Andre Robatino 2009-11-16 20:29:25 UTC
Created attachment 369778 [details]
SELinux is preventing /sbin/genericups "unlink" access on /var/run/nut/genericups-ups.

Comment 7 Andre Robatino 2009-11-16 20:30:38 UTC
After updating selinux-policy and selinux-policy-targeted to the 3.6.32-46 test versions and stopping and starting the ups service, I only get one selinux message (attached above) instead of the previous three.

Comment 8 Fedora Update System 2009-11-18 14:12:40 UTC
selinux-policy-3.6.32-46.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-11672

Comment 9 Fedora Update System 2009-11-24 07:47:35 UTC
selinux-policy-3.6.32-46.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Andre Robatino 2009-11-24 15:36:54 UTC
Immediately after updating to 3.6.32-46, stopping the ups service resulted in a single selinux message (same as the one in comment #6), which I reported as bug #540966.  Restarting the service didn't generate any messages, nor do I see the three messages reported in this bug anymore.

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