Bug 839608
Summary: | Extra policy rule required for hplip3 fax support | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Tim Waugh <twaugh> | ||||
Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> | ||||
Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 5.8 | CC: | dwalsh, ksrot, mmalik | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | selinux-policy-2.4.6-337.el5 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-01-08 03:32:26 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: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 501834 | ||||||
Attachments: |
|
Have you seen any AVCs or USER_AVCs when the faxing did not work? Yes, for example: type=USER_AVC msg=audit(1342013211.753:130): user pid=2098 uid=81 auid=4294967295 subj=system_u:system_r:system_dbusd_t:s0 msg='avc: denied { send_msg } for msgtype=signal interface=com.hplip.StatusService member=Event dest=org.freedesktop.DBus spid=6177 tpid=6170 scontext=system_u:system_r:hplip_t:s0-s0:c0.c1023 tcontext=user_u:system_r:unconfined_t:s0 tclass=dbus : exe="/bin/dbus-daemon" (sauid=81, hostname=?, addr=?, terminal=?)' The automated test by-the-way found following AVC in enforcing mode: ---- time->Thu Jul 12 10:47:54 2012 type=SYSCALL msg=audit(1342104474.495:238276): arch=40000003 syscall=102 success=no exit=-13 a0=3 a1=bf9cdf10 a2=649118 a3=9ed22c0 items=0 ppid=8843 pid=8928 auid=0 uid=4 gid=7 euid=4 suid=4 fsuid=4 egid=7 sgid=7 fsgid=7 tty=(none) ses=28074 comm="hpfax" exe="/usr/bin/python" subj=root:system_r:hplip_t:s0-s0:c0.c1023 key=(null) type=AVC msg=audit(1342104474.495:238276): avc: denied { name_connect } for pid=8928 comm="hpfax" scontext=root:system_r:hplip_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=tcp_socket ---- This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release. Milos, could you add full part of AVC? > could you add full part of AVC?
I don't know what you mean by "full part of AVC". Did you mean full auditing?
Here is the AVC from enforcing mode:
----
type=SOCKETCALL msg=audit(07/12/2012 16:05:21.564:240482) : nargs=3 a0=4 a1=92f62d8 a2=10
type=SOCKADDR msg=audit(07/12/2012 16:05:21.564:240482) : saddr=inet host:127.0.0.1 serv:0
type=SYSCALL msg=audit(07/12/2012 16:05:21.564:240482) : arch=i386 syscall=socketcall(connect) success=no exit=-13(Permission denied) a0=3 a1=bfbf0f50 a2=72b118 a3=92f62c0 items=0 ppid=1729 pid=1757 auid=root uid=lp gid=lp euid=lp suid=lp fsuid=lp egid=lp sgid=lp fsgid=lp tty=(none) ses=28345 comm=hpfax exe=/usr/bin/python subj=root:system_r:hplip_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(07/12/2012 16:05:21.564:240482) : avc: denied { name_connect } for pid=1757 comm=hpfax scontext=root:system_r:hplip_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=tcp_socket
----
Here is the AVC from permissive mode:
----
type=SOCKETCALL msg=audit(07/12/2012 16:03:28.977:240400) : nargs=3 a0=4 a1=b7b912d8 a2=10
type=SOCKADDR msg=audit(07/12/2012 16:03:28.977:240400) : saddr=inet host:127.0.0.1 serv:0
type=SYSCALL msg=audit(07/12/2012 16:03:28.977:240400) : arch=i386 syscall=socketcall(connect) success=no exit=-111(Connection refused) a0=3 a1=bf8f5980 a2=ff7118 a3=b7b912c0 items=0 ppid=32721 pid=32749 auid=root uid=lp gid=lp euid=lp suid=lp fsuid=lp egid=lp sgid=lp fsgid=lp tty=(none) ses=28345 comm=hpfax exe=/usr/bin/python subj=root:system_r:hplip_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(07/12/2012 16:03:28.977:240400) : avc: denied { name_connect } for pid=32749 comm=hpfax scontext=root:system_r:hplip_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=tcp_socket
----
FWIW. The name_connect AVC messages are from hplip, not hplip3. The attached patch fixes hplip3 fax operation for me, using the packages from a forthcoming update (bug #501834 comment #40). Milos, to which port is trying to connect it? Added Tim's patch. type=AVC msg=audit(1342104474.495:238276): avc: denied { name_connect } for pid=8928 comm="hpfax" scontext=root:system_r:hplip_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=tcp_socket to which port does hpfax connect? This rule was not added because it would allow hplip to connect to generic port. Fixed in selinux-policy-2.4.6-337.el5 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. http://rhn.redhat.com/errata/RHBA-2013-0060.html |
Created attachment 597787 [details] selinux-policy-hplip3.patch Description of problem: In order to make faxing work for the hplip3 package, the hp3fax CUPS backend needs to be able to send a D-Bus message to the system bus. Version-Release number of selected component (if applicable): selinux-policy-2.4.6-327.el5 How reproducible: 100% Steps to Reproduce: 1.Try to use hplip3 (with fixes) for faxing Actual results: Audit messages, faxing doesn't work Additional info: This addition to cups.te has been tested locally and works for me.