ti 1.12.2026 klo 17.21 Martin-Éric Racine ([email protected]) kirjoitti:
>
> ti 1.12.2026 klo 16.29 Danny Smit ([email protected]) kirjoitti:
> >
> > Package: printer-driver-cups-pdf
> > Version: 3.0.1-14
> > Severity: important
> > Tags: bookworm patch
> > Control: fixed -1 3.0.2-7
> > Control: affects -1 src:cups
> >
> > Dear Maintainer, dear LTS team,
> >
> > Since cups 2.4.2-3+deb12u10 (DLA-4952-1, bookworm-security, 2026-11-29), a 
> > fresh
> > install of printer-driver-cups-pdf 3.0.1-14 on bookworm no longer completes
> > unattended.
> >
> > This is the problem that was already fixed in unstable by cups-pdf 3.0.2-7:
> >
> >   * [postinst]: Stop using '-h localhost'. Fixes the issue where installing 
> > the
> >     package with CUPS 2.4.17+ ... gets stuck in postinst asking for the root
> >     password. (upstream commit e052dc44d)
> >
> > deb12u10 backports that same CUPS change 
> > (debian/patches/CVE-2026-34990.patch =
> > upstream e052dc44d "Don't allow local certificates over the loopback
> > interface"). Bookworm's cups-pdf postinst still uses "-h localhost", so the
> > companion fix is missing in bookworm.
>
> Thanks for the heads-up.
>
> Now that I notice, the same '-h localhost' should have also been
> removed in prerm and postrm. I'm uploading this to unstable now, then
> I'll backport the updated maintainer scripts with a versioned Depends
> on CUPS (>= 2.4.2-3+deb12u10) for Bookworm.

Find the debdiff attached. Since the DLA was against CUPS, not
CUPS-PDF, I'm not sure of whether this can directly go to
bookworm-security. Security team added in CC.

Martin-Éric
diff --git a/debian/changelog b/debian/changelog
index 4ba4232..ada98c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,23 @@
+cups-pdf (3.0.1-14+deb12u1) bookworm-security; urgency=medium
+
+  [ Luca Boccassi ]
+  * [postinst]: Stop using '-h localhost'.
+    Using '-h localhost' forces a TCP connection to the loopback interface
+    which, since CUPS 2.4.17, is no longer treated as a local connection
+    for authentication purposes (see upstream commit e052dc44d).
+    Without "-h", the tools use the AF_LOCAL domain socket and PeerCred
+    lets root authenticate without a password.
+    Fixes the issue where installing the package with CUPS 2.4.17+
+    gets stuck in postinst asking for the root password.
+  [ Martin-Éric Racine ]
+  * [prerm,postrm]: Stop using '-h localhost' there too (Closes: #1156031).
+    Since version 2.4.2-3+deb12u10 (DLA-4952-1, bookworm-security, 2026-11-29)
+    CUPS received the same changes as CUPS 2.4.17. See cups-pdf 3.0.2-7.
+  * [control]
+    Bump dependencies on cups,cups-client to (>= 2.4.2-3+deb12u10) to match.
+
+ -- Martin-Éric Racine <[email protected]>  Tue, 01 Dec 2026 17:43:06 
+0200
+
 cups-pdf (3.0.1-14) unstable; urgency=medium
 
   * [patches]
diff --git a/debian/control b/debian/control
index 913e87b..a1d1240 100644
--- a/debian/control
+++ b/debian/control
@@ -10,8 +10,8 @@ Standards-Version: 4.6.0.1
 
 Package: printer-driver-cups-pdf
 Architecture: any
-Depends: cups,
-         cups-client,
+Depends: cups (>= 2.4.2-3+deb12u10),
+         cups-client (>= 2.4.2-3+deb12u10),
          ghostscript,
          libpaper-utils,
          ${misc:Depends},
diff --git a/debian/copyright b/debian/copyright
index 0f4a918..49ef5d7 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -8,7 +8,7 @@ Copyright: © 2003-2017 Volker Christian Behr 
<[email protected]>
 License: GPL-2+
 
 Files: debian/*
-Copyright: © 2004-2021 Martin-Éric Racine <[email protected]>
+Copyright: © 2004-2026 Martin-Éric Racine <[email protected]>
            © 2009,2011 Till Kamppeter <[email protected]>
 License: GPL-2+
 
diff --git a/debian/printer-driver-cups-pdf.postinst 
b/debian/printer-driver-cups-pdf.postinst
index 2122a02..0a287c8 100644
--- a/debian/printer-driver-cups-pdf.postinst
+++ b/debian/printer-driver-cups-pdf.postinst
@@ -32,10 +32,10 @@ case "$1" in
                        invoke-rc.d cups force-reload || invoke-rc.d cups start 
|| :
                fi
                # Wait until CUPS has reloaded its configuration.
-               if lpstat -h localhost -r 2>/dev/null | grep -q not
+               if lpstat -r 2>/dev/null | grep -q not
                then
                        t=0
-                       while lpstat -h localhost -r 2>/dev/null | grep -q not
+                       while lpstat -r 2>/dev/null | grep -q not
                        do
                                t=$(($t + 1))
                                if [ $t = 10 ]
@@ -47,12 +47,12 @@ case "$1" in
                        done
                fi
                # Create a PDF queue if we have none yet (but NOT inside 
chroots; see Debian bugs #539156,#614713)
-               if [ -z "$(LC_ALL=C lpstat -h localhost -v 2>/dev/null | grep 
'cups-pdf:/')" ] && [ -d /run/cups/certs ]
+               if [ -z "$(LC_ALL=C lpstat -v 2>/dev/null | grep 'cups-pdf:/')" 
] && [ -d /run/cups/certs ]
                then
                        # 1) Find a name for the PDF queue.
                        queue=PDF
                        number=0
-                       while $(LC_ALL=C lpstat -h localhost -v 2>/dev/null | 
cut -d ':' -f 1 | cut -d ' ' -f 3 | grep -q ^$queue\$)
+                       while $(LC_ALL=C lpstat -v 2>/dev/null | cut -d ':' -f 
1 | cut -d ' ' -f 3 | grep -q ^$queue\$)
                        do
                                number=$(($number + 1))
                                queue="PDF$number"
@@ -60,14 +60,14 @@ case "$1" in
                        # 2) Find the default paper size.
                        size="$(LC_ALL=C paperconf 2>/dev/null)" || size=a4
                        # 3) Create the queue.
-                       echo | lpadmin -h localhost -p $queue -v cups-pdf:/ -m 
lsb/usr/cups-pdf/CUPS-PDF_opt.ppd -o pdftops-renderer-default=pdftocairo -o 
printer-is-shared=no -o PageSize=$size 2>/dev/null || :
+                       echo | lpadmin -p $queue -v cups-pdf:/ -m 
lsb/usr/cups-pdf/CUPS-PDF_opt.ppd -o pdftops-renderer-default=pdftocairo -o 
printer-is-shared=no -o PageSize=$size 2>/dev/null || :
                        # 4) Enable the queue.
-                       echo | cupsenable -h localhost $queue 2>/dev/null || :
-                       echo | cupsaccept -h localhost $queue 2>/dev/null || :
+                       echo | cupsenable $queue 2>/dev/null || :
+                       echo | cupsaccept $queue 2>/dev/null || :
                        # 5) Set the PDF queue as default if there is no 
default printer yet.
-                       if [ -z "$(LC_ALL=C lpstat -h localhost -d 2>/dev/null 
| grep 'system default destination:')" ]
+                       if [ -z "$(LC_ALL=C lpstat -d 2>/dev/null | grep 
'system default destination:')" ]
                        then
-                               echo | lpadmin -h localhost -d $queue 
2>/dev/null || :
+                               echo | lpadmin -d $queue 2>/dev/null || :
                        fi
                else
                        echo "Skipped automated creation of the PDF queue."
diff --git a/debian/printer-driver-cups-pdf.postrm 
b/debian/printer-driver-cups-pdf.postrm
index a33d9cf..47a2fcb 100644
--- a/debian/printer-driver-cups-pdf.postrm
+++ b/debian/printer-driver-cups-pdf.postrm
@@ -20,10 +20,10 @@ case "$1" in
                        invoke-rc.d cups force-reload || invoke-rc.d cups start 
|| :
                fi
                # Wait until CUPS has reloaded its configuration.
-               if lpstat -h localhost -r 2>/dev/null | grep -q not
+               if lpstat -r 2>/dev/null | grep -q not
                then
                        t=0
-                       while lpstat -h localhost -r 2>/dev/null | grep -q not
+                       while lpstat -r 2>/dev/null | grep -q not
                        do
                                t=$(($t + 1))
                                if [ $t = 10 ]
@@ -35,11 +35,11 @@ case "$1" in
                        done
                fi
                # Purge all PDF queues and disable them.
-               for queue in $(LC_ALL=C lpstat -h localhost -v 2>/dev/null | 
grep 'cups-pdf:/' | cut -d ':' -f 1 | cut -d ' ' -f 3)
+               for queue in $(LC_ALL=C lpstat -v 2>/dev/null | grep 
'cups-pdf:/' | cut -d ':' -f 1 | cut -d ' ' -f 3)
                do
-                       echo | cupsreject -h localhost $queue 2>/dev/null || :
-                       echo | cupsdisable -h localhost $queue 2>/dev/null || :
-                       echo | lpadmin -h localhost -x $queue 2>/dev/null || :
+                       echo | cupsreject $queue 2>/dev/null || :
+                       echo | cupsdisable $queue 2>/dev/null || :
+                       echo | lpadmin -x $queue 2>/dev/null || :
                done
                # Purge all logs and spools.
                if [ -f /var/log/cups/cups-pdf_log ]
diff --git a/debian/printer-driver-cups-pdf.prerm 
b/debian/printer-driver-cups-pdf.prerm
index 4476052..ad85e83 100644
--- a/debian/printer-driver-cups-pdf.prerm
+++ b/debian/printer-driver-cups-pdf.prerm
@@ -20,10 +20,10 @@ case "$1" in
                        invoke-rc.d cups force-reload || invoke-rc.d cups start 
|| :
                fi
                # Wait until CUPS has reloaded its configuration.
-               if lpstat -h localhost -r 2>/dev/null | grep -q not
+               if lpstat -r 2>/dev/null | grep -q not
                then
                        t=0
-                       while lpstat -h localhost -r 2>/dev/null | grep -q not
+                       while lpstat -r 2>/dev/null | grep -q not
                        do
                                t=$(($t + 1))
                                if [ $t = 10 ]
@@ -35,11 +35,11 @@ case "$1" in
                        done
                fi
                # Purge all PDF queues and disable them.
-               for queue in $(LC_ALL=C lpstat -h localhost -v 2>/dev/null | 
grep 'cups-pdf:/' | cut -d ':' -f 1 | cut -d ' ' -f 3)
+               for queue in $(LC_ALL=C lpstat -v 2>/dev/null | grep 
'cups-pdf:/' | cut -d ':' -f 1 | cut -d ' ' -f 3)
                do
-                       echo | cupsreject -h localhost $queue 2>/dev/null || :
-                       echo | cupsdisable -h localhost $queue 2>/dev/null || :
-                       echo | lpadmin -h localhost -x $queue 2>/dev/null || :
+                       echo | cupsreject $queue 2>/dev/null || :
+                       echo | cupsdisable $queue 2>/dev/null || :
+                       echo | lpadmin -x $queue 2>/dev/null || :
                done
                ;;
        upgrade|deconfigure|failed-upgrade)
@@ -50,4 +50,4 @@ case "$1" in
                ;;
 esac
 #DEBHELPER#
-exit 0
\ No newline at end of file
+exit 0

Reply via email to