This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2236192 - Default selinux policy doesn't allow to add printer using gnome-control-center
Summary: Default selinux policy doesn't allow to add printer using gnome-control-center
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.2
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Nikola Knazekova
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-30 15:33 UTC by Leonid Kanter
Modified: 2023-09-29 15:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-13 13:28:07 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-3633 0 None Migrated None 2023-09-29 15:34:39 UTC
Red Hat Issue Tracker RHELPLAN-167052 0 None None None 2023-09-13 13:25:58 UTC

Description Leonid Kanter 2023-08-30 15:33:22 UTC
Description of problem:

If you try to add network (smb://) printer using gnome-control-center, after choosing printer model it will end up with message "Printer was not added". Selinux deny it, see AVC messages below

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

selinux-policy-38.1.11-2.el9_2.3.noarch

How reproducible:

Always

Steps to Reproduce:
1. Open gnome-control-center, select Printers, Unlock, then Add printer
2. in search field enter smb://printserver/printer path, authenticate if needed, click on printer
3. On next screen, select make and model (for example, Brother DCP-1200) and click Select

Actual results: New window appear with "Printer was not added" message


Expected results: It should be possible to add printer with default selinux policy


Additional info:


audit.log says:

type=AVC msg=audit(1693407183.128:314): avc:  denied  { bpf } for  pid=26220 comm="gutenprint53+us" capability=39  scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tclass=capability2 permissive=0
type=AVC msg=audit(1693407246.295:321): avc:  denied  { bpf } for  pid=26388 comm="gutenprint53+us" capability=39  scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tclass=capability2 permissive=0

If create custom policy from it, it will be possible to add printer.

Comment 1 Milos Malik 2023-08-31 11:59:29 UTC
Caught in enforcing mode:
----
type=PROCTITLE msg=audit(08/31/2023 13:55:14.473:488) : proctitle=gutenprint53+usb 
type=SYSCALL msg=audit(08/31/2023 13:55:14.473:488) : arch=x86_64 syscall=setsockopt success=yes exit=0 a0=0x6 a1=SOL_SOCKET a2=SO_ATTACH_FILTER a3=0x7ffd60639b50 items=0 ppid=8140 pid=8148 auid=unset uid=root gid=lp euid=root suid=root fsuid=root egid=lp sgid=lp fsgid=lp tty=(none) ses=unset comm=gutenprint53+us exe=/usr/lib/cups/backend/gutenprint53+usb subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(08/31/2023 13:55:14.473:488) : avc:  denied  { bpf } for  pid=8148 comm=gutenprint53+us capability=bpf  scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tclass=capability2 permissive=0 
----

The problem is reproducible on RHEL-9.3:

# rpm -qa selinux\* cups\* | sort
cups-2.3.3op2-19.el9.x86_64
cups-client-2.3.3op2-19.el9.x86_64
cups-filesystem-2.3.3op2-19.el9.noarch
cups-filters-1.28.7-13.el9.x86_64
cups-filters-libs-1.28.7-13.el9.x86_64
cups-ipptool-2.3.3op2-19.el9.x86_64
cups-libs-2.3.3op2-19.el9.x86_64
cups-lpd-2.3.3op2-19.el9.x86_64
cups-pk-helper-0.2.6-14.el9.x86_64
selinux-policy-38.1.22-1.el9.noarch
selinux-policy-devel-38.1.22-1.el9.noarch
selinux-policy-doc-38.1.22-1.el9.noarch
selinux-policy-mls-38.1.22-1.el9.noarch
selinux-policy-targeted-38.1.22-1.el9.noarch
#

The SELinux denial appears immediately after step 1 (before entering anything into the search field).

Comment 2 Milos Malik 2023-08-31 12:05:07 UTC
Caught in permissive mode:
----
type=PROCTITLE msg=audit(08/31/2023 14:00:23.587:569) : proctitle=gutenprint53+usb 
type=SYSCALL msg=audit(08/31/2023 14:00:23.587:569) : arch=x86_64 syscall=setsockopt success=yes exit=0 a0=0x6 a1=SOL_SOCKET a2=SO_ATTACH_FILTER a3=0x7ffd9a624c90 items=0 ppid=11251 pid=11259 auid=unset uid=root gid=lp euid=root suid=root fsuid=root egid=lp sgid=lp fsgid=lp tty=(none) ses=unset comm=gutenprint53+us exe=/usr/lib/cups/backend/gutenprint53+usb subj=system_u:system_r:cupsd_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(08/31/2023 14:00:23.587:569) : avc:  denied  { bpf } for  pid=11259 comm=gutenprint53+us capability=bpf  scontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:cupsd_t:s0-s0:c0.c1023 tclass=capability2 permissive=1 
----

# rpm -qa | grep gutenprint
gutenprint-libs-5.3.4-4.el9.x86_64
gutenprint-5.3.4-4.el9.x86_64
gutenprint-cups-5.3.4-4.el9.x86_64
gutenprint-doc-5.3.4-4.el9.x86_64
# rpm -qla gutenprint\* | grep usb
/usr/lib/cups/backend/gutenprint53+usb
/usr/share/cups/usb/net.sf.gimp-print.usb-quirks
#

Comment 3 RHEL Program Management 2023-09-13 13:26:08 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 4 RHEL Program Management 2023-09-13 13:28:07 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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