error in /etc/cups/cupsd.conf from today's patch

Bug #2070315 reported by L Weissman
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Status tracked in Oracular
Focal
Fix Released
Undecided
Sudhakar Verma
Jammy
Fix Released
Undecided
Sudhakar Verma
Mantic
Fix Released
Undecided
Sudhakar Verma
Noble
Fix Released
Undecided
Sudhakar Verma
Oracular
Fix Released
Undecided
Sudhakar Verma

Bug Description

Mon 24 Jun 2024 05:10:59 PM PDT

Environment: Ubuntu 20.04, can't print to local printer
Settings->Printers gives diagnostic:
        "Sorry, printing service doesn't seem to be available"

This has been working correctly for 4 years until today following boot + install patches.
Problem was traced to an incorrect version of /etc/cups/cupsd.conf that seems to have come from
a patch cluster this morning.

The solution is as follows:

sudo -i
 # cd /var/log/cups
 # view error_log # discover error in cups initialization
 # cd /etc/cups
 # diff cupsd.conf*
  < LogLevel warn
  ---
  > LogLevel debug
  < Listen /run/cups/cups.sock
  ---
  > Listen localhost:631
 # grep Listen cupsd.conf # duplicate "Listen" on socket
  Listen /run/cups/cups.sock
  Listen /run/cups/cups.sock
 # cp -p cupsd.conf.O cupsd.conf # restore old conf file
 # systemctl restart cups.service # restart cups
 # ps -e | grep cups # is the daemon running?
  6082 ? 00:00:00 cupsd

Looks like this corrupt conf file escaped from the dev crew by accident.
<email address hidden>

Tags: focal
Chris Guiver (guiverc)
tags: added: focal
Revision history for this message
Sudhakar Verma (sudhackar) wrote :

I worked on this patch. I'll take a look.

Revision history for this message
Sudhakar Verma (sudhackar) wrote :

Looking at this I am not able to repro

```
sudhackar@sec-focal-amd64:~$ sudo systemctl status cups
● cups.service - CUPS Scheduler
     Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2024-06-27 00:49:01 IST; 2min 29s ago
TriggeredBy: ● cups.socket
             ● cups.path
       Docs: man:cupsd(8)
   Main PID: 556 (cupsd)
      Tasks: 1 (limit: 3365)
     Memory: 4.3M
     CGroup: /system.slice/cups.service
             └─556 /usr/sbin/cupsd -l

Jun 27 00:49:01 sec-focal-amd64 systemd[1]: Started CUPS Scheduler.
sudhackar@sec-focal-amd64:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
sudhackar@sec-focal-amd64:~$ apt-cache policy cups
cups:
  Installed: 2.3.1-9ubuntu1.7
  Candidate: 2.3.1-9ubuntu1.7
  Version table:
 *** 2.3.1-9ubuntu1.7 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.3.1-9ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
sudhackar@sec-focal-amd64:~$ cd /etc/cups
sudhackar@sec-focal-amd64:/etc/cups$ sudo grep Listen cupsd.conf
Listen localhost:631
Listen /run/cups/cups.sock
```

Revision history for this message
Sudhakar Verma (sudhackar) wrote :

I tried on my laptop and was able to repro this. I'll get back to you on this.

Changed in cups (Ubuntu):
status: New → Confirmed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

It looks like upstream released a follow-up commit to fix this issue, or one similar to it:

https://github.com/OpenPrinting/cups/commit/145b946a86062aafab76c656ee9c1112bfd4f804

We will build test packages to see if this solves the regression, and if so, we will publish updates.

Changed in cups (Ubuntu Focal):
assignee: nobody → Sudhakar Verma (sudhackar)
Changed in cups (Ubuntu Jammy):
assignee: nobody → Sudhakar Verma (sudhackar)
Changed in cups (Ubuntu Mantic):
assignee: nobody → Sudhakar Verma (sudhackar)
Changed in cups (Ubuntu Noble):
assignee: nobody → Sudhakar Verma (sudhackar)
Changed in cups (Ubuntu Oracular):
assignee: nobody → Sudhakar Verma (sudhackar)
Changed in cups (Ubuntu Focal):
status: New → Confirmed
Changed in cups (Ubuntu Jammy):
status: New → Confirmed
Changed in cups (Ubuntu Mantic):
status: New → Confirmed
Changed in cups (Ubuntu Noble):
status: New → Confirmed
Revision history for this message
Sudhakar Verma (sudhackar) wrote :

I have prepared updates in the security-proposed ppa. If you can test this - it would be great.
These will be released later today

https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+builds?build_text=cups&build_state=all

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 2.4.7-1.2ubuntu7.2

---------------
cups (2.4.7-1.2ubuntu7.2) noble-security; urgency=medium

  * SECURITY REGRESSION: early exit on missing listen directive
    - d/p/fix-scheduler-start-if-only-domain-socket-to-listen.patch: don't
      exit if no valid Listen or Port found (LP: #2070315)

 -- Sudhakar Verma <email address hidden> Thu, 27 Jun 2024 19:17:32 +0530

Changed in cups (Ubuntu Noble):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 2.4.6-0ubuntu3.2

---------------
cups (2.4.6-0ubuntu3.2) mantic-security; urgency=medium

  * SECURITY REGRESSION: early exit on missing listen directive
    - d/p/fix-scheduler-start-if-only-domain-socket-to-listen.patch: don't
      exit if no valid Listen or Port found (LP: #2070315)

 -- Sudhakar Verma <email address hidden> Thu, 27 Jun 2024 19:13:38 +0530

Changed in cups (Ubuntu Mantic):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 2.4.1op1-1ubuntu4.10

---------------
cups (2.4.1op1-1ubuntu4.10) jammy-security; urgency=medium

  * SECURITY REGRESSION: early exit on missing listen directive
    - d/p/fix-scheduler-start-if-only-domain-socket-to-listen.patch: don't
      exit if no valid Listen or Port found (LP: #2070315)

 -- Sudhakar Verma <email address hidden> Thu, 27 Jun 2024 19:09:25 +0530

Changed in cups (Ubuntu Jammy):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 2.3.1-9ubuntu1.8

---------------
cups (2.3.1-9ubuntu1.8) focal-security; urgency=medium

  * SECURITY REGRESSION: early exit on missing listen directive
    - d/p/fix-scheduler-start-if-only-domain-socket-to-listen.patch: don't
      exit if no valid Listen or Port found (LP: #2070315)

 -- Sudhakar Verma <email address hidden> Thu, 27 Jun 2024 18:40:32 +0530

Changed in cups (Ubuntu Focal):
status: Confirmed → Fix Released
Revision history for this message
Kurt Fankhauser (kfankhau) wrote :
Download full text (5.6 KiB)

I don't know if I have the same issue or not, but after an update a couple days ago, I rebooted yesterday and lost my print services. I'm on Xubuntu 22.04.4 LTS. The Printers dialog shows nothing and just says "Printing service not available. Start the service on this computer or connect to another server." "ps ax | grep cups| shows no processes running. I tried "sudo service cups start" which gave this in the syslog:

Jun 27 18:41:41 kfank-VirtualBox sudo[3658]: kfank : TTY=pts/2 ; PWD=/home/kfank ; USER=root ; COMMAND=/usr/sbin/service cups start
Jun 27 18:41:41 kfank-VirtualBox sudo[3658]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: Listening on CUPS Scheduler.
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: Starting CUPS Scheduler...
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: cups.service: Failed with result 'protocol'.
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: Failed to start CUPS Scheduler.
Jun 27 18:41:41 kfank-VirtualBox sudo[3658]: pam_unix(sudo:session): session closed for user root
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: cups.service: Scheduled restart job, restart counter is at 6.
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: Stopped CUPS Scheduler.
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: cups.socket: Deactivated successfully.
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: Closed CUPS Scheduler.
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: Stopping CUPS Scheduler...
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: Listening on CUPS Scheduler.
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: Starting CUPS Scheduler...
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: cups.service: Failed with result 'protocol'.
Jun 27 18:41:41 kfank-VirtualBox systemd[1]: Failed to start CUPS Scheduler.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: cups.service: Scheduled restart job, restart counter is at 7.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: Stopped CUPS Scheduler.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: cups.socket: Deactivated successfully.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: Closed CUPS Scheduler.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: Stopping CUPS Scheduler...
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: Listening on CUPS Scheduler.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: Starting CUPS Scheduler...
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: cups.service: Failed with result 'protocol'.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: Failed to start CUPS Scheduler.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: cups.service: Scheduled restart job, restart counter is at 8.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: Stopped CUPS Scheduler.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: cups.socket: Deactivated successfully.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: Closed CUPS Scheduler.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: Stopping CUPS Scheduler...
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: Listening on CUPS Scheduler.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: Starting CUPS Scheduler...
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: cups.service: Failed with result 'protocol'.
Jun 27 18:41:42 kfank-VirtualBox systemd[1]: ...

Read more...

Revision history for this message
H.C. Enevoldsen (hcenevoldsen) wrote :

CUPS cannot detect my HP ENVY 6032 printer any longer.

This CUPS problem started around June 25 or 26. I have tried many fixes, reinstalling CUPS, reinstalling HPLIP (for my HP printer), nothing works. So I decided to try Timeshift, for the first time, and restored my system as of June 21. Lo and behold, my printer was detected again, and I can print and scan and copy again. So I disabled Software Update automatic installing, and checked it so I decide what to install. Then I unchecked everything coming in to do with CUPS, and I have kept the (evidently untested) update to CUPS from ruining my printer setup.

I still ignore any CUPS updates coming in with Canonical. I am running the following Ubuntu with Linux Cinnamon as a desktop:

hce@DELLMIN:~$ inxi -Fxxx
System:
  Host: DELLMIN Kernel: 5.15.0-113-generic x86_64 bits: 64 compiler: N/A
  Desktop: Cinnamon 4.4.8 dm: GDM3 3.36.3
  Distro: Ubuntu 20.04.6 LTS (Focal Fossa)

Revision history for this message
H.C. Enevoldsen (hcenevoldsen) wrote :

The CUPS problem has been fixed. And it worked. I can scan and print with my HP ENVY again, and the HPLIP test page printed correctly. Thanks again!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 2.4.7-1.2ubuntu9

---------------
cups (2.4.7-1.2ubuntu9) oracular; urgency=medium

  * SECURITY REGRESSION: early exit on missing listen directive
    - d/p/fix-scheduler-start-if-only-domain-socket-to-listen.patch: don't
      exit if no valid Listen or Port found (LP: #2070315)

 -- Sudhakar Verma <email address hidden> Tue, 02 Jul 2024 17:37:44 +0530

Changed in cups (Ubuntu Oracular):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.