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 1715907 - CUPS- client: cupsGetPPD3() function tries to load PPD from IPP printer and not from the CUPS queue
Summary: CUPS- client: cupsGetPPD3() function tries to load PPD from IPP printer and n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cups
Version: 7.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Zdenek Dohnal
QA Contact: Petr Dancak
URL:
Whiteboard:
Depends On:
Blocks: 1757052
TreeView+ depends on / blocked
 
Reported: 2019-05-31 15:13 UTC by Oliver Freyermuth
Modified: 2023-02-12 17:28 UTC (History)
5 users (show)

Fixed In Version: cups-1.6.3-46.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:21:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Backported patch (887 bytes, patch)
2020-02-12 12:08 UTC, Zdenek Dohnal
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github apple cups issues 4725 0 'None' closed cupsGetPPD3() function of CUPS library tries to load PPD from IPP printer and not from the CUPS queue 2020-11-23 07:11:44 UTC
Red Hat Issue Tracker RHELPLAN-53522 0 None None None 2023-02-12 17:28:16 UTC
Red Hat Product Errata RHSA-2020:3864 0 None None None 2020-09-29 19:22:19 UTC

Description Oliver Freyermuth 2019-05-31 15:13:06 UTC
Description of problem:
Setting up a system as CUPS client via /etc/cups/client.conf of a CUPS server exporting printers with IPP URIs, the CUPS client attempts to query the printer itself for a PPD file instead of querying the CUPS server, leading to client program / desktop hang if the printer is not reachable. 
Reproducible with "lpoptions -l" or most Qt applications. 

The underlying issue is caused by the CUPS client misinterpreting IPP printer URIs as CUPS servers:
https://github.com/apple/cups/issues/4725
This issue is fixed by upstream's commit:
https://github.com/apple/cups/commit/dd37b5bcf97db7069826a807892736e912b7e935


Version-Release number of selected component (if applicable):
cups-libs-1.6.3-35.el7


How reproducible:
Always. 


Steps to Reproduce:
1. Set up a machine as CUPS client via /etc/cups/client.conf:
   ServerName cups-test.example.com
2. Have the CUPS server export a printer via IPP. 
3. Have that printer unreachable to the machine which wants to print,
   e.g. in a private network. 
4. Try to print from a Qt based app / run "lpoptions -l". 
   Anything which triggers a call to cupsGetPPD(). 

Actual results:
Applications / commands hang, trying to contact the printer. 


Expected results:
Printing works. 


Additional info:
See https://github.com/apple/cups/issues/4725 for the bug,
and https://github.com/apple/cups/commit/dd37b5bcf97db7069826a807892736e912b7e935 for the patch fixing it.

Comment 2 Zdenek Dohnal 2019-06-03 10:03:45 UTC
Hi Oliver,

thank you for reporting the issue, investigating and finding the patch! If you are able, would you mind filing customer ticket on access.redhat.com? It would help me to justify prioritization of the issue during our internal planning.

Comment 3 Zdenek Dohnal 2019-06-03 10:06:38 UTC
Plus would you mind explaining in more detail step 2? (how-to set it up etc.)


(In reply to Oliver Freyermuth from comment #0)
> 2. Have the CUPS server export a printer via IPP.

Comment 5 Oliver Freyermuth 2019-06-03 13:39:47 UTC
Hi Zdenek,

(In reply to Zdenek Dohnal from comment #2)
> Hi Oliver,
> 
> thank you for reporting the issue, investigating and finding the patch! 

Thanks for taking a look at it! 

> If
> you are able, would you mind filing customer ticket on access.redhat.com? It
> would help me to justify prioritization of the issue during our internal
> planning.

Sadly, I can't (we are effectively using CentOS 7). I would still expect the issue to be very relevant for RHEL users, but I can't file a customer ticket :-(. 

> Plus would you mind explaining in more detail step 2? (how-to set it up etc.)

There's nothing special, really - installing a cups server, opening up access to port 631, adding any printer which supports IPP and is in a different subnet only accessibe to the CUPS server and not to the client and sharing that is sufficient on the server end (I also used CentOS 7 there in our case). 
So (in general, unless you play tricks with routing) that means the CUPS server machine needs to be multi-homed inside the "desktop" / "client" network and the "printer" network. 

On the client, it's sufficient to have an /etc/cups/client.conf with the content:
ServerName myprintserver.example.com
Let me know if there are any more details you'd like to know ;-).

Comment 6 Zdenek Dohnal 2020-02-11 13:04:09 UTC
I was able to reproduce and I'll create a test for the issue at least.

Comment 7 Zdenek Dohnal 2020-02-12 12:08:13 UTC
Created attachment 1662655 [details]
Backported patch

Comment 18 errata-xmlrpc 2020-09-29 19:21:52 UTC
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 (Moderate: cups security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:3864


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